มีขั้นตอนดังนี้
- ติดตั้ง Package ที่ชื่อว่า update-manager-core
- ถ้าติดตั้งไม่ได้ให้แก้ไขไฟล์ /etc/update-manager/release-upgrades โดยเซ็ตค่า Prompt=normal
- upgrade ด้วยคำสั่ง sudo do-release-upgrade -d
- จากนั้นให้ทำตามคำแนะนำบนหน้าจอ
มีขั้นตอนดังนี้
อ้างอิง http://www.debuntu.org/how-to-monitor-your-servers-with-snmp-and-cacti
ติดตั้งบน Ubuntu 8.04
บทนำ
SNMP (Simple Network Management Protocol) เป็นโปรโตคอลสำหรับการจัดการเครือข่าย แต่ละ Entity ที่ถูกจัดการในเครือข่ายจะรัน snmp server (snmpd) ซึ่งจะรวบรวมข้อมูลจาก Server เช่น networking, load, cpu
ขั้นตอนการติดตั้งและคอนฟิก
ถ้าทุกอย่าง OK ก็ควรจะได้ผลประมาณต่อไปนี้ :
root@ubuntu-mail:~# snmpwalk -Os -c public -v 1 localhost system
sysDescr.0 = STRING: Linux ubuntu-mail 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (68957) 0:11:29.57
sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
sysName.0 = STRING: ubuntu-mail
sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)
sysORLastChange.0 = Timeticks: (0) 0:00:00.00
sysORID.1 = OID: snmpFrameworkMIBCompliance
sysORID.2 = OID: snmpMPDCompliance
sysORID.3 = OID: usmMIBCompliance
sysORID.4 = OID: snmpMIB
sysORID.5 = OID: tcpMIB
sysORID.6 = OID: ip
sysORID.7 = OID: udpMIB
sysORID.8 = OID: vacmBasicGroup
sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
sysORDescr.5 = STRING: The MIB module for managing TCP implementations
sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
sysORDescr.7 = STRING: The MIB module for managing UDP implementations
sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
sysORUpTime.1 = Timeticks: (0) 0:00:00.00
sysORUpTime.2 = Timeticks: (0) 0:00:00.00
sysORUpTime.3 = Timeticks: (0) 0:00:00.00
sysORUpTime.4 = Timeticks: (0) 0:00:00.00
sysORUpTime.5 = Timeticks: (0) 0:00:00.00
sysORUpTime.6 = Timeticks: (0) 0:00:00.00
sysORUpTime.7 = Timeticks: (0) 0:00:00.00
sysORUpTime.8 = Timeticks: (0) 0:00:00.00
root@ubuntu-mail:~#
จบครับ
Get Cacti and install it
Create a temporary folder
mkdir /cacti
cd /cacti/
Download Cacti Version 0.8.7 … web address may have changed
wget http://www.cacti.net/downloads/cacti-0.8.7.tar.gz
Unzip Download
tar xzvf cacti-0.8.7.tar.gz
Move folder to /usr/share/
mv /cacti/cacti-0.8.7 /usr/share/cacti
Set permissions on rra/ and log/ folders
cd /usr/share/cacti
chown -R www-data:www-data rra/ log/
Edit /etc/crontab and add the following line:
*/5 * * * * www-data php /usr/share/cacti/poller.php > /dev/null 2>&1
Restart Cron
/etc/init.d/cron restart
Edit /etc/php5/apache2/php.ini set memory_limit value:
memory_limit=128m
Configure Apache
Edit /etc/apache2/sites-avaliable/default change DocumentRoot value to:
DocumentRoot /usr/share/cacti
If you not to want to change DocumentRoot, you can create alias.
Restart Apache
/etc/init.d/apache2 restart
Setup MySql Database
Create the cacti database
mysqladmin -u root create cacti -p
Pipe Database Script in to mysql to create tables; cacti.sql can be found in the cacti folder
mysql cacti < cacti.sql -u root -p
Logon to mysql
mysql -u root -p
Setup cacti database permissions:
GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘somepassword‘;
flush privileges;
exit
Edit cacti config file for Mysql /usr/share/cacti/include/config.php:
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “somepassword“;
$database_port = “3306″;
“somepassword” This can be set to any password
Alright! If you made it this far cacti should be ready to go! Open browser and point it to your server. Default username/password is admin/admin.
สัญญาของ Ubuntu
บทนำ
การเพิ่มการ์ด LAN ใหม่ให้กับ Ubuntu ที่ไม่ได้ติดตั้งแบบ GUI อาจจะมีความยุ่งยากอยู่บ้าง จากประสบการณ์การเพิ่มการ์ดแลนใบใหม่ของผมของผมให้กับ Server ก็นำมาเผยแพร่ไว้ในที่นี้ครับ
วิธีการ
# The primary network interface
auto eth0
iface eth0 inet dhcp

โดยการ์ด LAN ที่เพิ่มขึ้นมาใหม่อาจจะเป็น eth1 หรือ eth2 ขึ้นอยู่กับว่าเราเสียบที่ slot ไหนของเครื่อง

จบครับ
มีขั้นตอนดังนี้
1. ใช้คำสั่ง
export http_proxy=http://202.6.107.10:8080/
2. ใช้คำสั่ง
apt-get update
ในกรณีที่จะยกเลิก CDROM ของ apt-get ให้แก้ไฟล์ /etc/apt/source.list ให้วาง # หน้า Deb cdrom แล้วสั่ง apt-get update