cd /tmp
mkdir cactiupgrade
cd cactiupgrade
wget http://www.cacti.net/downloads/cacti-0.8.7i-PIA-3.1.tar.gz
tar -xvzf cacti-0.8.7i-PIA-3.1.tar.gz
cat /var/www/html/include/config.php | grep database_password
mysqldump -l -u cactiuser -p --add-drop-table cacti > mysql.cacti
ls -al
mv /var/www/html /var/www/html_old
mv cacti-0.8.7i-PIA-3.1 /var/www/
mv /var/www/cacti-0.8.7i-PIA-3.1 /var/www/html
cat /var/www/html_old/include/config.php | grep database_type
cat /var/www/html/include/config.php | grep database_type
cat /var/www/html_old/include/config.php | grep database_default
cat /var/www/html/include/config.php | grep database_default
cat /var/www/html_old/include/config.php | grep database_hostname
cat /var/www/html/include/config.php | grep database_hostname
cat /var/www/html_old/include/config.php | grep database_username
cat /var/www/html/include/config.php | grep database_username
cat /var/www/html_old/include/config.php | grep database_password
cat /var/www/html/include/config.php | grep database_password
vi /var/www/html/include/config.php
cp --reply=yes /var/www/html_old/rra/* /var/www/html/rra/
cp -u /var/www/html_old/scripts/* /var/www/html/scripts/
cp -u -R /var/www/html_old/resource/* /var/www/html/resource/
mv /var/www/html_old/plugins/index.php /var/www/html_old/plugins/index.php.old
cp -u -R /var/www/html_old/plugins/* /var/www/html/plugins/
chown -R apache.apache /var/www/html
wget http://docs.cacti.net/_media/plugin:settings-v0.71-1.tgz
mv plugin\:settings-v0.71-1.tgz settings-v0.71-1.tgz
tar -zxvf settings-v0.71-1.tgz
mv settings /var/www/html/plugins/
wget http://docs.cacti.net/_media/plugin:thold-v0.4.9-3.tgz
mv plugin\:thold-v0.4.9-3.tgz thold-v0.4.9-3.tgz
tar -zxvf thold-v0.4.9-3.tgz
mv thold /var/www/html/plugins/
wget http://docs.cacti.net/_media/plugin:aggregate-v0.75.tgz
mv plugin\:aggregate-v0.75.tgz aggregate-v0.75.tgz
tar -zxvf aggregate-v0.75.tgz
mv aggregate /var/www/html/plugins/
wget http://docs.cacti.net/_media/plugin:boost-v5.1-1.tgz
mv plugin\:boost-v5.1-1.tgz boost-v5.1-1.tgz
tar -zxvf boost-v5.1-1.tgz
mv boost /var/www/html/plugins/
wget http://docs.cacti.net/_media/plugin:realtime-v0.5-2.tgz
mv plugin\:realtime-v0.5-2.tgz realtime-v0.5-2.tgz
tar -zxvf realtime-v0.5-2.tgz
mv realtime /var/www/html/plugins/
wget http://docs.cacti.net/_media/plugin:clog-v1.7-1.tgz
mv plugin\:clog-v1.7-1.tgz clog-v1.7-1.tgz
tar -zxvf clog-v1.7-1.tgz
mv clog /var/www/html/plugins
wget http://docs.cacti.net/_media/plugin:syslog-v1.22-2.tgz
mv plugin\:syslog-v1.22-2.tgz syslog-v1.22-2.tgz
tar syslog-v1.22-2.tgz
tar -zxvf syslog-v1.22-2.tgz
mv syslog /var/www/html/plugins/
mysql -u cactiuser -p cacti < /var/www/html/plugins/syslog/syslog.sql
留言列表