顾乔芝士网

持续更新的前后端开发技术栈

实战项目搭建个人论坛网站(个人搭建论坛违法吗)

1.创建服务器ECS centos7.6

2.安装NGINX,并设置开机启动

wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum -y install nginx
systemctl start nginx


3.检查NGINX服务器

http://公网IP/


4.关闭NGINX服务器

systemctl stop nginx

5.安装PHP

1. 安装Apache服务器、PHPFastCGI管理器

yum install -y httpd php php-fpm php-server php-mysql

2. 启动httpd和php-fpm服务

systemctl start httpd

systemctl start php-fpm

3. 配置服务开机启动

systemctl enable httpd

systemctl enable php-fpm


6.下载Discuz安装包

wget http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zip

##解压#

unzip Discuz_X3.3_SC_UTF8.zip

##挪到新的路径

mv /root/upload/* /var/www/html

##修改权限

chmod -R 777 /var/www/html



7.安装Discuz

http://公网IP/

注意:

1.数据库Host选择内网时,保证数据库网段与服务器一致;

2.数据库Host选择公网时,服务器也需要有公网连接;







8.登录论坛网站,检验是否可以正常发帖

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言