1. 安装Apahce, PHP,以及php连接mysql库组件。
yum -y install httpd php php-mysql
2. 配置开机启动服务
/sbin/chkconfig httpd on [设置apache服务器httpd服务开机启动]
/sbin/chkconfig --add mysqld [在服务清单中添加mysql服务]
/sbin/chkconfig mysqld on [设置mysql服务开机启动]
/sbin/service httpd start [启动httpd服务,与开机启动无关]
3.
//安装apache扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
//安装php的扩展
yum install php-gd
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
4.apache的配置文件是/etc/httpd/conf下
modules放在/usr/lib/httpd下
php的配置文件在/etc/php.d/下和/etc/php.ini
php的modules放在/usr/lib/php/modules下
apache 默认支持php
配置zendoptimizer-3.3.3 cd 目录install 安装过程指定httpd控制文件/etc/rc.d/init.d/httpd路径/etc/httpd
配置cronolog进行日志分割下载http://www.doczj.com/doc/370ab13743323968001c9207.html/download/index.html./configure --prefix /usr/local/cronologmakemake install即可httpd-vhost.conf中的日志设置项可以为:ErrorLog “|/usr/local/cronolog/sbin/cronolog
/home/www/apache_logs/http://www.doczj.com/doc/370ab13743323968001c9207.html-error_log%Y%m%d" CustomLog |/usr/local/cronolog/sbin/cronolog /home/www/apache_logs/http://www.doczj.com/doc/370ab13743323968001c9207.html-access_log%Y%m%d"
combined
mount -t nfs 192.168.0.252:/home/www/wwwroot/bbs /home/www/wwwroot/bbs
出现:Document root must be a directory解决办法?关闭selinux setenforce 0