天我给大家讲一下apache+php+mysql是怎么整合在一起的。
apache
1 [url]http://httpd.apache.org[/url] 下载http2.0
httpd-2.2.4.tar.gz 和MD5校验码httpd-2.2.4.tar.gz.md5
2 md5sum -c httpd-2.2.4.tar.gz.md5 出现OK 表示正常
3 tar -zxvf httpd-2.2.4.tar.gz
4 cd httpd-2.2.4
5 ./configure --sysconfdir=/etc --enable-ssl --enable-modules
sysconfdir(说明主配置文件放在那),--enable-ssl (支持网页加密) --enable-modules(支持模块)
6 make ; make install (编译并且安装)]
7 /usr/local/apache2/bin/apachectl start (启动服务器)
8 echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.local (开机的时候自动启动apache服务器)
(说明:在启动apache服务器的时候,一定要保证主机名DNS能解析,例:改主机名 vi /etc/sysconfig/network 把hostname= 后面改成以域名的形式 例如:[url]www.yirehe.com[/url] 但要保证DNS能解析的
在做实验的时候,vi /etc/hosts 例如加入 192.168.0.123 [url]www.yirehe.com[/url] www 这样才能启动服务器)