当前位置:网站首页>Centos install php7.4, build hyperf, forward RDS
Centos install php7.4, build hyperf, forward RDS
2022-08-01 07:28:00 【fish_】
Install php7.4, build hyperf
8 sudo yum install epel-release9 sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm10 sudo yum -y install yum-utils11 sudo yum-config-manager --enable remi-php7412 sudo yum install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-redis php74-php-pecl-swoole413 php -v14 php --ri swoole15 yum wget16 yum install wget17 cd /home18 mkdir temp19 cd temp20 wget https://github.com/swoole/swoole-src/archive/refs/tags/v4.5.11.tar.gz21 tar -zxvf v4.5.11.tar.gz22 cd swoole-src-4.5.11/23 phpize24 openssl version25 openssl26 ./configure27 make28 make install29 vim /etc/php.ini30 yum install -y vim31 vim /etc/php.ini32 php --ri swoole33 yum install -y lrzsz34 yum -y install docker35 systemctl start docker36 docker -vSometimes RDS does not allow the local area to log in, just make a relay on the server
Install nignx and do port data forwarding
Add
stream{include /etc/nginx/conf.d/*.stream;}Create a mysql.stream file in conf.d
upstream tcpLink {hash $remote_addr consistent;server database-1.cr.ap-southeast-1.rds.amazonaws.com:3306 weight=5 max_fails=3 fail_timeout=30s;}server {listen 8087;proxy_connect_timeout 1s;proxy_timeout 3s;proxy_pass tcpLink;}An error will be reported after running nginx:
nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf:84You need to install the stream module
I'm lazy here, so I just installed it all
yum install -y nginx-all-modulesAfter the hyperf project is installed, run it with docker
docker build -t admin-api:1.0.1 .docker run --rm -p 9501:9501 -d --name admin-api admin-api:1.0.1//Enter docker
docker exec -it admin-api /bin/bashRecord several docker commands
docker ps list currently running images
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES5135a12fc06c admin-api:1.0.1 "php /opt/www/bin/..." 17 hours ago Up 17 hours 0.0.0.0:9501->9501/tcp admin-apidocker stop 513 According to the above CONTAINER ID, stop
边栏推荐
- Golang: go static file processing
- Self-made a remote control software - VeryControl
- Datagrip error "The specified database userpassword combination is rejected..."Solutions
- 图片无损压缩软件哪个好用:试试完全免费的JPG-C 图片批量修整压缩减肥工具吧 | 最新jpg批量修整工具下载
- Vim三种模式
- 2022杭电多校第二场1011 DOS Card(线段树)
- 聊一聊ICMP协议以及ping的过程
- 升级为重量级锁,锁重入会导致锁释放?
- 力扣每日一题-第44天-290. 单词规律
- 【MySQL】操作表DML相关语句
猜你喜欢

日志导致线程Block的这些坑,你不得不防

金山打字通 官网 下载

Offer brush questions - 1

Zero-code website development tool: WordPress

Dart 异常详解

电磁兼容简明教程(6)测试项目
![Explosive 30,000 words, the hardest core丨Mysql knowledge system, complete collection of commands [recommended collection]](/img/7f/08b323ffc5b5f8e3354bee6775b994.png)
Explosive 30,000 words, the hardest core丨Mysql knowledge system, complete collection of commands [recommended collection]

LevelSequence源码分析

VSCode插件推荐(Rust环境)

MATLAB program design and application of MATLAB 2.5
随机推荐
Electromagnetic compatibility introductory tutorial (6) test project
电磁兼容简明教程(6)测试项目
special day to remember
配置我的kitty
好的plm软件有哪些?plm软件排行榜
研发过程中的文档管理与工具
flink sql-client,怎么处理源端与目标增加端,sql-client包括映射表与JOB如
套接字选项
JSON 与 JS 对象的区别
rhcsa 第四天
小程序更多的手势事件(左右滑动、放大缩小、双击、长按)
Classwork (7) - #598. remainder operation (mod)
数据分析6
Monitor the width and height of the parent element, adapt to the size of the plug-in
app 自动化 打开app (二)
How to generate and configure public key certificate in Alipay
Offer brush questions - 1
nodetype中值1、2、3分别代表什么意思
LeetCode 415:字符串相加
我的创作纪念日