1 Star 0 Fork 0

melody100/centos7-php8

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
陈圣文 提交于 2023-11-28 13:52 . fix nginx install
#!/bin/sh
yum install -y epel-release yum-utils
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y gcc gcc-c++ libjpeg libjpeg-devel libpng-devel freetype
echo "正在安装nginx"
mv nginx.repo /etc/yum.repos.d/nginx.repo
yum-config-manager --enable nginx-mainline
yum install -y nginx
systemctl enable nginx && systemctl start nginx
echo "nginx安装完成并启动"
echo "正在安装redis"
yum install -y redis
systemctl enable redis && systemctl start redis
echo "redis安装完成并启动"
echo "正在安装php8.2"
yum-config-manager --enable remi-php82
yum install -y php php-devel php-xml php-fpm php-opcache php-pdo php-pdo_mysql php-pear php-mbstring php-mcrypt php-cli php-redis php-gd php-pear php-curl php-mysql php-ldap php-zip php-fileinfo
sed -ie "s/;date.timezone =/date.timezone = Asia\/Chongqing/" /etc/php.ini
sed -ie "s/user = apache/user = nginx/" /etc/php-fpm.d/www.conf
sed -ie "s/group = apache/group = nginx/" /etc/php-fpm.d/www.conf
mv opcache.ini /etc/php.d/opcache.ini
mkdir -p /app/www
mkdir -p /app/log/nginx
chown nginx:nginx /app/log/nginx
mv www/* /app/www
mv nginx.conf /etc/nginx/nginx.conf
systemctl enable php-fpm && systemctl start php-fpm
systemctl restart nginx
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/melody100/centos7-php8.git
git@gitee.com:melody100/centos7-php8.git
melody100
centos7-php8
centos7-php8
master

搜索帮助