操作系统:RedHatEnterpriseLinuxServer5.6-i386
内核 :2.6.18-238.el5
Linux浏览器:firefox (不支持中文,就换成win下普通浏览器来进行Dicuz论坛的安装)
安装包:/root/Desktop/LAMP/httpd-2.0.64.tar.gz
/root/Desktop/LAMP/MySQL-5.0.18.tar.gz
/root/Desktop/LAMP/php-5.2.8.tar.bz2
/root/Desktop/LAMP/Discuz_7.2_FULL_SC_GBK.zip
安装位置:/usr/local/apache
/usr/local/mysql
/usr/local/php
注意 :卸载之前已经安装过的apache mysql php
Apache
cd /root/Desktop/LAMP/
tar -zxf httpd-2.0.64.tar.gz
cd httpd-2.0.64
./configure --prefix=/usr/local/apache/(会自动生成/usr/local/Apache/这个目录)
make && make install
/usr/local/apache/bin/apachectlrestart
cd /usr/local/apache/htdocs/
rm -rf *
vi index.html
/usr/local/Apache/bin/apachectl restart
MySQL
cd /root/Desktop/LAMP/
tar -zxf mysql-5.0.18.tar.gz
cd mysql-5.0.18
./configure --help
vi INSTALL-SOURCE
只留如下内容:
chmod 777./INSTALL-SOURCE(权限与开发商议)
./INSTALL-SOURCE
PHP:
cd /root/Desktop/LAMP/
tar -jxf php-5.2.8.tar.bz2
cd php-5.2.8
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql/
--with-apxs2=/usr/local/apache/bin/apxs
make && make install
php装完,再修改apache:
vi /usr/local/apache/conf/httpd.conf
或者:
第844行添加:AddType application/x-httpd-php .php
第395行补上:DirectoryIndex index.html index.html.var index.php
cd /usr/local/apache/htdocs/
rm -rf *
vi index.php
<?php
phpinfo();
?>
/usr/local/apache/bin/apachectl start
测试:在linux-firefox浏览器地址栏输入localhost/index.php
Ubuntu 13.04 安装 LAMP\Vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm
CentOS 5.9下编译安装LAMP(Apache 2.2.44+MySQL 5.6.10+PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm
RedHat 5.4下Web服务器架构之源码构建LAMP环境及应用PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm
LAMP源码环境搭建WEB服务器Linux+Apache+MySQL+PHP http://www.linuxidc.com/Linux/2013-05/84882.htm