二维码

在Centos6.5中安装discuz3.4过程

1508 人阅读 | 时间:2019年10月16日 15:59

discuz3.4:在Centos6.5中安装过程

参考文章:https://www.cnblogs.com/hehongbin/articles/5741270.html

https://www.cnblogs.com/mitang/p/5524540.html 

https://www.cnblogs.com/feng18/p/5148985.html

http://blog.csdn.net/changzhi1990/article/details/40983247

https://jingyan.baidu.com/article/870c6fc3304c8ab03fe4bec2.html

http://www.discuz.net/thread-3602591-1-1.html

在此一并表示感谢!

1.安装php环境

#查看PHP是否已经安装

yum list installed | grep php

在Centos6.5中安装discuz3.4过程

#版本比较旧,删除已经安装的PHP

yum remove php.x86_64 php-cli.x86_64 php-common.x86_64

在Centos6.5中安装discuz3.4过程

#设置RPM源

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

在Centos6.5中安装discuz3.4过程

#安装PHP

yum -y install php56w.x86_64

yum -y install php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64  php56w-mysql.x86_64 php56w-devel.x86_64 php56w-pdo.x86_64 php56w-opcache.x86_64

yum -y install php56w-fpm

#修改配置文件

vi /etc/php.ini

取消注释 extension_dir ,并设置为: "/usr/lib64/php/modules/"

在Centos6.5中安装discuz3.4过程

#启动php

chkconfig php-fpm on

service php-fpm start

2.上传discuz安装包

#建立目录,也可以直接部署到html目录中

mkdir /usr/local/nginx/html/bbs

前往:https://gitee.com/ComsenzDiscuz/DiscuzX/attach_files 下载discuz

在Centos6.5中安装discuz3.4过程

将 Discuz_X3.4_GIT_SC_UTF8.zip 解压 (TC为繁体中文版),并将其中upload目录下的所有文件上传到前面建立的BBS中,上传结果如下:

在Centos6.5中安装discuz3.4过程

3.配置nginx

在Centos6.5中安装discuz3.4过程

#BBS论坛

server

{

        listen 80;

        server_name bbs.test.net;

        index index.html index.htm index.php;

        root /usr/local/nginx/html/bbs;

        location ~ \.php$ {

                include fastcgi_params;

                fastcgi_pass 127.0.0.1:9000;

                fastcgi_index index.php;

                fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/bbs$fastcgi_script_name;

        }

}

在Centos6.5中安装discuz3.4过程

注意红色部分:

127.0.0.1:9000,这个里面的ip是指php安装机器,端口号是php的配置文件中规定的,一般不用修改

more /etc/php-fpm.d/www.conf

在Centos6.5中安装discuz3.4过程

/bbs是前面建立的BBS目录,如果直接放到html中就不需要。

#重启nginx

pkill -f "nginx"

/usr/local/nginx/sbin/nginx

4.安装discuz

访问上面配置的域名(配置时也可以不用域名,直接用localhost或IP都可以),http://bbs.test.net/install,显示界面如下:

在Centos6.5中安装discuz3.4过程

后面根据界面提示一步步配置就可以了

安装完毕后,记得一定要删除install目录或者删除install下面的index.php

cd /usr/local/nginx/html/bbs

rm -rf ./install


©著作权归作者所有:来自ZhiKuGroup博客作者没文化的原创作品,如需转载,请注明出处,否则将追究法律责任 来源:ZhiKuGroup博客,欢迎分享。

评论专区
  • 昵 称必填
  • 邮 箱选填
  • 网 址选填
◎已有 0 人评论
搜索
作者介绍
30天热门
×
×
本站会员尊享VIP特权,现在就加入我们吧!登录注册×
»
会员登录
新用户注册
×
会员注册
已有账号登录
×