首页 > 其他 > 详细

LAMP架构+Discuz论坛

时间:2014-04-06 20:53:39      阅读:652      评论:0      收藏:0      [点我收藏+]

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

bubuko.com,布布扣

                   /usr/local/Apache/bin/apachectl restart

bubuko.com,布布扣


Mysql

cd /root/Desktop/LAMP/

tar -zxf mysql-5.0.18.tar.gz

cd mysql-5.0.18

              ./configure --help

              vi INSTALL-SOURCE

只留如下内容:

bubuko.com,布布扣

              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

bubuko.com,布布扣

                            或者:

                               第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

bubuko.com,布布扣

bubuko.com,布布扣



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

bubuko.com,布布扣





搭建过程中遇到的问题:

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.gzwget 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

















本文出自 “8603154” 博客,请务必保留此出处http://8613154.blog.51cto.com/8603154/1391127

LAMP架构+Discuz论坛,布布扣,bubuko.com

LAMP架构+Discuz论坛

原文:http://8613154.blog.51cto.com/8603154/1391127

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!