[root@centos6 temp]# ll total 8004 -rw-r--r-- 1 root root 1071074 Sep 29 12:27 apr-1.6.2.tar.gz -rw-r--r-- 1 root root 565507 Sep 29 12:27 apr-util-1.6.0.tar.gz -rw-r--r-- 1 root root 6553163 Oct 15 12:35 httpd-2.4.28.tar.bz2
tar xvf httpd-2.4.28.tar.bz2 tar xvf apr-util-1.6.0.tar.gz tar xvf apr-1.6.2.tar.gz
[root@centos6 temp]# ls apr-1.6.2 apr-1.6.2.tar.gz apr-util-1.6.0 apr-util-1.6.0.tar.gz httpd-2.4.28 httpd-2.4.28.tar.bz2
yum groupinstall "development tools" -y yum install pcre-devel -y yum install openssl-devel -y yum install expat-devel -y
[root@centos6 temp]# cd apr-1.6.2/ [root@centos6 apr-1.6.2]# ls apr-config.in CMakeLists.txt libapr.mak poll apr.dep config.layout libapr.rc random apr.dsp configure LICENSE README apr.dsw configure.in locks README.cmake apr.mak docs Makefile.in shmem apr.pc.in dso Makefile.win strings apr.spec emacs-mode memory support atomic encoding misc tables build file_io mmap test buildconf helpers network_io threadproc build.conf include NOTICE time build-outputs.mk libapr.dep NWGNUmakefile tools CHANGES libapr.dsp passwd user
[root@centos6 apr-1.6.2]# ./configure --prefix=/app/apr [root@centos6 apr-1.6.2]# make && make install
[root@centos6 apr-1.6.2]# ls /app/ apr
[root@centos6 temp]# cd apr-util-1.6.0 [root@centos6 apr-util-1.6.0]# ls aprutil.dep configure.in Makefile.win aprutil.dsp crypto memcache aprutil.dsw dbd misc aprutil.mak dbm NOTICE apr-util.pc.in docs NWGNUmakefile apr-util.spec encoding README apu-config.in export_vars.sh.in README.cmake buckets hooks README.FREETDS build include redis buildconf ldap renames_pending build.conf libaprutil.dep strmatch build-outputs.mk libaprutil.dsp test CHANGES libaprutil.mak uri CMakeLists.txt libaprutil.rc xlate config.layout LICENSE xml configure Makefile.in
[root@centos6 apr-util-1.6.0]# ./configure --prefix=/app/apr-util --with-apr=/app/apr/ [root@centos6 apr-util-1.6.0]# make && make install
[root@centos6 apr-1.6.2]# ls /app/ apr apr-util
[root@centos6 temp]# cd httpd-2.4.28/ [root@centos6 httpd-2.4.28]# ls ABOUT_APACHE docs Makefile.win acinclude.m4 emacs-style modules Apache-apr2.dsw httpd.dep NOTICE Apache.dsw httpd.dsp NWGNUmakefile apache_probes.d httpd.mak os ap.d httpd.spec README build include README.cmake BuildAll.dsp INSTALL README.platforms BuildBin.dsp InstallBin.dsp ROADMAP buildconf LAYOUT server CHANGES libhttpd.dep srclib CMakeLists.txt libhttpd.dsp support config.layout libhttpd.mak test configure LICENSE VERSIONING configure.in Makefile.in
[root@centos6 httpd-2.4.28]#./configure --prefix=/app/httpd24 \ > --enable-so \ > --enable-ssl \ > --enable-cgi \ > --enable-rewrite \ > --with-zlib \ > --with-pcre \ > --with-apr=/app/apr/ \ > --with-apr-util=/app/apr-util/ \ > --enable-modules=most \ > --enable-mpms-shared=all \ > --with-mpm=prefork [root@centos6 httpd-2.4.28]# make && make install
[root@centos6 ~]# ss -tnl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 :::22 :::* LISTEN 0 128 *:22 *:* LISTEN 0 128 127.0.0.1:631 *:* LISTEN 0 128 ::1:631 :::* LISTEN 0 100 ::1:25 :::* LISTEN 0 100 127.0.0.1:25 *:*
[root@localhost ~]# cd /app/httpd24/bin/ [root@localhost bin]# ./apachectl start AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[root@localhost bin]# ss -tnl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 :::80 :::* LISTEN 0 128 :::22 :::* LISTEN 0 128 *:22 *:* LISTEN 0 128 127.0.0.1:631 *:* LISTEN 0 128 ::1:631 :::* LISTEN 0 100 ::1:25 :::* LISTEN 0 100 127.0.0.1:25 *:*
[root@centos7 ~]# curl 192.168.191.128 <html><body><h1>It works!</h1></body></html>
[root@centos6 temp]# ll total 8004 -rw-r--r-- 1 root root 1071074 Sep 29 12:27 apr-1.6.2.tar.gz -rw-r--r-- 1 root root 565507 Sep 29 12:27 apr-util-1.6.0.tar.gz -rw-r--r-- 1 root root 6553163 Oct 15 12:35 httpd-2.4.28.tar.bz2
yum groupinstall "development tools" -y yum install pcre-devel -y yum install openssl-devel -y yum install expat-devel -y
tar xvf httpd-2.4.28.tar.bz2 tar xvf apr-util-1.6.0.tar.gz tar xvf apr-1.6.2.tar.gz
[root@centos6 temp]# cp -a apr-1.6.2 httpd-2.4.28/srclib/apr [root@centos6 temp]# cp -a apr-util-1.6.0 httpd-2.4.28/srclib/apr-util [root@centos6 temp]# ls httpd-2.4.28/srclib/ apr apr-util Makefile.in
[root@centos6 temp]# cd httpd-2.4.28 [root@centos6 httpd-2.4.28]# ./configure --prefix=/app/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 [root@centos6 httpd-2.4.28]# make -j 4 && make install
[root@centos6 httpd24]# ls bin build cgi-bin conf error htdocs icons include lib logs man manual modules
[root@centos6 bin]# vim /etc/profile.d/httpd24.sh PATH=/app/httpd24/bin:$PATH
[root@centos6 bin]# . /etc/profile.d/httpd24.sh
[root@centos6 bin]# apachectl start
[root@centos7 ~]# curl 192.168.191.128 <html><body><h1>It works!</h1></body></html>
[root@centos6 httpd24]# cd htdocs/ [root@centos6 htdocs]# ls index.html [root@centos6 htdocs]# vim index.html <html><body><h1>Welcome to keer'home!</h1></body></html>
[root@centos7 ~]# curl 192.168.191.128 <html><body><h1>Welcome to keer'home!</h1></body></html>
[root@centos6 htdocs]# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 19348 1560 ? Ss 00:22 0:01 /sbin/init root 2 0.0 0.0 0 0 ? S 00:22 0:00 [kthreadd] …… daemon 35258 0.0 0.0 76416 1436 ? S 00:53 0:00 /app/httpd24/bin/httpd -k start daemon 35259 0.0 0.0 76416 1436 ? S 00:53 0:00 /app/httpd24/bin/httpd -k start daemon 35260 0.0 0.1 76416 2104 ? S 00:53 0:00 /app/httpd24/bin/httpd -k start daemon 35261 0.0 0.1 76416 2084 ? S 00:53 0:00 /app/httpd24/bin/httpd -k start daemon 35262 0.0 0.1 76416 2084 ? S 00:53 0:00 /app/httpd24/bin/httpd -k start daemon 35264 0.0 0.0 76416 1440 ? S 00:54 0:00 /app/httpd24/bin/httpd -k start root 35326 13.0 0.0 110260 1152 pts/0 R+ 01:22 0:00 ps aux
[root@centos6 htdocs]# id apache uid=48(apache) gid=48(apache) groups=48(apache)
[root@centos6 ~]# cd /app/httpd24/conf/ [root@centos6 conf]# ls extra httpd.conf magic mime.types original [root@centos6 conf]# vim httpd.conf
User daemon Group daemon
User apache Group apache
[root@centos6 conf]# apachectl stop [root@centos6 conf]# apachectl start [root@centos6 conf]# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 19348 1560 ? Ss 00:22 0:01 /sbin/init root 2 0.0 0.0 0 0 ? S 00:22 0:00 [kthreadd] …… apache 35352 0.0 0.0 76416 1436 ? S 01:33 0:00 /app/httpd24/bin/httpd -k start apache 35353 0.0 0.0 76416 1436 ? S 01:33 0:00 /app/httpd24/bin/httpd -k start apache 35354 0.0 0.0 76416 1436 ? S 01:33 0:00 /app/httpd24/bin/httpd -k start apache 35355 0.0 0.0 76416 1436 ? S 01:33 0:00 /app/httpd24/bin/httpd -k start apache 35356 0.0 0.0 76416 1436 ? S 01:33 0:00 /app/httpd24/bin/httpd -k start root 35357 3.0 0.0 110260 1152 pts/0 R+ 01:33 0:00 ps aux
[root@centos6 ~]# cd /etc/init.d [root@centos6 init.d]# ls abrt-ccpp cpuspeed htcacheclean lvm2-monitor ntpd rdma spice-vdagentd winbind abrtd crond httpd mdmonitor ntpdate restorecond sshd wpa_supplicant abrt-oops cups ip6tables messagebus portreserve rngd svnserve acpid dnsmasq iptables netconsole postfix rsyslog sysstat atd firstboot irqbalance netfs pppoe-server sandbox udev-post auditd functions kdump network psacct saslauthd vmware-tools blk-availability haldaemon killall NetworkManager quota_nld single vmware-tools-thinprint bluetooth halt lvm2-lvmetad nfs-rdma rdisc smartd wdaemon [root@centos6 init.d]# cp httpd httpd24 [root@centos6 init.d]# vim httpd24
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0
STOP_TIMEOUT=${STOP_TIMEOUT-10}
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/app/httpd24/bin/apachectl
httpd=${HTTPD-/app/httpd24/bin/httpd}
prog=httpd
pidfile=${PIDFILE-/app/httpd24/logs/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd24}
RETVAL=0
STOP_TIMEOUT=${STOP_TIMEOUT-10}
[root@centos6 init.d]# chkconfig --add httpd24 [root@centos6 init.d]# chkconfig httpd24 on [root@centos6 init.d]# chkconfig --list httpd24 httpd24 0:off 1:off 2:on 3:on 4:on 5:on 6:off
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有