官網https://www.bt.cn/download/linux.html復制命令
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
安裝成功會出現
Updated:
firewalld.noarch 0:0.6.3-2.el7_7.2
Dependency Updated:
firewalld-filesystem.noarch 0:0.6.3-2.el7_7.2 python-firewall.noarch 0:0.6.3-2.el7_7.2
Complete!
success
==================================================================
Congratulations! Installed successfully!
==================================================================
Bt-Panel: http://115.197.167.36:8888/3de028e7 #配置地址
username: ypxd9erc #用戶名
password: 3f2e1f9b #密碼
swoole基礎首先去GitHub下載一份swoole的源碼隨意放置位置https://github.com/swoole/swoole-src/releases; 注意注意!!下載的版本是
[root@localhost/]#cd/root
[root@localhostroot]#tar-xvfswoole-src-4.4.12.tar.gz
[root@localhostroot]#cdswoole-src-4.4.12
[root@localhostswoole-src-4.4.12]#phpize
[root@localhostswoole-src-4.4.12]#./configure
[root@localhostswoole-src-4.4.12]#make
[root@localhostswoole-src-4.4.12]#sudo make install
如果./configure的時候容易會出現如下錯誤
configure: error: Cannot find PHP-config. Please use --with-php-config=PATH
問題的意思就是因為PHP的配置文件沒有找到,需要額外的指定如下
[root@localhostswoole-src-4.4.12]#./configure--with-php-config=/usr/local/php/bin/php-config
你可以通過下面的命令既可以查找到php-config的文件地址
[root@localhostswoole-src-4.4.12]#find / -name php-config
會出現php-config安裝路徑
/www/server/php/73/src/scripts/php-config
/www/server/php/73/bin/php-config
我的安裝執行是
[root@localhostswoole-src-4.4.12]#./configure --with-php-config=/www/server/php/73/bin/php-config
[root@localhostswoole-src-4.4.12]#make
[root@localhostswoole-src-4.4.12]#sudo make install
出現安裝路徑
Installing shared extensions: /www/server/php/73/lib/php/extensions/no-debug-non-zts-20180731/
Installing header files: /www/server/php/73/include/php/
如下便是執行安裝,並且安裝到了PHP的環境目錄中了;最后執行配置好php.ini在里面添加swoole的擴展即可
[root@localhost swoole-src-4.4.12]# find / -name php.ini
/www/server/php/73/etc/php.ini
[root@localhost swoole-src-4.4.12]# vi /www/server/php/73/etc/php.ini
添加
extension=swoole.so
然后通過php -m檢測
find / -name php-fpm*
找到安裝的php-fpm版本
/etc/rc.d/init.d/php-fpm-73
最后就是重啟即可
[root@localhost swoole-src-4.4.12]# /etc/init.d/php-fpm-73 restart
Reload service php-fpm done
linux-composer簡單安裝
直接根據composer的官網提供方式去操作就OK了
[root@localhost ~]# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
[root@localhost ~]#php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified //安裝程序驗證
[root@localhost ~]# php composer-setup.php
[root@localhost ~]# php -r "unlink('composer-setup.php');"
輸入composer即可看到安裝成功