阿里云 CentOS7 初始镜像上安装 LAMP

  1. 更新主机名: # hostnamectl set-hostname newname
  2. 首先更新所有现有系统包:yum update -y ; reboot
  3. 安装 Apache # yum install httpd mod_ssl ; systemctl enable httpd; systemctl start httpd
  4. 安装 MariaDB # yum install mariadb-server; systemctl enable mariadb; systemctl start mariadb; mysql_secure_installation
  5. 安装 PHP7.2
    1. # yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    2. # yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
    3. # yum install yum-utils
    4. # yum-config-manager –enable remi-php72
    5. # yum install php72-php php72-php-mysqlnd php72-php-xml php72-php-mbstring php72-php-gd
    6. # ln -s /opt/remi/php72/root/bin/php /usr/bin

安装其他需要的工具:

  1. host 命令: # yum install bind-utils
  2. 安装 Certbot: # yum install augeas augeas-devel libffi-devel python-devel; pip install –upgrade pip; pip install certbot certbot-apache
  3. 安装 git: # yum install git

作者: 甬洁网络

--移动互联网&物联网技术提供商