您的位置:首页 > 运维架构 > 网站架构

LAMP架构+Discuz论坛

2014-04-06 15:25 549 查看
操作系统: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







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论坛安装界面




搭建过程中遇到的问题:
1.安装mysql,执行./INSTALL-SOURCE时,遇到以下两种情况:
checking for g++... nochecking for c++... nochecking for gpp... nochecking for aCC... nochecking for CC... nochecking for cxx... nochecking for cc++... nochecking for cl... nochecking for FCC... nochecking for KCC... nochecking for RCC... nochecking for xlC_r... nochecking for xlC... No .................configure: error: C++ preprocessor "/lib/cpp" fails sanity checkSee `config.log' for more details.原因:未装gcc等编译工具解决:# yum install gcc* -y再./INSTALL-SOURCE
checking for tgetent in -lncurses... no lncurses======>l : libchecking for tgetent in -lcurses... No ==>ncurses: 库名(待装)checking for tgetent in -ltermcap... nochecking for termcap functions library... configure: error: No curses/termcap library foundmake: *** 没有指明目标并且找不到 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

附件:http://down.51cto.com/data/2364265
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息