- 环境准备
- 安装小工具
安装lrzsz 拖入安装包 usr/local/src/目录
[root@localhost src]# rpm -ivh nginx-1.8.0-1.el7.ngx.x86_64.rpm
安装数据库
[root@localhost src]# yum -y install mariadb mariadb-server
安装mysql驱动
[root@localhost src]# yum -y install php php-devel php-mysql
安装php管理
[root@localhost src]# rpm -ivh php-fpm-5.4.16-36.el7_1.x86_64.rpm
- 修改配置文件 备份一份
[root@localhost src]# vim /etc/nginx/
conf.d/ koi-utf mime.types scgi_params win-utf
fastcgi_params koi-win nginx.conf uwsgi_params
[root@localhost src]# cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
[root@localhost src]# vim /etc/nginx/nginx.conf
[root@localhost src]# cd /etc/nginx/conf.d/
[root@localhost conf.d]# ls
default.conf example_ssl.conf
[root@localhost conf.d]# vim default.conf
修改配置文件
[root@localhost conf.d]# vim default.conf
[root@localhost conf.d]# cp default.conf default.conf.bak
[root@localhost conf.d]# vim default.conf
重新启动
进入mysql数据库
安装unzip 解压文件
Yum -y install unzip
Unzip upload.zip -d /usr/share/nginx/html/
[root@localhost src]# cd /usr/share/nginx/html/
[root@localhost html]# ll
[root@localhost html]# chmod -R 777 upload/
[root@localhost html]# ll
[root@localhost html]# systemctl restart php-fpm
[root@localhost html]# systemctl restart nginx
[root@localhost html]# systemctl restart mysql
Failed to restart mysql.service: Unit mysql.service failed to load: No such file or directory.
[root@localhost html]# systemctl restart mariadb
[root@localhost html]# ip a
访问页面