CentOS-7部署PHP-7.4
使用CentOS-7-x86_64-Minimal-2009.iso安装
一、常用操作
1:关闭防火墙
service firewalld stop
systemctl disable firewalld
2:启用登录密钥
mkdir -p ~/.ssh&&echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINczVrP1nQt56KrtY0zFDRYvNGjMVS2MphwNWXH5j7yg xixi-ed25519-20240206'>>~/.ssh/authorized_keys
3:下载常用工具
yum install tmux wget
4:关闭SELinux
setenforce 0
vi /etc/selinux/config
SELINUX=permissive
二、PHP-FPM服务
1:安装php7.4
yum install epel-release
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum --enablerepo=remi install php74-php-fpm php74-php-mysqli php74-php-redis php74-php-xml php74-php-mbstring php74-php-intl
systemctl enable php74-php-fpm
2:配置文件
vi /etc/opt/remi/php74/php-fpm.d/www.conf
;listen = /run/php-fpm/www.sock
listen = 127.0.0.1:9000
3:重启FPM服务
service php74-php-fpm restart
三、NGINX服务器
1:安装NGINX
yum install nginx
systemctl enable nginx
service nginx restart
或者可以直接指定包
yum install pcre2
wget http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.24.0-1.el7.ngx.x86_64.rpm
rpm -ivh nginx-1.24.0-1.el7.ngx.x86_64.rpm
systemctl enable nginx
service nginx restart
四、MySQL-8.0服务器
yum remove mariadb-libs
yum install https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-common-8.0.36-1.el7.x86_64.rpm
yum install https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm
yum install https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-libs-8.0.36-1.el7.x86_64.rpm
yum install https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-client-8.0.36-1.el7.x86_64.rpm
yum install https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-icu-data-files-8.0.36-1.el7.x86_64.rpm
yum install https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-community-server-8.0.36-1.el7.x86_64.rpm
systemctl enable mysqld
service mysqld restart
五、Redis服务器
yum install redis
systemctl enable redis
vi /etc/redis.conf
requirepass your_password
service redis restart
六、SVN服务器
yum install subversion
systemctl enable svnserve
vi /etc/sysconfig/svnserve
OPTIONS="-r /var/svn"
service svnserve restart
标签:8.0,7.4,CentOS,yum,install,mysql,64,PHP,rpm
From: https://www.cnblogs.com/xiangxisheng/p/18074011