discuz 笔记

php 7 的yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

安装
yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel


discuz 提示 mysqli_connect() 不支持
修改php.ini
extension=msql.dll 去掉#号

---------------------------------------------------------------------------------

LNMP
1.安装epel源
[root@localhost ~]# yum -y install epel-release

2.php
yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel

glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl

openssl-devel libzip

yum -y install php php-mysql php-fpm
[root@localhost ~]# vim /etc/php-fpm.d/www.conf
user = nginx
group = nginx

[root@localhost php]# setfacl -m u:nginx:rwx session

3.nginx
[root@localhost ~]# yum install nginx -y

server {
listen 80;
server_name www.lh.com;

location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
}
[root@localhost conf.d]# mkdir /php/nginx/web/ -pv

[root@localhost web]# yum install lrzsz
[root@localhost web]# yum install unzip

[root@localhost nginx]# chown -R nginx:nginx web

4.mariadb
[root@localhost conf.d]# yum install mariadb-server mariadb
[root@localhost conf.d]# vim /etc/my.cnf
skip_name_resolve = on
innodb_file_per_table = on

[root@localhost conf.d]# systemctl start mariadb

MariaDB [(none)]> create database discuz default charset 'utf8';
MariaDB [(none)]> grant all on discuz.* to 'disuser'@'%' identified by 'khb123';


5.discuz
[root@localhost html]# git clone https://gitee.com/ComsenzDiscuz/DiscuzX.git
[root@localhost html]# cp -rf /php/nginx/discuz/DiscuzX/upload/* /usr/share/nginx/html/
[root@localhost html]# chown -R nginx:nginx /usr/share/nginx/html/

猜你喜欢

转载自www.cnblogs.com/centos-kang/p/12301665.html
今日推荐