How to Install Cacti on Ubuntu

來源:互聯網
上載者:User

How to Install Cacti on Ubuntu Installation prerequisiteThe following packages are required to run Cacti properly Apache2[html] # apt-get install apache2  # apt-get install php5 php5-cli php5-mysql php5-snmp  MYSQL[html] # apt-get install mysql-server mysql-client  SNMP[html] # apt-get install snmp snmpd   RRDTool[html] # apt-get install rrdtool   Cacti User[html] # useradd -d /home/cactiuser -m cactiuser    InstallationDownload and decompress Cacti Package [python] # cd /usr/share  # wget http://www.cacti.net/downloads/cacti-0.8.7i.tar.gz  # gzip -d cacti-0.8.7i.tar.gz  # tar -xvf cacti-0.8.7i.tar  # mv cacti-0.8.7i cacti    Create cacti DB[python] #mysql -p  mysql> create database cacti   Import the default DB[html] mysql --user=root --password cacti < /usr/share/cacti/cacti.sql    Create Cacti user and set the right privileges to the database[html] # mysql --user=root --password     mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipwd';  mysql> flush privileges;  mysql> exit    Configure Cacti with DB user and pwd[html] # vim /usr/share/cacti/include/config.php     $database_type = "mysql";  $database_default = "cacti";  $database_hostname = "localhost";  $database_username = "cactiuser";  $database_password = "cactipwd";  $database_port = "3306";  $database_ssl = false;   Create Cacti Apache configuration file[html] # vim /etc/apache2/conf.d/cacti.conf     Alias /cacti /usr/share/cacti  <Directory /usr/share/cacti >  Options None  Allow from 127.0.0.1  Allow from All  </Directory>   Restart the apache webserver[html] #/etc/init.d/apache2 restart    Finally We can log into cacti website:http://IP/cacti(use "admin" as the default username and password) Add a line to your /etc/crontab file similar to[html] # vim /etc/cron.d/cacti  */5 * * * * cactiuser php /usr/share/cacti/poller.php > /dev/null 2>&1   Configure SNMPFor easy to let cacti to access and monitor other hosts we use below simple way to configure snmp file.[html] # vim /etc/snmp/snmpd.conf  rocommunity public  syslocation "Your Location"  syscontact admin@domain.com   Try to add host into Cacti and see the result.  Good luck!
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.