centos7 make install apache2.4 and php7.2

安装

1
2
3
4
5
# 安装开发环境
$ yum groupinstall "Development Tools"
# 安装工具
$ yum install wget

install apache-2.4.46

install apr and apr-util

https://apr.apache.org/download.cgi

1
2
3
4

$ wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-1.7.0.tar.gz
$ tar -zxvf apr-1.7.0.tar.gz

install apr and apr-util

1
2
3
$ wget https://mirrors.tuna.tsinghua.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
$ tar -zxvf apr-util-1.6.1.tar.gz

install apache

https://httpd.apache.org/download.cgi#apache24

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ su
$ mkdir /var/src
$ cd /var/src
$ wget https://downloads.apache.org/httpd/httpd-2.4.46.tar.gz
$ tar -zxvf httpd-2.4.46.tar.gz
$ cd httpd-2.4.46
$ ./configure --prefix=/usr/local/apache \
--sysconfdir=/etc/httpd24 \
--enable-so \
--enable-ssl \
--enable-cgi \
--enable-rewrite \
--with-zlib \
--with-pcre \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/ \
--enable-modules=most \
--enable-mpms-shared=all \
--with-mpm=prefork

$ make && make install

install php

https://www.php.net/releases/

install php5.6

1
2
3
4
$ wget https://www.php.net/distributions/php-5.6.40.tar.gz
$ tar -zxvf php-5.6.40.tar.gz
$ cd php-5.6.40

install php5.5.6

1
$ wget https://www.php.net/distributions/php-5.5.6.tar.gz

install PHP5.4.44

https://www.php.net/distributions/php-5.4.44.tar.gz