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,默认是关闭的。否则浏览器会提示不安全,无法打开。

 

新开通了微信公众号方便的朋友关注一下:

搜“蓝鲸技术简要”

 

 

posted on 2022-03-04 10:42  net2817  阅读(144)  评论(0编辑  收藏  举报

导航