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