Plus 3.0 (ThinkSNS+)centos8.5+php7.4在阿里云部署过程
参考:https://zhiyicx.github.io/ts-api-docs/guide/installation/using-nginx-and-fpm-publish-website.html#php-fpm-%E5%90%AF%E5%8A%A8
本次部署为阿里云上部署测试环境:
环境要求:阿里云ECS一台配置可以为最低1C1G,RDS一个,最低配置。SLB一个。
部署方式:nginx\php\plus 全编译,中间去除jeknins配置。
系统:Centos8.5.211
php 7.4.28 源码。
防火墙 selinux全部关闭。rds可以连通。
1. 登录系统,
ssh *****
2. 配置YUM源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf -y install dnf-utils
yum install epel*
yum clean all
yum makecache
yum update
安装第三方源
wget http://www.atomicorp.com/installers/atomic
chmod 777 atomic
./atomic
3. 安装依赖包
yum install -y gcc autoconf gcc-c++ libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng
-devel freetype freetype-devel gmp gmp-devel readline readline-devel libxslt libxslt-devel libmcrypt libmcrypt-devel mhash mhash-devel systemd-devel openjpeg-devel
注意一些包没有安装上,记录没有安装上的包
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/l/libmcrypt-devel-2.5.8-26.el8.x86_64.rpm
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/SRPMS/Packages/l/libmcrypt-2.5.8-26.el8.src.rpm
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/m/mhash-0.9.9.9-20.el8.x86_64.rpm
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/m/mhash-devel-0.9.9.9-20.el8.x86_64.rpm
yum install *.rpm
yum install openjpeg*
yum install libmcrypt libmcrypt-devel mhash mhash-devel openjpeg-devel
4. 编译PHP
groupadd php-fpm && useradd -s /sbin/nologin -g php-fpm -M php-fpm
yum -y install systemd-devel
yum -y install libxml*
yum install krb5*
yum install openssl*
yum install sqlite*
yum install bzip*
yum install libcurl-d*
yum config-manager --set-enabled PowerTools
yum -y install oniguruma oniguruma-devel
yum install libxslt*
yum install libzip-devel
yum install libpng-*
yum install freetype*
yum install libjpeg*
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-zlib-dir --with-freetype=/usr/include/freetype2/ --enable-mbstring --
with-libxml --enable-xmlreader --enable-xmlwriter --enable-soap --enable-calendar --with-curl --with-zlib --enable-gd --with-pear --with-pdo-sqlite --with-pdo-mys
ql --with-mysqli --with-mysql-sock --enable-mysqlnd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable
-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --with-zip --with-pcre-jit --with-external-pcre --with-jpeg --with-openssl --e
nable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-fpm-systemd
make && make install
其它按参考文档走
5. 配置RDS
6. 安装plus
plus项目代码下载后,需要手工创建目录
cd storage/
mkdir framework
cd framework/
mkdir sessions
mkdir testing
mkdir views
composer update -vvv
yum install redis -y
service redis restart
6.nginx+php-fpm方式发布。
其它按文档:
注意:对外网址为https协议的时候,需要在app 的http参数 配置为true,默认是关闭的。否则浏览器会提示不安全,无法打开。
新开通了微信公众号方便的朋友关注一下:
搜“蓝鲸技术简要”
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2021-03-04 jenkins 2.282+Publish over ssh 1.22版本发布日志不能实时显示