Compile and install httpd
First, the environmental requirements
You need to install rely apr and apr-utils, these two packages are apache package to address common cross-platform development depends
The version used:
unexpectedly-Lk7k0ktrkbz2
Apr-Util-Lk6klktrkbz2
httpd-2k4k39ktrkbsh2
Second, the specific process
-
mkdir /apps
-
Upload the compressed file to the / apps directory
-
unzip files
cd /apps
cd /apps tar xvf apr-1.7.0.tar.bz2 tar xvf apr-util-1.6.1.tar.bz2 tar xvf httpd-2.4.39.tar.bz2 mv apr-1.7.0/* httpd-2.4.39/srclib/apr mv apr-util-1.6.1/* httpd-2.4.39/srclib/apr-util
-
Related to the installation package
yum install gcc prce-devel openssl-devel expat-devel -y
-
Compile and install
cd httpd-2.4.39/ ./configure \ --prefix=/apps/httpd24 \ --enable-so \ --enable-ssl \ --enable-cgi \ --enable-rewrite \ --with-zlib \ --with-pcre \ --with-included-apr \ --enable-modules=most \ --enable-mpms-shared=all \ --with-mpm=prefork
make -j 4 && make install
-
Set to start shortcuts and user-initiated
echo 'PATH=/apps/httpd24/bin:$PATH' > /etc/profile.d/httpd24.sh . /etc/profile.d/httpd24.sh useradd -s /sbin/nologin -r apache
vim /apps/httpd24/conf/httpd.conf User apache Group apache
start up
apachectl sart
Home access verification
See It works! Can