공부합시다!/LInux
apache source 설치 및 삭제
간서치
2022. 10. 2. 10:22
728x90
1. 설치
sh.txt
0.00MB
apache.sh
0.00MB
2k230302_apache_script.txt
0.00MB
02_apache.sh
0.00MB
# vi apache.sh
#! /bin/bash
mkdir /web
mkdir /http
cd /web
clear
yum install -y wget expat-devel gcc gcc-c++
clear
wget https://downloads.apache.org/httpd/httpd-2.4.54.tar.gz
wget https://downloads.apache.org/apr/apr-1.7.0.tar.gz
wget https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz
wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz --no-check-certificate
clear
ls
tar xvfz apr-1.7.0.tar.gz
tar xvfz apr-util-1.6.1.tar.gz
tar xvfz pcre-8.45.tar.gz
tar xvfz httpd-2.4.54.tar.gz
clear
ls
cd apr-1.7.0
ls
./configure --prefix=/http/apr
make && make install
clear
cd ../apr-util-1.6.1
./configure --prefix=/http/aprutil --with-apr=/http/apr
make && make install
cd ../pcre-8.45
clear
ls
./configure --prefix=/http/pcre
make && make install
clear
cd ../httpd-2.4.54
./configure --prefix=/http/apache --with-apr=/http/apr --with-apr-util=/http/aprutil --with-pcre=/http/pcre/bin/pcre-config
make && make install
systemctl stop firewalld
/http/apache/bin/apachectl start
2. 삭제
# vi rmapache.sh
#! /bin/bash
rm -rf /web /http
yum remove -y wget gcc gcc-c++ expat-devel728x90