Chinaunix首页 | 论坛 | 博客
  • 博客访问: 391010
  • 博文数量: 89
  • 博客积分: 3176
  • 博客等级: 中校
  • 技术积分: 1205
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-15 10:08
文章分类

全部博文(89)

文章存档

2011年(17)

2010年(19)

2009年(35)

2008年(18)

分类: 网络与安全

2008-07-11 11:24:05

环境说明:
RHEL4_U4_i686
cacti-0.8.7b.tar.gz
gd-2.0.33.tar.gz
httpd-2.2.9.tar.gz
mysql-5.0.40.tar.gz
php-5.2.6.tar.gz
rrdtool-1.2.27.tar.gz
######################################################################

1.  mysql安装
./configure --prefix=/usr/local/mysql \
            --enable-thread-safe-client
make
make install
groupadd mysql
useradd -g mysql mysql
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
rm -f /etc/my.cnf
cp support-files/my-medium.cnf /etc/my.cnf
echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf
echo /usr/local/lib >> /etc/ld.so.conf
ldconfig –v
cp support-files/mysql.server /etc/rc.d/init.d/mysql
chmod 500 /etc/rc.d/init.d/mysql
/usr/local/mysql/bin/mysqld_safe --user=mysql &
Echo
cp support-files/mysql.server /etc/init.d/mysql
cd /etc/init.d/
chmod 755 mysql
cd /etc/rc3.d/
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd /etc/rc5.d/
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
 
######################################################################

2. apache安装
cd $APACHE_SRC_DIR/srclib/apr
./configure --prefix=/usr/local/apr/
make clean
make
make install
cd $APACHE_SRC_DIR/srclib/apr-util
./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr/
make clean
make
make install
cd $APACHE_SRC_DIR
./configure --prefix=/usr/local/apache229 \
            --with-apr=/usr/local/apr \
            --with-apr-util=/usr/local/apr-util \
            --with-mpm=worker \
            --enable-so \
            --enable-mods-shared=all \
            --enable-proxy=shared \
            --enable-proxy-balancer=shared \
            --enable-proxy-http=shared \
            --enable-proxy-ajp \
            --enable-deflate \
            --enable-cache \
            --enable-disk-cache \
            --enable-mem-cache
make
make install
cp /usr/local/apache229/bin/apachectl /etc/rc.d/init.d/httpd
chmod 755 /etc/rc.d/init.d/httpd
cp /usr/local/apache229/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d/
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
cd /etc/rc5.d/
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
service httpd start &
 

######################################################################

3.PHP安装
[root@localhost php-5.2.6]# ./configure --prefix=/usr/local/apache229/php \
                            --with-apxs2=/usr/local/apache229/bin/apxs \
                            --with-config-file-path=/usr/local/apache229/php \
                            --enable-sockets \
                            --with-mysql=/usr/local/mysql5040 \
                            --with-zlib-dir=/usr/include \
                            --with-gd
make
make install
 
测试PHP
touch test.php
Phpinfo();
?>
 
echo ####################### >> /usr/local/apache229/conf/httpd.conf;
echo # Added via Lee Carter's Script >> /usr/local/apache229/conf/httpd.conf;
echo ####################### >> /usr/local/apache229/conf/httpd.conf;
echo AddType application/x-tar .tgz >> /usr/local/apache229/conf/httpd.conf;
echo AddType application/x-httpd-php .php >> /usr/local/apache229/conf/httpd.conf;
echo AddType image/x-icon .ico >> /usr/local/apache229/conf/httpd.conf;
echo DirectoryIndex index.php index.html index.html.var >> /usr/local/apache229/conf/httpd.conf
 
######################################################################
 

4. database安装
cd /cacti-install
groupadd cacti
useradd -g cacti cactiuser
/usr/local/mysql/bin/mysql
mysql> set password for );
mysql> create database cactidb;
mysql> grant all on cactidb.* to root;
mysql> grant all on cactidb.* to ;
mysql> grant all on cactidb.* to cactiuser;
mysql> grant all on cactidb.* to ;
mysql> set password for );
mysql> exit
 

######################################################################
 
5. rrdtool安装
./configure --prefix=/usr/local/rrdtool --disable-tcl
#报错
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of libart-2.0. Check config.log for hints on why
  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
  so that compiler and the linker can find libart_lgpl_2 and its header files. If
  you have not installed libart-2.0, you can get it either from its original home on
    
  You can find also find an archive copy on
    
  The last tested version of libart-2.0 is 2.3.17.
       LIBS=-lm
   LDFLAGS=
  CPPFLAGS= -I/usr/include/libart-2.0

configure: error: Please fix the library issues listed above and try again.

-----------------------------------------------------------------------------

#解决
wget 
./configure
make
make install
ln -s /usr/local/include/libart-2.0/ /usr/include/libart-2.0
#重新编译rrdtool,问题结局

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

make
make install
 
######################################################################
 

snmp安装
net-snmp-libs...
net-snmp...
net-snmp-perl...
net-snmp-utils...
 
######################################################################
 
 
cacti安装

tar zxvf cacti-0.8.7b.tar.gz
mv cacti-0.8.7b /usr/local/apache229/htdocs/cacti
cd /usr/local/apache229/htdocs/cacti
/usr/local/mysql/bin/mysql --user=root --password=rootpw cactidb < cacti.sql
chown -R cactiuser rra/ log/
edit /www/htdocs/cacti/include/config.php
$database_defaut = “cactidb”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipw”;
 
######################################################################
 
为cactiuser创建crontab
su cactiuser
crontab -e
*/5 * * * * /usr/local/apache229/php/bin/php /usr/local/apache229/htdocs/cacti/poller.php > /dev/null 2>&1
service crond restart
阅读(938) | 评论(0) | 转发(0) |
0

上一篇:find 命令详解

下一篇:正规表达式

给主人留下些什么吧!~~