總結:
apache 要先安裝httpd,然後再安裝apr,apr-util ,pcre, 如果先安裝了apr,aor-util,pcre最後安裝httpd就會
報錯
make[2]: [htpasswd] 錯誤 1
make[2]: 離開目錄“/usr/local/src/httpd-2.4.27/support”
make[1]: [all-recursive] 錯誤 1
make[1]: 離開目錄“/usr/local/src/httpd-2.4.27/support”
make: *** [all-recursive] 錯誤
cd..
cd httpd.2.4.9
./configure --prefix=/usr/local/apache --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
make
報錯,然後安裝apr.apr-util,pcre
cd /soft/
cp -r apr-1.7.0 /soft/httpd-2.4.9/srclib/apr
cd apr-1.7.0
./configure --prefix=/usr/local/apr
make && make install
cd..
cp -r apr-util-1.6.1 /soft/httpd-2.4.9/srclib/apr-util
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd..
cp -r pcre-8.43 /soft/httpd-2.4.9/srclib/pcre
cd /usr/pcre-8.43
./configure --prefix=/usr/local/pcre
make && make install
最後,再安裝apache
cd..
cd httpd.2.4.9
./configure --prefix=/usr/local/apache --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
make && install
/usr/local/apache/bin/apachectl start
小知識點整理:
啓動apache服務器
/usr/local/apcahe/bin/apachectl start
apache 的配置文件爲httpd.conf
apache 的發佈文件夾爲 htdocs