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,默认是关闭的。否则浏览器会提示不安全,无法打开。
新开通了微信公众号方便的朋友关注一下:
搜“蓝鲸技术简要”
最新文章
- SQL常见优化Sql查询性能的方法有哪些?
- 【软件工程实践一】git使用心得
- Shell 语法之输入输出
- 【BZOJ1812】riv(多叉树转二叉树,树形DP)
- Configuring HugePages for Oracle on Linux (x86-64)
- 内存映射 madvise mmap
- delphi TSaveDialog
- ubuntu 步步为营之uclinux编译和移植(完整版)
- C++的精髓——虚函数
- 关于Java中String类的hashCode方法
- ssm打印sql语句
- R语言-离职率分析
- eclipse自定义工作区列表
- Lucene.Net如何实现搜索结果分类统计功能
- mui 普通新闻文字列表 图文新闻列表
- 第一章 C#入门 (Windows窗体应用程序)(三)
- 2017-2018-2 20155303『网络对抗技术』Exp4:恶意代码分析
- markdown简单入门
- flask + mysql写的简单监控系统
- oAuth2.0在laravel5.2中的简单应用