lamp上安装discuz

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了lamp上安装discuz相关的知识,希望对你有一定的参考价值。

[[email protected] ~]# mkdir /data/www  创建一个目录

[[email protected] ~]# cd /data/www     进入目录

[[email protected] www]# wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip

解压

[[email protected] www]# unzip Discuz_X3.2_SC_GBK.zip

程序文件会放于upload下,并全部移到www目录下,并且删除多余的文件。

[[email protected] www]# mv upload/* .

[[email protected] www]# rm -rf readme/ utility/ upload/ Discuz_X3.2_SC_GBK.zip

nginx的主配置文件,虚拟主机单独放于一个文件中

[[email protected] www]# vim /usr/local/apache2/conf/httpd.conf

Include conf/extra/httpd-vhosts.conf  前面的#取消掉

 

[[email protected] www]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf

删掉最下面的一个并修改第一个即可

    DocumentRoot "/data/www"

    ServerName www.test.com

    ServerAlias www.aaa.com

   # ErrorLog "logs/dummy-host.example.com-error_log"

    #CustomLog "logs/dummy-host.example.com-access_log" common

 

检查配置文件是否正确

[[email protected] www]# /usr/local/apache2/bin/apachectl -t

Syntax OK

Windows机器编辑hosts文件

C:\Windows\System32\drivers\etc

192.168.1.180 www.test.com www.aaa.com

如果不显示安装discuz时去主配置文件查看

vim /usr/local/apache2/conf/httpd.conf找到:

2.4版本的这样修改:
<Directory />
    AllowOverride none
    Require all denied
</Directory>

改为
<Directory />
    AllowOverride none
    Require all granted
</Directory>

 

 

修改成以上文件即可

然后检查配置文件和重启服务

[[email protected] www]# /usr/local/apache2/bin/apachectl -t

Syntax OK

[[email protected] www]# /usr/local/apache2/bin/apachectl restart

配置mysql,给Discuz!添加一个账号

[[email protected] www]# ps aux |grep http

root      1423  0.0  0.6  29540 11656 ?        Ss   22:39   0:00 /usr/local/apac                                      he2/bin/httpd -k start

daemon    1467  0.0  0.5  30440 10796 ?        S    23:07   0:00 /usr/local/apac                                      he2/bin/httpd -k start

daemon    1468  0.0  0.5  29540  9872 ?        S    23:07   0:00 /usr/local/apac                                      he2/bin/httpd -k start

编辑权限可读

[[email protected] www]# chown -R daemon config data uc_client/data uc_server/data

删除之前的系统的mysql

[[email protected] www]# rpm -qf /usr/bin/mysql

mysql-5.1.71-1.el6.i686

[[email protected] www]# yum remove mysql

添加MySQL

[[email protected] www]# /usr/local/mysql/bin/mysql

mysql> create database discuz;创建一个库

Query OK, 1 row affected (0.01 sec)

mysql> grant all on discuz.*to ‘guozhen‘@‘localhost‘identified by ‘guozhen123‘;

Query OK, 0 rows affected (0.01 sec)

技术分享

然后下一步完事


本文出自 “mr guo” 博客,谢绝转载!

以上是关于lamp上安装discuz的主要内容,如果未能解决你的问题,请参考以下文章

LAMP架构安装Discuz

LAMP架构安装Discuz

LAMP架构安装Discuz

LAMP架构安装Discuz

LAMP架构安装Discuz

LAMP架构下安装Discuz!论坛