LAMP架构+Discuz论坛
操作系统: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
相关推荐
全文使用的环境如题,主机使用的是腾讯云主机。内容应该会是linux和apache这些所有部分都有一点,因为是遇见一个问题就记录一个。 尝试清除浏览器缓存/换一个浏览器验证/重启服务器的apache服务