6.启动服务:

服务器端

  1. /usr/local/zabbix/bin/zabbix_suckerd_ctl start  
  2.  

客户端

  1. /usr/local/zabbix/bin/zabbix_agentd_ctl start  
  2.  

7.--mysql

tar zxvf mysql-5.0.37.tar.gz

cd mysql-5.0.37

more INSTALL-SOURCE

groupadd mysql

useradd -g mysql mysql

passwd mysql

./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charsets=gb2312,latin1,utf8 --enable-largefile --with-big-tables --localstatedir=/usr/local/mysql/data --without-debug --with-max-indexes=64 --without-ndbcluster

make

make install

cp support-files/my-medium.cnf /etc/my.cnf

cp /root/mysql-5.0.37/support-files/mysql.server /usr/local/mysql/mysql

chmod +x /usr/local/mysql/mysql

cd /usr/local/mysql

bin/mysql_install_db --user=mysql

chown -R root .

chown -R mysql .

chgrp -R mysql .

chown mysql.mysql -R data

bin/mysqld_safe --user=mysql &

./bin/mysqladmin -u root password ***** (密码)

/usr/local/mysql/mysql restart

/usr/local/mysql/bin/mysql -uroot -p **** (密码) 登入mysql控制台看看是不是正常了

--apache

emerge gd

emerge jpeg

emerge zlib

emerge libpng

emerge freetype

tar zxvf httpd-2.2.4.tar.gz

cd httpd-2.2.4

./configure --prefix=/usr/local/httpd --enable-so --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr -with-zlib-dir=/usr --with-freetype-dir=/usr

make

make install

/usr/local/httpd/bin/apachectl start 如果没起来,看看日志:more /usr/local/httpd/logs/error_log,可能是这台机器80端口被别的程序(如resin)占用了,修改一下配置文件:

vi /usr/local/httpd/conf/httpd.conf

Listen 192.168.1.212:88

修改一下#ServerName www.example.com:88 为ServerName www.test.com:80

/usr/local/httpd/bin/apachectl restart 试试,应该就能访问了: http://192.168.1.212/ 能出来 It works! 的页面了

cd..

--php

emerge dev-libs/libxml

emerge dev-libs/libxml2 //如果没装libxml,则编译会出现configure: error: xml2-config not found.

tar zxvf php-5.2.1.tar.gz

cd php-5.2.1

./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql-dir=/usr/local/mysql --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr -with-zlib-dir=/usr --with-freetype-dir=/usr

make

make install

cp php.ini-dist /usr/local/lib/php.ini

vi /usr/local/httpd/conf/httpd.conf 手动添加:

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

#这两行是让apache知道php的文件类型

DirectoryIndex index.html 改成DirectoryIndex index.html index.php ,让apache默认的首页也支持index.php

echo '/usr/local/mysql/lib/mysql'>>/etc/ld.so.conf

ldconfig


相关内容