一瞪讼、下載Apache HTTP Server,存放任意目錄
https://httpd.apache.org/download.cgi#apache24
image.png
二、安裝
brew install apr
brew install pcre
進(jìn)入到 httpd-2.4.52 的目錄下
執(zhí)行如下命令:
./configure
./configure若出現(xiàn)以下報錯
image.png
執(zhí)行
./configure --with-apr=/usr/local/opt/apr --with-apr-util=/usr/local/opt/apr-util --with-pcre=/usr/local/opt/pcre --enable-ssl --with-ssl=/usr/local/opt/openssl
執(zhí)行完成后单刁,apache 會被安裝在 /usr/local/apache2 捉超,需要自己創(chuàng)建apache2文件夾
cd /usr/local
sudo madir apche2
sudo chown 當(dāng)前用戶名 apache2
進(jìn)入httpd-2.4.52目錄
執(zhí)行
make&&make install
當(dāng)輸出如下日志就安裝成功了
image.png
三、示例
image.png