LAMP+Postfix+Dovecot+Postfixadmin搭建郵件管理系統(三)
接上篇,我們部署完了MySQL服務,接下來開始不是Apache服務。
四、部署Apache服務
1、安裝Apache所必須的依賴包
[[email protected] ~]# yum -y install libtool-libs autoconf freetype-devel gd libjpeg-devel libpng-devel libxml2-devel zlib-devel zip unzip curl-devel crontabs file patch mlocate flex diffutils automake kernel-devel cpp readline-devel openssl vim-minimal glibc-devel glib2-devel bzip2-devel e2fsprogs-devel libidn-devel gettext-devel expat-devel libcap-devel libtool-ltdl-devel pam-devel pcre-devel pcre
2、下載Apache及依賴安裝包
[[email protected] ~]# wget -c http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.37.tar.gz
[[email protected] ~]# wget -c http://mirror.bit.edu.cn/apache/apr/apr-1.6.5.tar.gz
[[email protected] ~]# wget -c http://mirror.bit.edu.cn/apache/apr/apr-util-1.6.1.tar.gz
3、安裝apr
[[email protected] ~]# tar -zxvf apr-1.6.5.tar.gz
[[email protected] ~]# cd apr-1.6.5
[[email protected] apr-1.6.5]# CC="gcc -m64" ./configure --prefix=/usr/local/apr
[[email protected] apr-1.6.5]# make -j `grep processor /proc/cpuinfo | wc -l`
[[email protected] apr-1.6.5]# make install
4、安裝apr-util
[[email protected] ~]# tar -zxvf apr-util-1.6.1.tar.gz
[[email protected] ~]# cd apr-util-1.6.1
[[email protected] apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[[email protected] apr-util-1.6.1]# make -j `grep processor /proc/cpuinfo | wc -l`
[[email protected] apr-util-1.6.1]# make install
5、安裝apr-iconv
[[email protected] ~]# tar -zxvf apr-iconv-1.2.2.tar.gz
[[email protected] ~]# cd apr-iconv-1.2.2
[[email protected] apr-iconv-1.2.2]# ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
[[email protected] apr-iconv-1.2.2]# make -j `grep processor /proc/cpuinfo | wc -l`
[[email protected] apr-iconv-1.2.2]# make install
5、安裝Apache服務
a、建立Apache使用者和使用者組
[[email protected] ~]# groupadd www
[[email protected] ~]# useradd -s /sbin/nologin -g www www
b、解壓Apache安裝包,並進入目錄
[[email protected] ~]# tar -zxvf httpd-2.4.37.tar.gz
[[email protected] ~]# cd httpd-2.4.37
c、編譯Apache
[root[email protected] httpd-2.4.37]# ./configure --prefix=/usr/local/apache --sysconfdir=/wdata/apache/conf --enable-cgi --enable-mods-shared=most --enable-headers --enable-mime-magic --enable-proxy --enable-so --enable-rewrite --enable-ssl --enable-deflate --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-mpms-shared=all --with-mpm=prefork --enable-remoteip
說明:可以用 --with-ssl 引數來指定 openssl 安裝目錄,也可以用 --with-pcre=PATH 引數來指定 pcre 安裝目錄
d、安裝Apache
[[email protected] httpd-2.4.37]# make -j `grep processor /proc/cpuinfo | wc -l`
[[email protected] httpd-2.4.37]# make install
到此,Apache服務安裝完成,至於Apache服務配置,將在其他章節進行解析。
未完待續。。。。。。