util-1.6.1 httpd-2.4.54
[root@RS2 ~]# cd apr-1.7.0/
[root@RS2 apr-1.7.0]# ls
CHANGES README apr.pc.in config.layout file_io locks random time
CMakeLists.txt README.cmake apr.spec configure helpers memory shmem tools
LICENSE apr-config.in atomic configure.in include misc strings user
Makefile.in apr.dep build docs libapr.dep mmap support
Makefile.win apr.dsp build-outputs.mk dso libapr.dsp network_io tables
NOTICE apr.dsw build.conf emacs-mode libapr.mak passwd test
NWGNUmakefile apr.mak buildconf encoding libapr.rc poll threadproc
[root@RS2 apr-1.7.0]# vim configure
$RM "$cfgfile" //删除或者注释掉这个
[root@RS2 apr-1.7.0]# ./configure --prefix=/usr/local/apr //编译
[root@RS2 apr-1.7.0]# make && make install //安装
[root@RS2 apr-1.7.0]# cd ../apr-util-1.6.1/
[root@RS2 apr-util-1.6.1]# ls
CHANGES README.FREETDS apu-config.in configure.in include redis
CMakeLists.txt README.cmake buckets crypto ldap renames_pending
LICENSE apr-util.pc.in build dbd libaprutil.dep strmatch
Makefile.in apr-util.spec build-outputs.mk dbm libaprutil.dsp test
Makefile.win aprutil.dep build.conf docs libaprutil.mak uri
NOTICE aprutil.dsp buildconf encoding libaprutil.rc xlate
NWGNUmakefile aprutil.dsw config.layout export_vars.sh.in memcache xml
README aprutil.mak configure hooks misc
[root@RS2 apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr //编译
[root@RS2 apr-util-1.6.1]# make && make install //安装
[root@RS2 apr-util-1.6.1]# cd ../httpd-2.4.54/
[root@RS2 httpd-2.4.54]# ls
ABOUT_APACHE INSTALL NWGNUmakefile acinclude.m4 configure httpd.spec server
Apache-apr2.dsw InstallBin.dsp README ap.d configure.in include srclib
Apache.dsw LAYOUT README.CHANGES apache_probes.d docs libhttpd.dep support
BuildAll.dsp LICENSE README.cmake build emacs-style libhttpd.dsp test
BuildBin.dsp Makefile.in README.platforms buildconf httpd.dep libhttpd.mak
CHANGES Makefile.win ROADMAP changes-entries httpd.dsp modules
CMakeLists.txt NOTICE VERSIONING config.layout httpd.mak os
[root@RS2 httpd-2.4.54]# ./configure --prefix=/usr/local/apache \
> --enable-so \
> --enable-ssl \
> --enable-cgi \
> --enable-rewrite \
> --with-zlib \
> --with-pcre \
> --with-apr=/usr/local/apr \
> --with-apr-util=/usr/local/apr-util/ \
> --enable-modules=most \
> --enable-mpms-shared=all \
> --with-mpm=prefork
[root@RS2 httpd-2.4.54]# make && make install //安装
[root@RS2 httpd-2.4.54]# cd
[root@RS2 ~]# echo 'export PATH=/usr/local/apache/bin:$PATH' > /etc/profile.d/httpd.sh //配置环境变量
[root@RS2 ~]# source /etc/profile.d/httpd.sh
[root@RS2 ~]# ln -s /usr/local/apache/include /usr/include/apache //做头文件
[root@RS2 ~]# ll -d /usr/include/apache
lrwxrwxrwx. 1 root root 25 Oct 19 23:21 /usr/include/apache -> /usr/local/apache/include
[root@RS2 ~]# vim /etc/man_db.conf //配置man文档
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/local/share/man
MANDATORY_MANPATH /usr/local/apache/man //添加
[root@RS2 ~]# cp /usr/lib/systemd/system/sshd.service /usr/lib/systemd/system/httpd.service
[root@RS2 ~]# vim /usr/lib/systemd/system/httpd.service
[root@RS2 ~]# cat /usr/lib/systemd/system/httpd.service
[Unit]
Description=httpd server daemon
Documentation=man:httpd |