swoole的优点就不说了,安装对于没接触过的还是优点麻烦,写个教程看看能不能帮上需要的同学们!

centos7的安装就不说了 网上很多,一般都是虚拟机里面安装的 ,我是在mac虚拟机里面装的 (我装的时候分区就没有按照教程分区,系统自动分区的(20G)因为按照教程分区 有错误安装不了)温馨提示里面有桌面的程序看自己需不需要 ,自己选择!

 

安装好centos7后 咱们就开始装swoole,二话不说先下载php ,毕竟swoole是运行在php上面的插件,php是必须的,PHP当然是7以上,php.net官网下载又慢,所以现下载它!

可以命令可以桌面访问下:

$ cd /usr/local/src/
$ wget http://cn2.php.net/distributions/php-7.4.1.tar.bz2
$ tar jxvf php-7.4.1.tar.bz2

cd是打开目录  这个就不用说了 (tab键都 不知道是怎么用的绝对小白)  上面的命令如果没有权限记得在前面加上     『sudo 命令』空格别忘记了,这个是已管理员权限运行后面命令 肯定回输入你的密码

wget是一个下载文件的工具 

tar 是解压我们下载的文件包

然后进入到目录  编译源码

$ cd php-7.4.1/
$ ./configure --prefix=/usr/local/php7

温馨提示

prefix=后面示放的目录 可以自己修改
/usr/local/php7这个目录没有的需要创建  命令示例:sudo mkdir /usr/local/php7
再次声明 如果没有权限就 在这个命令前面加sudo  或者su

centos7显示7 centos7 wol_centos7显示7

 

 

 

没有看到Thank you for using PHP.的同学,

QQ496631085

请看你的报错是什么示例:

 

 

centos7显示7 centos7 wol_php_02

这里示报错sqlite3

 

咱们就页面找一下报错对应的安装包的代码:

解决 error:module/libxslt 错误

解决 error:module. 错误

解决 error:GeoIPmoduleGeoIP. 错误

解决 error:GooglemoduleGoogle perftools 错误

解决 error:not. 错误

解决 error trying to exec'cc1plus'::Noor directory 错误

解决 error:[pool www]getfor'www-data' 错误

解决configure::not. 错误。

需要安装mbedtls,教程:https://www.24kplus.com/linux/281.html

解决 error:CannotOpenSSL's <evp.h> 错误

解决 error:Libtool'LIBTOOL'isundefined 错误

解决 exec:++:not found 错误

解决 configure::not:.so 错误

解决 Can't exec "autopoint": No such file or directory 错误

解决 configure::not. 错误

解决 configure::Package(libffi >=3.0.0)not:Nopackage'libffi'found 错误

解决 fatal error:.h:Noor directory 错误

解决 configure::not:.so 错误

解决 tar (child)::Cannotexec:Noor directory 错误

解决 configure::++"/lib/cpp" fails sanity check 错误

解决 configure::PleaseBZip2 distribution 错误

解决 configure::7.15.5oriswith cURL support 错误

解决 configure::not.PleaseMagickWand-config orWand-config program 错误 

解决 configure::noin $PATH 错误

解决 configure::Package(icu-uc >=50.1-io icu-i18n)not: 错误

解决 configure::Package(sqlite3 >3.7.4)not:Nopackage'sqlite3'found 错误

解决 configure::Package(oniguruma)not:Nopackage'oniguruma' found错误

 

https://www.24kplus.com/linux/400.html这是里面对应的代码

QQ496631085

PHP配置成功了,下一步,进行构建安装。使用命令:温馨提示这个步骤大约时间要长一点
$ make && make install

如果报错 -bash:make:command not found,是因为安装系统的时候使用的是最小化 mini 安装,系统没有安装 make、vim 等常用命令,直接 yum 安装下即可

$ yum -y install make

 

 

 

 

 

 

 

如图就是安装完成了

 

 

 

 

 

centos7显示7 centos7 wol_PHP_03

 

 

此时已经安装好了咱们在配置一下