nginx最新版
vi /etc/yum.repos.d/nginx.repo
#添加以下内容
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
然后:wq!
执行以下命令:
yum install nginx
systemctl start nginx
systemctl enable nginx
mariadb最新版
vi /etc/yum.repos.d/MariaDB.repo
#添加以下代码
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5.8//centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
#保存以后执行以下命令:
yum install -y MariaDB-server MariaDB-client
systemctl start mariadb
systemctl enable mariadb
#然后,就可以使用mysql命令了
centos 安装php7总结:remi rpm
#安装remi源和epel源
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
#安装php7.4 现在已经有8.x了
yum install php74-php-devel php74-php-fpm php74-php-mbstring php74-php-memcache php74-php-redis php74-php-mysqli php74-php-mysqlnd php74-php-pdo php74-php-bcmath php74-php-dom php74-php-gd php74-php-gmp php74-php-igbinary php74-php-imagick php74-php-mcrypt php74-php-pdo_mysql php74-php-pdo_sqlite php74-php-posix php74-php-simplexml php74-php-opcache php74-php-xsl php74-php-xmlwriter php74-php-xmlreader php74-php-xml php74-php-process
#创建一个软连接,让php命令随处可用
ln -s /opt/remi/php74/root/usr/bin/php /usr/local/bin/php
#启动php-fpm
systemctl enable php74-php-fpm
systemctl start php74-php-fpm