首先:php
#yum -y groupinstall "Development Tools" "Server Platform linux
Development"
c++
編譯前安裝編譯工具及庫
#yum install y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-develapache
安裝成功後把 curl
解壓後放到roo目錄下工具
安裝相應的包:# yum install apr apr-util apr-devel apr-util-develurl
解壓文件:# tar xzf httpd-2. 4.34. tar. gz 3d
#lsorm
#cd 2.4.34xml
#. /configure --prefix=/usr/local/apache2 --disable-proxy ( 禁止該模塊,要否則編譯出問題
進行:#make && make install
安裝的文件放在 了/usr/ local/apache2目錄下
-htdocs是存放主頁面
-conf是存放配置文件
-bin目錄時啓動腳本
啓動服務:# /usr/local/ apache2/bin/ apachectl start
查看進程:# ps -ef|. grep. Httpd
清空防火牆設置:
iptables -F/X/L
進行網頁訪問