Centos环境下搭建discuz
时间:2023-08-04 00:15:02 | 来源:网站运营
时间:2023-08-04 00:15:02 来源:网站运营
Centos环境下搭建discuz:cento环境总结
yum repolist 查看是否装yum
yum install -y wget
wget
http://......
yum install -y httpd php php-fpm php-mysql mariadb mariadb-server git
systemctl start httpd
systemctl start mariadb(有数据库这一步会报错)
systemctl start php-fpm
mysql_secure_installation
mysql -t root -p 进入mysql(/q退出)
验证环境
vim /var/www/html/test.php (vi)
编辑 <?php echo "<tille>Test Page</tille>"; phpinfo()?>
http://43.248.136.129/test.php 验证
下载discuz或别的网站:
cd /var/www/htm
wget http://所需要的网站链接
解压:zip用unzip 文件名直接解压到当前文件夹
(.tar:tar -xvf .gz:gizp -d/gunzip .......)
将reload下的文件放到html下
用:cp -r upload/* /var/www/html/
chmod -R 777 /var/www/html
重启http:systemctl restart httpd
防火墙放行:
# setenforce 0 临时访问 (vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=permissive)
# sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
# systemctl stop firewalld
# systemctl disable firewalld
wget
http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip --no-check-certificate
discuz网址下载
mariadb 报错问题:
rpm -qa | grep mariadb 搜索现有安装包
yum remove mysql mysql-server mysql-libs compat-mysql151 删除
yum install -y mariadb mariadb-server
..........
设置密码
mysql_secure_installation
mysql -u root -p
安装discuz报advice_mysqli_conect错误
yum -y install php-mysql
yum install php-tidy php-devel php-fpm
重启
IP地址的添加修改
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:0 (复制eth0文件)
DEVICE=eth0:0 添加文件名
ONBOOT=yes 是否开机开启
BOOTPRT0=static
.......
systemctl restart netwaork.service重启网络服务
注释:本文运用的服务器为Centos7.6系统,用的是3a服务器挺稳定的有兴趣了解一下:
http://iis3.com/