rpm 安装 Php7 相应的 yum源
CentOS/RHEL 7.x:
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum安装php7 # yum install php70w php70w-opcache 然后安装插件
yum install php70w-bcmath php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-fpm php70w-gd php70w-imap php70w-interbase php70w-intl php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-odbc php70w-pdo php70w-pdo_dblib php70w-pear php70w-pecl-apcu php70w-pecl-imagick php70w-pecl-xdebug php70w-pgsql php70w-phpdbg php70w-process php70w-pspell php70w-recode php70w-snmp php70w-soap php70w-tidy php70w-xml php70w-xmlrpc yum install php70w-mysqlnd #whereis php-fpm #/usr/sbin/php-fpm #可以执行 #whereis php.ini /etc/php.ini #whereis php-fpm.conf /etc/php-fpm.conf #vi /etc/php-fpm.conf pid = /var/run/php-fpm/php-fpm.pid vi /etc/systemd/system/php-fpm.service
添加
[Unit] Description=The PHP FastCGI Process Manager After=syslog.target network.target [Service] Type=simple PIDFile=/var/run/php-fpm/php-fpm.pid ExecStart=/usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf ExecReload=/bin/kill -USR2 $MAINPID ExecStop=/bin/kill -SIGINT $MAINPID [Install] WantedBy=multi-user.target #wq!
#添加到开机启动
systemctl enable php-fpm.service
#启动服务
systemctl start php-fpm.service
怀仁历史上的今天:
- 2015: 怀仁县城乡幼儿乐享优质学前教育
- 2014: 怀仁县荣获“中国最具特色生态旅游名县”称号。