linux下搭建discuz论坛

来源:互联网 发布:12315可以投诉淘宝官方 编辑:程序博客网 时间:2024/06/07 03:40

论坛搭建

环境搭建

Linux+Apache+MySQL+PHP环境,推荐使用XAMPP下载地址:
http://www.apachefriends.org/zh_cn/xampp-linux.html

Linux下,cd /opt ,我们把集成环境下载到opt目录下:

[root@wuse opt]# wget https://www.apachefriends.org/xampp-files/5.6.31/xampp-linux-x64-5.6.31-0-installer.run
[root@wuse opt]# chmod 755 xampp-linux-x64-5.6.31-0-installer.run
[root@wuse opt]# sh ./xampp-linux-x64-5.6.31-0-installer.run./xampp-linux-x64-5.6.31-0-installer.run: ./xampp-linux-x64-5.6.31-0-installer.run: cannot execute binary file[root@wuse opt]# sudo ./xampp-linux-x64-5.6.31-0-installer.run 

一路Y就安装好了…….

启动XAMPP

[root@wuse opt]#/opt/lampp/lampp startStarting XAMPP for Linux 5.6.21-0...  XAMPP: Starting Apache...fail.  XAMPP:  Another web server is already running.  XAMPP: Starting MySQL...ok.  XAMPP: Starting ProFTPD...ok. 

apache start fail了,估计是80端口被占用了,查看一下:

[root@wuse opt]# netstat -anp | grep 80 | grep LISTEN  tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      3613/(squid)  tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      3613/(squid)

查了80端口,被pid为3613的进程给占用了,kill掉。

停止XAMPP

[root@wuse opt]#/opt/lampp/lampp stop

卸载XAMPP

[root@wuse opt]#/opt/lampp/lampp stop[root@wuse opt]#rm -rf /opt/lampp

常见问题

1、我的XAMPP环境搭建在阿里云上,启动xampp后,从本地浏览器访问 http://(阿里服务器公网IP) 失败
a、初步怀疑是xampp配置问题,修改xampp配置文件:

vim /opt/lampp/etc/extra/httpd-xampp.conf
如如下代码段中 将Require Local 修改替换为 Require all granted

...# since XAMPP 1.4.3<Directory "/opt/lampp/phpmyadmin">    AllowOverride AuthConfig Limit    Require all granted //Require Local    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var</Directory>...

b、阿里云的配置问题,安全组未开放80端口

安全组作用是:类似防火墙功能,用于设置网络访问控制,可以到管理控制台修改。
开放网站需要的80端(默认的安全组,只开放了22和3389端口)
这里写图片描述
这里写图片描述
这里写图片描述

再次在本地通过浏览器访问成功

部署discuz

1、下载。官网地址:http://www.discuz.net/forum-10-1.html

2、将upload文件夹下的所有文件上传至 /opt/lampp/htdocs 目录

3、将htdocs下面所有的文件属性修改为可读、可写

chmod -R 777 /opt/lampp/htdocs/*
原创粉丝点击