LNMP环境搭建discuz
[root@instance-ie1sr8a3 html]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.2.1511 (Core)
Release: 7.2.1511
Codename: Core
下载安装包,并设置开启
wget http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zip
yum install -y nginx php-fpm php-gd php-freetype mariadb-server
yum install -y php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap
yum install php-tidy php-common php-devel php-fpm php-mysql
systemctl start nginx
systemctl start php-fpm
systemctl start mariadb
systemctl enable nginx
systemctl enable php-fpm
systemctl enable mariadb
数据库设置权限:(博客对星号会转义,不得不上图片)
mysqladmin -uroot -p password
初始没密码,直接回车后就让输入新的密码了
create database discuz character set utf8 collate utf8_bin;
LNMP环境搭建discuz
下载discuz安装包
wget http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zip
mkdir -p /usr/share/nginx/html/discuz
unzip Discuz_X3.3_SC_UTF8.zip -d /usr/share/nginx/html/discuz
cd /usr/share/nginx/html
mv /usr/share/nginx/html/discuz/upload/* .
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
vim /etc/nginx/nginx.conf
在对应位置添加以下内容
root html;
index index.php index.html index.htm;
}

location ~* .php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}

LNMP环境搭建discuz_第1张图片
测试php
vim /usr/share/nginx/html/info.php
phpinfo();
?>
本地浏览器地址栏输入ip/install开始安装
LNMP环境搭建discuz_第2张图片