VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > 网站开发 > PHP >
  • php教程之PHP7 安装 Swoole 教程(2)

  

转移 php.ini

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@VM_0_5_centos study]# cd softpackage/php-7.2.29/
[root@VM_0_5_centos php-7.2.29]# pwd
/home/work/study/softpackage/php-7.2.29
[root@VM_0_5_centos php-7.2.29]# cp php.ini-development /home/work/study/soft/php/etc/
[root@VM_0_5_centos ~]# cd /home/work/study/soft/php/etc/
[root@VM_0_5_centos etc]# ll
total 80
-rw-r--r-- 1 root root  1354 Apr  2 22:05 pear.conf
-rw-r--r-- 1 root root 71232 Apr  2 22:17 php.ini-development
[root@VM_0_5_centos etc]# mv php.ini-development php.ini
[root@VM_0_5_centos php-7.2.29]# php -i | grep php.ini
Configuration File (php.ini) Path => /home/work/study/soft/php/lib
[root@VM_0_5_centos php-7.2.29]# cd /home/work/study/soft/php/
[root@VM_0_5_centos php]#  mv ./etc/php.ini ./lib/

  

上传 swoole 文件包

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[root@VM_0_5_centos softpackage]# rz
[root@VM_0_5_centos softpackage]# ll
total 17076
drwxrwxr-x 17 root root     4096 Apr  2 21:55 php-7.2.29
-rw-r--r--  1 root root 15235268 Apr  2 21:19 php-7.2.29.tar.bz2
-rw-r--r--  1 root root  2217161 Apr  2 22:27 swoole-swoole-master.zip
[root@VM_0_5_centos softpackage]# unzip swoole-swoole-master.zip
[root@VM_0_5_centos softpackage]# ll
total 17080
drwxrwxr-x 17 root root     4096 Apr  2 21:55 php-7.2.29
-rw-r--r--  1 root root 15235268 Apr  2 21:19 php-7.2.29.tar.bz2
drwxr-xr-x  9 root root     4096 Jan  9 20:06 swoole
-rw-r--r--  1 root root  2217161 Apr  2 22:27 swoole-swoole-master.zip
//生成configure文件
[root@VM_0_5_centos swoole]# /home/work/study/soft/php/bin/phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
[root@VM_0_5_centos swoole]# ./configure --with-php-config=/home/work/study/soft/php/bin/php-config
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/work/study/softpackage/swoole':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
//说明
error: C++ preprocessor "/lib/cpp" fails sanity check 问题的解决
 问题的根源是缺少必要的C++库。如果是CentOS系统,运行,如下命令解决:
 yum install glibc-headers
 yum install gcc-c++
相关教程