【Web 集群实战】14_PHP 服务缓存加速(Opcache+Memcached+pdo_mysql+imagick)
标签(空格分隔): Web集群实战
文章目录
一、LNMP 基础 Web 环境准备
软件 | 版本 |
---|---|
Linux | CentOS 7.4.1708 64bit |
Nginx | 1.14.0 |
PHP | 7.1.22 |
MySQL | 5.5.61 |
[root@ylt001 ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@ylt001 ~]# uname -r
3.10.0-693.el7.x86_64
[root@ylt001 ~]# uname -m
x86_64
[root@ylt001 ~]# /application/nginx/sbin/nginx -v
nginx version: nginx/1.14.0
[root@ylt001 ~]# /application/php/bin/php -v
PHP 7.1.22 (cli) (built: Sep 25 2018 06:46:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.22, Copyright (c) 1999-2018, by Zend Technologies
[root@ylt001 ~]# mysqladmin -uroot -p version
Enter password:
mysqladmin Ver 8.42 Distrib 5.5.61, for linux-glibc2.12 on x86_64
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Server version 5.5.61
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 5 min 28 sec
Threads: 1 Questions: 4 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.012
- 开启所有服务
[root@ylt001 ~]# /application/nginx/sbin/nginx
[root@ylt001 ~]# /application/nginx/sbin/nginx -t
[root@ylt001 ~]# /application/nginx/sbin/nginx -s reload
[root@ylt001 ~]# killall php-fpm
[root@ylt001 ~]# /application/php/sbin/php-fpm
[root@ylt001 ~]# ps -ef|grep php-fpm
[root