阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

LAMP架构+Discuz论坛

120次阅读
没有评论

共计 4812 个字符,预计需要花费 13 分钟才能阅读完成。

操作系统: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

LAMP 架构 +Discuz 论坛
LAMP 架构 +Discuz 论坛

/usr/local/Apache/bin/apachectl restart

LAMP 架构 +Discuz 论坛

MySQL

cd /root/Desktop/LAMP/

tar -zxf mysql-5.0.18.tar.gz

cd mysql-5.0.18

./configure –help

vi INSTALL-SOURCE

只留如下内容:

LAMP 架构 +Discuz 论坛

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

LAMP 架构 +Discuz 论坛

LAMP 架构 +Discuz 论坛

或者:

第 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

LAMP 架构 +Discuz 论坛

LAMP 架构 +Discuz 论坛

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

Discuz:

cd /root/Desktop/LAMP/

unzip Discuz_7.2_FULL_SC_GBK.zip

cp -rupload/  /usr/local/apache/htdocs/ 或直接把安装包拿到 /usr/local/apache/htdocs/ 下解压

chmod 777 -R /usr/local/apache/htdocs/upload/

测试:在 linux-firefox 浏览器地址栏输入 http://127.0.0.1/upload/install(本机测试)

或在 win-IE 浏览器地址栏输入 http://xxx.xxx.xxx.xxx/upload/install  (支持中文,桥接 /NAT 模式)

进入 Discuz 论坛安装界面

LAMP 架构 +Discuz 论坛

搭建过程中遇到的问题:

1. 安装 MySQL,执行./INSTALL-SOURCE 时,遇到以下两种情况:

checking for g++… no

checking for c++… no

checking for gpp… no

checking for aCC… no

checking for CC… no

checking for cxx… no

checking for cc++… no

checking for cl… no

checking for FCC… no

checking for KCC… no

checking for RCC… no

checking for xlC_r… no

checking for xlC… No

  ……………..

configure: error: C++ preprocessor “/lib/cpp” fails sanity check

See `config.log’ for more details.

原因:未装 gcc 等编译工具

解决:# yum install gcc* - y 再./INSTALL-SOURCE

 

checking for tgetent in -lncurses… no              lncurses======>l : lib

checking for tgetent in -lcurses… No                    ==>ncurses: 库名(待装)

checking for tgetent in -ltermcap… no

checking for termcap functions library… configure: error: No curses/termcap library found

make: *** 没有指明目标并且找不到 makefile。停止。

make: *** 没有规则可以创建目标“install”。停止。

cp: 无法 stat“support-files/my-medium.cnf”: 没有那个文件或目录

./INSTALL-SOURCE: line 6: cd: /usr/local/mysql: 没有那个文件或目录

./INSTALL-SOURCE: line 7: bin/mysql_install_db: 没有那个文件或目录

chown: 无法访问“var”: 没有那个文件或目录

./INSTALL-SOURCE: line 11: bin/mysqld_safe: 没有那个文件或目录

原因:ncurses/curses/termcap 库没有安装

解决:

① 下载一个 ncurses-5.6.tar.gz,wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure –prefix=/usr –with-shared –without-debug
make
make install clean

② 或者 yum install ncurses* -y

再./INSTALL-SOURCE

操作系统: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

LAMP 架构 +Discuz 论坛
LAMP 架构 +Discuz 论坛

/usr/local/Apache/bin/apachectl restart

LAMP 架构 +Discuz 论坛

MySQL

cd /root/Desktop/LAMP/

tar -zxf mysql-5.0.18.tar.gz

cd mysql-5.0.18

./configure –help

vi INSTALL-SOURCE

只留如下内容:

LAMP 架构 +Discuz 论坛

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

LAMP 架构 +Discuz 论坛

LAMP 架构 +Discuz 论坛

或者:

第 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

LAMP 架构 +Discuz 论坛

LAMP 架构 +Discuz 论坛

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

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计4812字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中