一、LNMP:
L:linux 操作系统
N:nginx前端页面的web服务
P:PHP,是一种开发动态页面的编程语言,解析动态页面,起到中间件的作用(在nginx和数据库的中间),在中间沟通nginx和数据库,以请求数据库上的信息。
M:mysql数据库,保存用户的密码,以及论坛的相关内容。

二、创建数据库及安装php、discuz论坛
1.创建程序用户管理

- 修改配置文件

vim /etc/my.cnf的配置文件
[client]
port = 3306
socket=/usr/local/mysql/mysql.sock
[mysqld]
user = mysql
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
port = 3306
character-set-server=utf8
pid-file = /usr/local/mysql/mysqld.pid
socket=/usr/local/mysql/mysql.sock
bind-address = 0.0.0.0
skip-name-resolve
max_connections=2048
default-storage-engine=INNODB
max_allowed_packet=16M
server-id = 1
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
3.设置环境变量,申明/宣告mysql命令便于系统识别

- 初始化数据库

5.设置系统识别,进行操作

- 初始化数据库密码

7.进入数据库:建立用户并且创建密码
8.php安装

9

10

11

12

vim /usr/local/php/lib/php.ini

13
14




