forked from helloxz/Docker-LNMP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# 学习文档 | ||
|
||
- [如何新建一个站点](如何新建一个站点.md) | ||
- [如何安装yaf扩展](如何安装yaf扩展.md) | ||
- [如何安装yaf扩展](如何安装yaf扩展.md) | ||
- [如何安装swoole扩展](如何安装swoole扩展.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 如何安装swoole扩展 | ||
|
||
#### 如何安装swoole扩展 | ||
|
||
```shell | ||
# 进入PHP容器 | ||
[root@localhost Docker-LNMP]# docker exec -it cgi bash | ||
|
||
# 解决gcc版本过低的问题 | ||
yum -y install centos-release-scl | ||
yum -y install devtoolset-7 | ||
scl enable devtoolset-7 bash | ||
|
||
# 下载、安装 | ||
wget https://github.com/swoole/swoole-src/archive/v4.2.1.tar.gz &&\ | ||
tar -zxvf v4.2.1.tar.gz &&\ | ||
cd swoole-src-4.2.1 &&\ | ||
phpize &&\ | ||
./configure &&\ | ||
make && make install &&\ | ||
sed -i '$a \\n[swoole]\nextension=swoole.so' /etc/php.ini &&\ | ||
cd ../ && rm -rf v4.2.1.tar.gz swoole-src-4.2.1 | ||
|
||
# 退出PHP容器 | ||
[root@510d01c199f5 /]# exit | ||
exit | ||
|
||
# 重启PHP容器 | ||
[root@localhost Docker-LNMP]# docker restart cgi | ||
``` | ||
|
||
 | ||
|