代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。