linux cacti
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-04-29
Chapter 2. Installing Under Unix Please make sure, the following packages are installed according to your operating systems requirements. Verify, that httpd and mysqld are started at system startup. 2.1. Required Packages for RPM-based Operating Systems • httpd • php • php-mysql • php-snmp • mysql • mysql-server • net-snmp 2.2. Ports for FreeBSD • www/apache2 • net/rrdtool • net/net-snmp • www/php4-cgi • lang/php4 (With MySQL and SNMP Support) • databases/mysql323-server 2.3. Configure PHP Please find the file /etc/php.ini and make the following changes to it: extension_dir = /etc/php.d This will enable PHP to find more configuration directives in that very directory. Activate the MySQL extension via /etc/php.d/mysql.ini ; Enable mysql extension module extension=mysql.so Activate the SNMP extension via /etc/php.d/snmp.ini ; Enable snmp extension module extension=snmp.so If using PHP 4.3.5 or less include the following line. If using 4.3.6 or greater, you should remove this line if present. session.save_path=/tmp If you want to allow template importing, uncomment the following line: file_uploads = On 2.4. Configure the Webserver (Apache) If you are using Apache 1.3.x, installation of PHP 5 is not recommended. Please find the file /etc/httpd/conf/httpd.conf or equivalent and make the following changes to it: # Load config files from the config directory "/etc/httpd/conf.d". 2 Chapter 2. Installing Under Unix Include conf.d/*.conf Now, please locate the PHP configuration file at /etc/httpd/conf.d/php.conf If using PHP 5, then add the following lines. # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. LoadModule php5_module modules/libphp5.so # # Cause the PHP interpreter to handle files with a .php extension. AddHandler php5-script .php AddType text/html .php # # Add index.php to the list of files that will be served as directory # indexes. DirectoryIndex index.php 2.5. Configure MySQL Set a password for the root user shell> mysqladmin --user=root password somepassword shell> mysqladmin --user=root --password reload 2.6. Install and Configure Cacti 1. Extract the distribution tarball. shell> tar xzvf cacti-version.tar.gz 2. Create the MySQL database: shell> mysqladmin --user=root create cacti 3. Import the default cacti database: shell> mysql cacti < cacti.sql 4. Optional: Create a MySQL username and password for Cacti. shell> mysql --user=root mysql mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ’somepassword’; mysql> flush privileges; 5. Edit include/config.php and specify the database type, name, host, user and password for your Cacti configuration. $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cacti"; 6. Set the appropriate permissions on cacti’s directories for graph/log generation. You should execute these comman |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: grub学习笔记二(引导配置篇)下一篇: lighttpd服务下防盗链设置
关于linux cacti的所有评论