UBANTU搭建LNMP环境

# 安装mysql 5.7
$ dpkg -i mysql-apt-config_0.8.11-1_all.deb
#将mysql版本改为5.7
$ apt-get update
$ apt-get install mysql-server
#此处会要求填写root密码
$ mysql -u root -p #输入root密码登录
$ create user ‘fujia_finance’@’localhost’ identified by ‘S%Wh0W134oYs’;
$ quit
#安装nginx
$ apt-get install nginx
#安装php及其依赖项
$ add-apt-repository ppa:ondrej/php
$ apt-get update
$ apt-get install php7.2 php7.2-dev redis (add-apt-repository universe)
$ apt-get install php7.2-fpm php7.2-common php7.2-json php7.2-curl php7.2-opcache php7.2-mysql php7.2-mbstring  php7.2-zip php7.2-imap php7.2-gd php7.2-soap php7.2-xmlrpc php7.2-xml  libpcre3 php-redis
$ phpenmod sysvmsg sysvsem sysvshm mysqlnd mysqli pdo_mysql imap gd curl zip ftp sockets xmlrpc xml ctype redis mbstring
$ phpdismod fileinfo