Apache之搭建动态网站(Discuz)

45 篇文章 5 订阅

一,导入discuz网站源码
1.logo
2.基础环境

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
systemctl stop firewalld.service
systemctl disable firewalld.service

3.安装LANP

yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd
systemctl start httpd mariadb
systemctl enable httpd mariadb

4.安装Discuz

wget http://download.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_UTF8.zip
mkdir -p /webroot/discuz
yum install -y unzip(可以提前下载)
unzip 包名(解压)
cp -rf upload/* /webroot/discuz/
chown -R apache.apache /webroot/discuz/    (授权)

二,Apache配置虚拟主机

vi   /etc/httpd/conf.d/discuz.conf
<VirtualHost *:80>
ServerName www.discuz.com
DocumentRoot /webroot/discuz
</VirtualHost>
<Directory "/webroot/discuz">
Require all granted
</Directory>
systemctl restart httpd

三,准备数据库

mysql

create database discuz;

四.客户端测试
1.域名解析

vi  /etc/hosts
添加
ip地址   www.discuz.com
ping www.discuz.com

再通过浏览器进行访问

2.测试网站可用性
(1)字符测试

yum install -y elinks
elinks http://www.discuz.org

(2)图形测试
通过火狐访问网站网址
在这里插入图片描述

如果没安装httpd,则请先安装
Apache之搭建静态网站
注意事项:
在写网站配置文件时要注意不要写中文注释进去,不然可能会在检查语法时通不过。

感谢大家,点赞,收藏,关注,评论!

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Cat God 007

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值