软件版本说明
操作系统:CentOS 7.2 64 位
Apache:2.4.23
MySQL:5.7.17
PHP:7.0.12
准备工作
设置防火墙
运行命令关闭防火墙。
systemctl stop firewalld.service
运行命令关闭防火墙开机自启动。
systemctl disable firewalld.service
安装 vim 和 unzip
下载软件用于编辑和解压缩文件。运行命令:
yum install-y vim unzip
按以下描述部署 LAMP。
运行命令安装相关依赖包。
yum install-y gcc gcc-c++autoconf libtool
依次运行以下命令安装 apr。
cd/usr/local/src/
wget http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-1.5.0.tar.gz
tar zxvf apr-1.5.0.tar.gz
cd apr-1.5.0
./configure--prefix=/usr/local/apr
make&&make install
依次运行以下命令安装 apr-util。
cd/usr/local/src/
wget http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-util-1.5.3.tar.gz
tar zxvf apr-util-1.5.3.tar.gz
cd apr-util-1.5.3
./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr
make&&make install
依次运行以下命令安装 pcre。
cd/usr/local/src/
wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/pcre/pcre-8.38.tar.gz
tar zxvf pcre-8.38.tar.gz
cd pcre-8.38
./configure--prefix=/usr/local/pcre
make&&make install
依次运行以下命令编译安装 Apache。
cd/usr/local/src/
wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/apache/httpd-2.4.23.tar.gz
tar zxvf httpd-2.4.23.tar.gz
cd httpd-2.4.23
./configure \
--prefix=/usr/local/apache--s