NetPerSec 开源的 MRTG. 商业的 Solarwinds, WhatsUp Gold DU Meter 建议你现在使用 Cacti 一个替代 MRTG的软件 ×××××××××××××××××××× RedHat Linux AS 4 Cacti Install Guide: tar vxzf httpd-2.2.4.tar.gz cd httpd-2.2.4 ./configure --prefix=/usr/local/apache --enable-so make && make install /usr/local/apache/bin/apachectl start cp /usr/local/apache/bin/apachectl /etc/init.d/httpd chmod a+x /etc/init.d/httpd vi /etc/init.d/httpd 在第三行加入如下两行: # chkconfig: 345 85 15 # description: Starts and stops the Apache HTTP Server. 保存退出:wq chkconfig --add httpd groupadd mysql useradd -g mysql mysql tar vxzf mysql-5.0.37.tar.gz cd mysql-5.0.37 ./configure --prefix=/usr/local/mysql make make install cp support-files/my-medium.cnf /etc/my.cnf cp support-files/mysql.server /etc/init.d/mysql chmod a+x /etc/init.d/mysql chkconfig --add mysql chkconfig --level 3 mysql on cd /usr/local/mysql bin/mysql_install_db --user=mysql chown -R mysql.mysql /usr/local/mysql bin/mysqld_safe --user=mysql & tar vxzf php-5.2.0.tar.gz cd php-5.2.0 ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/php \ --with-mysql=/usr/local/mysql \ --with-zlib-dir=/usr/include \ --enable-sockets \ --with-gd make && make install cp php.ini-dist /usr/local/php/php.ini vi /usr/local/apache/conf/httpd.conf 加入: ###############for php and cacti################### AddType application/x-tar .tgz AddType application/x-httpd-php .php AddType image/x-icon .ico DirectoryIndex index.php index.html index.html.var #######################over######################## 保存退出:wq /usr/local/apache/bin/apachectl restart /usr/local/mysql/bin/mysql -uroot mysql> create database cacti; mysql> grant all on cacti.* to root; mysql> grant all on cacti.* to root@localhost; mysql> grant all on cacti.* to cactiuser; mysql> grant all on cacti.* to cactiuser@localhost; mysql> set password for cactiuser@localhost=password('cactipw'); mysql> exit; vi /usr/local/apache/htdocs/test.php phpinfo( ); ?> vi /usr/local/apache/htdocs/mysqltest.php $link=mysql_connect('localhost','root',''); mysql_select_db('mysql'); $str="select * from user;"; $result=mysql_query($str,$link); $show=mysql_num_rows($result); mysql_close($link); for ($i=0;$i < $show;$i++) { $arr[$i]=mysql_fetch_array($result); }; ?>
最新评论|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 ) GMT+8, 2024-10-1 17:32 , Processed in 0.131773 second(s), 12 queries , Gzip On, MemCache On. Powered by Discuz! X3.5 © 2001-2023 Discuz! Team. |