相关链接
http://museum.php.net/ PHP 下载地址
https://downloads.mysql.com/archives/community/ MySQL 下载地址
http://archive.apache.org/dist/httpd/ https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/ Apache下载地址 前面一个地址版本多但是速度慢,后面一个版本少但是速度很快
http://museum.php.net/ PHP 下载地址
https://downloads.mysql.com/archives/community/ MySQL 下载地址
http://archive.apache.org/dist/httpd/ https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/ Apache下载地址 前面一个地址版本多但是速度慢,后面一个版本少但是速度很快
http://nginx.org/ Nginx下载地址
http://blog.csdn.net/qq_31673689/article/details/51291390 各种国内镜源像总汇
安装前准备
建立相关目录
mkdir /web && mkdir /web/{server,www,program,log,conf} && mkdir /web/server/{apache,mysql,php,nginx,lib} && mkdir /web/server/mysql/{data,tmp,log}
安装Apache
安装APR
cd /web/program/ && wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.5.2.tar.gz && tar -xzvf apr-1.5.2.tar.gz && cd apr-1.5.2 && ./configure --prefix=/web/server/lib/apr --enable-shared=yes --enable-static=no && make && make install
安装APR-UTIL
cd /web/program && wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.5.4.tar.gz && tar -xzvf apr-util-1.5.4.tar.gz && cd apr-util-1.5.4 && ./configure --prefix=/web/server/lib/apr-util -with-apr=/web/server/lib/apr --enable-shared=yes --enable-static=no && make && make install
安装PCRE
yum -y install gcc && yum -y install gcc-c++ && cd /web/program && wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz && tar -xzvf pcre-8.39.tar.gz && cd pcre-8.39 && ./configure --prefix=/web/server/lib/pcre --enable-shared=yes --enable-static=no && make && make install
安装Apache
cd /web/program && wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.25.tar.gz && tar -xzvf httpd-2.4.25.tar.gz && cd /web/program/httpd-2.4.25 && ./configure --prefix=/web/server/apache -with-apr=/web/server/lib/apr -with-apr-util=/web/server/lib/apr-util -with-pcre=/web/server/lib/pcre --enable-so --enable-shared=yes --enable-static=no && make && make install
后续配置
\cp -rf /web/server/apache/bin/apachectl /etc/init.d/apache && service apache start