WEB运维手册

LAMP安装

yum安装

yum -y install httpd mysql-server php php-mysql

源码包安装

获取apache

wget http://httpd.apache.org/[preferred]/httpd/httpd-2.4.10.tar.gz

安装编译依赖包apr、apr-util、pcre

#####install apr
[root@localhost ~]# wget http://mirrors.cnnic.cn/apache/apr/apr-1.5.1.tar.gz
[root@localhost ~]# tar xvf apr-1.5.1.tar.gz 
[root@localhost ~]# cd apr-1.5.1
[root@localhost apr-1.5.1]# ./configure --prefix=/app/apr
[root@localhost apr-1.5.1]# make && make install

#####install apr-util
[root@localhost ~]# wget http://mirrors.cnnic.cn/apache//apr/apr-util-1.5.4.tar.gz
[root@localhost ~]# tar xvf apr-util-1.5.4.tar.gz 
[root@localhost ~]# cd apr-util-1.5.4
[root@localhost apr-util-1.5.4]# ./configure --prefix=/app/apr-util --with-apr=/app/apr
[root@localhost apr-util-1.5.4]# make && make install

#####install pcre
[root@localhost ~]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz
[root@localhost ~]# tar xvf pcre-8.36.tar.gz 
[root@localhost ~]# cd pcre-8.36
[root@localhost pcre-8.36]# ./configure --prefix=/app/pcre
[root@localhost pcre-8.36]# make && make install

编译安装apache

[root@localhost ~]# tar xvf httpd-2.4.10.tar.gz 
[root@localhost ~]# cd httpd-2.4.10
[root@localhost httpd-2.4.10]# ./configure --prefix=/app/apache --with-apr=/app/apr --with-apr-util=/app/apr-util --with-pcre=/app/pcre/
[root@localhost httpd-2.4.10]# make && make install