手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

使用yum快速安装nginx、php

时间:2024-10-13 03:52:16

1、安装yum源yum install epel-release

使用yum快速安装nginx、php

2、安装phpyum install php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-magpierss php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy清除、生成cache和安装是一个漫长的过程

使用yum快速安装nginx、php
使用yum快速安装nginx、php

3、先找到php服务然后启动它[root@remote ~]# systemctl list-unit-files|grep phpphp-fpm.service disabled[root@remote ~]# systemctl start php-fpm.service[root@remote ~]# ps -ef|grep phproot 37830 1 1 23:36 ? 00:00:00 php-fpm: master process (/etc/php-fpm.conf)apache 37832 37830 0 23:36 ? 00:00:00 php-fpm: pool wwwapache 37833 37830 0 23:36 ? 00:00:00 php-fpm: pool wwwapache 37834 37830 0 23:36 ? 00:00:00 php-fpm: pool wwwapache 37835 37830 0 23:36 ? 00:00:00 php-fpm: pool wwwapache 37836 37830 0 23:36 ? 00:00:00 php-fpm: pool wwwroot 37865 37526 0 23:36 pts/2 00:00:00 grep --color=auto php

使用yum快速安装nginx、php

4、设置php-fpm随系统自动启动systemctl enable php-fpm.service

使用yum快速安装nginx、php
使用yum快速安装nginx、php

5、安装nginx需要先下载nginx的源并安装wgethttp://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpmrpm -ivhnginx-release-centos-6-0.el6.ngx.noarch.rpm安装完nginx源之后再使用yum install nginx命令安装

使用yum快速安装nginx、php
使用yum快速安装nginx、php

6、启动nginx并设置nginx随系统自动启动[root@remote src]# systemctl list-unit-files|gr髫潋啜缅ep nginxnginx.service disabled[root@remote src]# systemctl start nginx.service[root@remote src]# systemctl enable nginx.service Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.[root@remote src]# ps -ef|grep nginxroot 39589 1 0 23:44 ? 00:00:00 nginx: master process /usr/sbin/nginxnginx 39590 39589 0 23:44 ? 00:00:00 nginx: worker processroot 39651 37526 0 23:45 pts/2 00:00:00 grep --color=auto nginx

使用yum快速安装nginx、php
© 手抄报圈