Admin
You are currently browsing the articles from KomKid.Net matching the category Admin.
คำสั่ง mt (Magnatic Tape) ปกติระบบจะ mount ไว้ให้ที่ /dev/st0
1 2 3 4
| mt -f /dev/st0 status # ตรวจสอบสถานะ
mt -f /dev/st0 rewind # สั่งหมุน tape กลับ
mt -f /dev/st0 erase # ลบข้อมูล (นานมาก)
mt -f /dev/st0 offline #สั่งเด้ง tape ออก |
Cleaning Cartridge # บางรุ่นอาจไม่เหมือนกัน
ใส่เข้าไป พอมัน load เข้าไปแล้วทำความสะอาดเสร็จจะเด้งออกมาเอง
(Cleaning Cartridge เป็นแบบใช้แล้วใช้เลย rewind กลับมาใช้อีกไม่ได้)
คำสั่ง Backup & Restore
Backup ใช้ -c
1
| tar -cvf backup_filename data_to_backup |
เช่น
1
| tar -cvf backup.tar /home/nikom |
กรณีต้องการให้บีบอัดไฟล์ด้วย เพิ่ม parameter -z
1
| tar -cvzf backup.tar.gz /home/nikom |
Restore เปลี่ยน -c เป็น -x (เข้าไปใน directory ที่จะ restore ก่อน เพราะสั่งตรงไหน restore มาตรงนั้น)
1
| tar -xvf backup_filename |
เช่น
restore ไฟล์ที่บีบไว้ ใช้ -z เหมือนกัน
Tape
backup ลง tape
1
| tar -cvf /dev/st0 data_to_backup |
ดูรายการใน tape
restore จาก tape
1
| tar -tvf /dev/st0 backup_filename |
backup & restore กับ tape ก็ใช้ -z สำหรับการบีบอัดได้
backup แบบ incremental
การ backup เฉพาะส่วนที่เพิ่มขึ้น ทำได้โดยใช้ -g ตามด้วย ไฟล์ที่ใช้เก็บส่วนต่าง เช่น
1
| tar -g /home/nikom/tar_inc_file.dat -cvf /dev/st0 /home/nikom |
Written by Komkid on October 20th, 2010 with no comments.
Read more articles on Admin and Ubuntu.
เมื่อ OS ใน Virtual Box เต็ม จะทำอย่างไรกันดีเล่าพี่น้อง
ความจริงวิธีที่จะทำ มันไม่ตรงกับหัวข้อครับ เพราะมันไม่ใช่การขยาย แต่มันเป็นการสร้างใหม่
1.เลือก VDI Image เป้าหมายที่ต้องการขยาย

2.สร้าง VDI Image อันใหม่ให้มีขนาดที่ต้องการ
3.เพิ่ม Image อันใหม่เป็น Slave และ เพิ่ม linux Image เข้าไปใน CD สำหรับใช้ Boot ตามตัวอย่างใช้ Parted Magic

4.เปิด terminal พิมพ์ nano /proc/paritions เพื่อดูขนาด harddisk

5.ใช้คำสั่ง dd โดยสังเกตขนาดตามรูป จะโอนจาก 10G(hda) ไปเป็น 30G(hdb) ก็ใช้คำสั่ง
1
| dd if=/dev/hda of=/dev/hdb |
6.รอจนเสร็จแล้ว shutdown
7.สร้าง OS อันใหม่ แล้วเพิ่ม VDI Image อันใหม่ กับ image ของ Parted Magic boot อีกทีเพื่อ resize partition เพราะ image ใหม่มีขนาด 30 GB ก็จริง แต่ขนาด partition ยังเท่าเดิม

8.เสร็จแล้วก็ shutdown แล้วเอา image ของ Parted Magic ออกก็จะได้ OS ใหม่ใหญ่กว่าเดิมไว้ใช้งาน

Written by Komkid on July 22nd, 2010 with no comments.
Read more articles on Admin and IT Tips and Software and Ubuntu.
OCS Inventory NG เป็น Asset Management Software แบบ Open Source สำหรับจัดการข้อมูล Hardware และ Software ในระบบเครือข่าย รองรับ Client ที่เป็น Windows, Linux, MacOS ฯลฯ
* Relevant inventory information.
* Powerful deployment system allowing to distribute software installation or scripts on computers without overloading the network.
* Web Administration Console.
* Multiple operating systems support, including Microsoft Windows, Linux, *BSD, Sun Solaris, IBM AIX, HP-UX, MacOS X.
* Lightweight bandwith usage: 5 KB for a full Windows inventory.
* High performance: about 1 000 000 of computers inventoried per day using a server bi-Xeon 3 GHz and 4 GB RAM.
* 3-Tier architecture using current standards, HTTP/HTTPS protocol and XML data formatting.
* Based on well known products such as Apache web server, MySQL database server, PHP and PERL scripting languages.
* Web service accessible through SOAP interface.
* Plugins support through API.
* …
http://www.ocsinventory-ng.org
ขั้นตอนการติดตั้งสำหรับ Server ที่เป็น Ubuntu
1.ติดตั้ง Package ที่จำเป็น
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| #apache, php, mysql
apt-get install apache2
apt-get install php5 libapache2-mod-php5 php5-gd
apt-get install mysql-server
apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
apt-get install make
sudo aptitude install libc6-dev
#perl
sudo aptitude install perl libapache2-mod-perl2 libxml-simple-perl libcompress-zlib-perl libdbi-perl libapache-dbi-perl
sudo aptitude install libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libnet-ip-perl libsoap-lite-perl
cpan SOAP::Lite #optional for web service |
2.ติดตั้ง OCS Inventory NG Server
1 2 3 4
| wget http://launchpad.net/ocsinventory-server/stable-1.3/server-release-1.3.1/+download/OCSNG_UNIX_SERVER-1.3.1.tar.gz
tar -xvzf OCSNG_UNIX_SERVER-1.3.1.tar.gz
cd OCSNG_UNIX_SERVER-1.3.1
./setup.sh |
Do you wish to continue ([y]/n)? y
Which host is running database server [localhost] ? [enter]
On which port is running database server [3306] ? [enter]
Where is Apache daemon binary [/usr/sbin/apache2] ? [enter]
Where is Apache main configuration file [/etc/apache2/apache2.conf] ? [enter]
Which user account is running Apache web server [www-data] ? [enter]
Which user group is running Apache web server [www-data] ? [enter]
Where is Apache Include configuration directory [//etc/apache2/conf.d/] ? [enter]
Where is PERL Intrepreter binary [/usr/bin/perl] ? [enter]
Do you wish to setup Communication server on this computer ([y]/n)? y
Where to put Communication server log directory [/var/log/ocsinventory-server] ? [enter]
To ensure Apache loads mod_perl before OCS Inventory NG Communication Server, Setup can name Communication Server Apache configuration file ‘z-ocsinventory-server.conf’ instead of ‘ocsinventory-server.conf’. Do you allow Setup renaming Communication Server Apache configuration fileto ‘z-ocsinventory-server.conf‘ ([y]/n) ? y
Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)? y
Do you wish to continue ([y]/n)? y
Where to copy Administration Server static files for PHP Web Console [/usr/share/ocsinventory-reports] ? [enter]
Where to create writable/cache directories for deployement packages and IPDiscover [/var/lib/ocsinventory-reports] ? [enter]
1 2
| /etc/init.d/apache2 restart
nano /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php #set username & password of mysql |
3.เรียกดูได้ที่ http://localhost/ocsreports
4.คลิก send เพื่อสร้าง database จะได้ database ชื่อ ocsweb
6.เข้าใช้งานที่ http://localhost/ocsreports โดยใช้ username=admin password=admin
7.ติดตั้ง Agent สำหรับ Windows โดยใช้ตัว setup จาก http://launchpad.net/ocsinventory-windows-agent/trunk/win32-agent-release-4061/+download/OCSNG_WINDOWS_AGENT_4061.1.zip (สามารถทำ silent install ได้ด้วย)
การติดตั้ง Agent สำหรับ Windows
1. แบบ manual ใช้ตัว setup จาก http://launchpad.net/ocsinventory-windows-agent/trunk/win32-agent-release-4061/+download/OCSNG_WINDOWS_AGENT_4061.1.zip
2. แบบ deploy ผ่าน Active Directory โดยทำผ่าน Group Policy ใส่ไว้ใน Computer Configuration -> Windows Settings -> Scripts -> Startup
2.1 คลิก Show files แล้ว rename OcsLogon.exe เป็น IP เครื่อง OCS Server เอามาวางไว้ในนั้น เช่น 192.168.0.252
2.2 Add Script โดยกด Browse หาไฟล์ในข้อ 2.1
2.3 ใส่ Parameters ดังนี้
/S = Silent
/DEBUG = สร้างไฟล์ log
/NP = No Proxy
/INSTALL = Install Service Agent
/DEPLOY:4061 = ติดตั้ง Agent รุ่น 4.0.6.1
/SERVER:192.168.0.252 = ติดต่อไปที่ Server 192.168.0.252
3. เมื่อเครื่อง Client Boot ขึ้นมาก็จะติดต่อไปที่ Server เพื่อทำการ Upgrade หรือติดตั้งตัว Agent โดยดูผลลัพธ์ได้ที่ C:\OCS-NG
Written by Komkid on May 16th, 2010 with no comments.
Read more articles on Admin and Networking and Software and Ubuntu.
FreeNX เป็นคนละตัวกับ NXServer ของ nomachine ครับ (ของ nomachine จำกัดแค่ 2 session เอง)
1.เพิ่ม repository
1
| nano /etc/apt/sources.list |
เพิ่ม
1 2
| deb http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main
deb-src http://ppa.launchpad.net/freenx-team/ppa/ubuntu VERSION main |
เพิ่ม key แล้ว update
1 2
| apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2a8e3034d018a4ce
apt-get update |
2.ติดตั้ง server
3.ติดตั้ง client (ใช้ของ nomachine)
1 2
| wget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver_3.4.0-12_i386.deb
dpkg -i nxclient_3.4.0-5_i386.deb |
4.กรณีต้องการเปลี่ยน SSH key
1
| dpkg-reconfigure freenx-server |
เลือก Create new custom keys
จะได้ key อยู่ที่ /var/lib/nxserver/home/custom_keys/client.id_dsa.key สำหรับเอาไป import เข้า nxclient
อาจ copy ไปโดยให้คำสั่ง
ที่ server
1
| cp /var/lib/nxserver/home/custom_keys/client.id_dsa.key ~/ |
ที่ client
1
| scp user@freenx-server:~/client.id_dsa.key ~/ |
Written by Komkid on April 26th, 2010 with no comments.
Read more articles on Admin and Networking and Software and Ubuntu.
Join domain ให้ Ubuntu เป็นสมาชิกของ domain
แก้ไขไฟล์ /etc/resolv.conf
1
| sudo nano /etc/resolv.conf |
ป้อนข้อมูลดังนี้
1 2
| search sci.com
nameserver 192.168.0.254 |
แก้ไขไฟล์ /etc/hostname
ป้อนข้อมูลดังนี้
Join domain โดยใช้คำสั่งดังนี้
1 2 3 4
| sudo apt-get install likewise-open
sudo /etc/init.d/likewise-open restart
sudo domainjoin-cli join sci.com administrator
sudo update-rc.d likewise-open defaults |
Written by Komkid on February 17th, 2010 with no comments.
Read more articles on Admin and Networking and Ubuntu.
« Older articles
No newer articles