当前位置:网站首页>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
边栏推荐
- 最小生成树
- R语言使用tidyquant包的tq_transmute函数计算持有某只股票的天、月、周收益率、ggplot2使用条形图可视化股票月收益率数据、使用百分比显示Y轴坐标数据、使用不同的色彩表征正负收益率
- 套接字选项
- 零代码网站开发利器:WordPress
- Go 支持 OOP: 用 struct 代替 class
- MATLAB程序设计与应用 2.5 MATLAB运算
- POJ1287联网题解
- Information system project managers must recite the work of the core test site (56) Configuration Control Board (CCB)
- 【一句话攻略】彻底理解JS中的回调(Callback)函数
- mysql中添加字段的相关问题
猜你喜欢
随机推荐
自制一款远程控制软件——VeryControl
Golang: go static file processing
并发编程13-JUC之CountDownLatch
监听父元素宽高,自适应插件大小
特殊的日子,值得纪念
C语言学习概览(一)
I have three degrees, and I have five faces. I was "confessed" by the interviewer, and I got an offer of 33*15.
JVM:运行时数据区-PC寄存器(程序计数器)
Self-made a remote control software - VeryControl
案例实践 --- Resnet经典卷积神经网络(Mindspore)
三维坐标系距离
电磁兼容简明教程(6)测试项目
Golang: go to connect and use mysql
How to use Photoshop to composite star trail photos, post-processing method of night sky star trail photos
centos 安装php7.4,搭建hyperf,转发RDS
七夕来袭——属于程序员的浪漫
拳头游戏免版权音乐下载,英雄联盟无版权音乐,可用于视频创作、直播
Information system project managers must recite the work of the core test site (56) Configuration Control Board (CCB)
2022杭电多校第二场1011 DOS Card(线段树)
VSCode插件推荐(Rust环境)









