Linux进阶
Linux环境整合
[root@king ~]# rpm -Uvh http://mirror.webtatic.com/yum/el7/epel-release.rpm
[root@king ~]# rpm -Uvh http://mirror.webtatic.com/yum/el7/webtatic-release.rpm
web service安装
Apache
Nginx
[root@king ~]# rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
[root@king ~]# yum install nginx -y
[root@king ~]# systemctl start nginx
[root@king ~]# systemctl status nginx
Nginx 目录结构
[root@king nginx]# pwd
/etc/nginx
[root@king nginx]# tree -C
.
├── conf.d
│ └── default.conf
├── fastcgi_params
├── koi-utf
├── koi-win
├── mime.types
├── modules -> ../../usr/lib64/nginx/modules
├── nginx.conf
├── scgi_params
├── uwsgi_params
└── win-utf
2 directories, 9 files
脚本根目录位置
[root@king html]# pwd
/usr/share/nginx/html
虚拟主机配置
[root@king conf.d]# ls
default.conf king.conf
[root@king conf.d]# cat -n king.conf
1 server {
2 listen 80;
3 server_name www.wanson.king;
4
5 root /data/www;
6 index index.html index.htm;
7 }
php基础环境整合
[root@king ~]# yum info php
yum install php72w-fpm.x86_64
[root@king ~]# yum install php72w
[root@king ~]# yum install php72w-cli.x86_64 php72w-common.x86_64 php72w-devel.x86_64 php72w-gd.x86_64 php72w-mbstring.x86_64 php72w-mysql.x86_64 php72w-pdo.x86_64 -y
[root@king ~]# service php-fpm start
[root@king ~]# service php-fpm status
posted on 2019-01-12 19:48 Indian_Mysore 阅读(103) 评论(0) 编辑 收藏 举报