好物优选点击查看详情 京东购买

暂无内容

linux中宝塔安装

官网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’);”

linux中宝塔安装插图

 输入composer即可看到安装成功

原文链接:https://www.cnblogs.com/zhanghuilong/p/11992813.html

© 版权声明
THE END
喜欢就支持一下吧
点赞6 分享