centos6.3安装cacti完整实录

本文发布时间: 2019-Mar-22
1. 安装必要的工具yum install -y wget gcc gcc-c++ autoconf make zlib zlib-devel openssl openssl-devel cmake ncurses ncurses-devel bison libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gd gd-devel net-snmp* rrdtool rrdtool-devel2. 下载必要的安装包wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gzwget http://nginx.org/download/nginx-1.3.11.tar.gzwget http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.29.tar.gzwget http://cn2.php.net/distributions/php-5.4.10.tar.gzwget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gzwget http://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gzwget http://nchc.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gzwget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gzwget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz3. 安装NGINXgroupadd wwwuseradd -g www wwwtar zxf pcre-8.32.tar.gzcd pcre-8.32./configuremake && make installcd ../ln -s /usr/local/lib/libpcre.so.1 /usr/lib/tar zxf nginx-1.3.11.tar.gzcd nginx-1.3.11./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_modulemake && make installcd ../4. 安装MYSQLgroupadd mysqluseradd -g mysql mysqltar zxf mysql-5.5.29.tar.gzcd mysql-5.5.29cmake -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/usr/local/webserver/mysql/data -DMYSQL_UNIX_ADDR=/usr/local/webserver/mysql/logs -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_READLINE=1make && make installcd ../chown -R mysql:mysql /usr/local/webserver/mysql//usr/local/webserver/mysql/scripts/mysql_install_db --basedir=/usr/local/webserver/mysql --datadir=/usr/local/webserver/mysql/data/ --user=mysql5. 安装PHPtar zxf libiconv-1.14.tar.gzcd libiconv-1.14./configuremake && make installcd ../tar zxf mhash-0.9.9.9.tar.gzcd mhash-0.9.9.9./configuremake && make installcd ../tar zxf libmcrypt-2.5.7.tar.gzcd libmcrypt-2.5.7make && make install/sbin/ldconfigcd libltdl/./configure --enable-ltdl-installmake && make installcd ../../ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.laln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.soln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4ln -s /usr/local/lib/libmcrypt.so.4.4.7 /usr/lib/libmcrypt.so.4.4.7ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.aln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.laln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.soln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-configtar zxf mcrypt-2.6.8.tar.gzcd mcrypt-2.6.8/sbin/ldconfig./configuremake && make install cd ../tar zxf php-5.4.10.tar.gzcd php-5.4.10./configure --prefix=/usr/local/webserver/php --with-mysql=/usr/local/webserver/mysql --with-pdo-mysql=/usr/local/webserver/mysql --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libxml-dir --with-openssl --with-kerberos --with-pcre-regex --with-zlib --with-curl --with-snmp --enable-soap --enable-sockets --enable-pcntl --enable-mbstring --with-ldap --with-ldap-sasl --with-freetype-dir --with-jpeg-dir --with-png-dir --with-mhash --with-mcrypt --with-gd --enable-bcmath --enable-shmop --enable-inline-optimization --enable-zipmake ZEND_EXTRA_LIBS='-liconv'make installcd ../6. 安装CACTItar zxf cacti-0.8.8a.tar.gzcd cacti-0.8.8a/usr/local/webserver/mysql/bin/mysqladmin --user=root create cacti/usr/local/webserver/mysql/bin/mysql -uroot cacti < cacti.sqlecho "grant all privileges on cacti.* to [email protected] identified by 'cacti';"|/usr/local/webserver/mysql/bin/mysqlecho "flush privileges;"|/usr/local/webserver/mysql/bin/mysqlEdit 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 = "cacti";$database_password = "cacti";cd ../mv cacti-0.8.8a /usr/local/webserver/nginx/html/cactichown -R www:www /usr/local/webserver/nginx/html/cactiAdd a line to your /etc/crontab file similar to:*/5 * * * * www /usr/local/webserver/php/bin/php /usr/local/webserver/nginx/html/cacti/poller.php > /dev/null 2>&1


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2019-May-25 12:58pm
栏目列表