Apache Installation (for Beginners)

Source: Internet
Author: User
<span id="Label3"></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="color:rgb(255,0,0);"><span style="padding:0px;margin:0px;font-size:16px;font-family:NSimSum;">Application System is CentOS 6.x httpd 2.2 (</span><span style="font-family:sans-serif;font-size:16px;">apache2.4 version is required for Apr version above 1.4,</span></span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="color:rgb(255,0,0);font-family:sans-serif;font-size:16px;"></span></p></p><p><p>[email protected] httpd-2.2.31]# rpm-q Apr</p></p><p><p>Apr-1.3.9-5.el6_2.x86_64</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="color:rgb(255,0,0);font-family:sans-serif;font-size:16px;">Yum installs the 1.3.9 moderator, installing version 2.4 requires the source pack to install Apr)</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="color:rgb(255,0,0);font-family:sans-serif;font-size:16px;"><br></span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;font-size:16px;font-family:NSimSum;color:rgb(255,0,0);">In order to not affect the experimental results, SELinux and iptables can be closed in advance</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;font-size:16px;font-family:NSimSum;color:rgb(255,0,0);"></span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">[email protected] ~]# <span style="padding:0px;margin:0px;color:rgb(255,0,0);">chkconfig iptables off</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">[email protected] ~]# <span style="padding:0px;margin:0px;color:rgb(255,0,0);">chkconfig ip6tables off</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">[[email protected] ~]# <span style="padding:0px;margin:0px;color:rgb(255,0,0);">/etc/init.d/iptables Stop</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">Iptables:setting chains to policy Accept:filter [OK]</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">iptables:flushing Firewall Rules: [OK]</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">Iptables:unloading modules: [OK]</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">[[email protected] ~]#<span style="padding:0px;margin:0px;color:rgb(255,0,0);"> /etc/init.d/ip6tables Stop</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">Ip6tables:setting chains to policy Accept:filter [OK]</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">ip6tables:flushing Firewall Rules: [OK]</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">Ip6tables:unloading modules: [OK]</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;font-size:16px;font-family:NSimSum;color:rgb(255,0,0);"><br style="padding:0px;margin:0px;"></span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">[email protected] ~]# <span style="padding:0px;margin:0px;color:rgb(255,0,0);">sed-i "s/linux=.*/linux=disabled/g"/etc/selinux/config</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">[email protected] ~]# <span style="padding:0px;margin:0px;color:rgb(255,0,0);">grep-i--color linux/etc/selinux/config</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"># This file controls the state of the SELinux on the System.</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"># selinux=disabled</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"># Enforcing-selinux Security Policy is Enforced.</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"># Permissive-selinux Prints warnings instead of enforcing.</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"># disabled-no SELinux policy is Loaded.</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;color:rgb(255,0,0);">Selinux=disabled</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"># selinuxtype= can take one of these the values:</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">selinuxtype=targeted</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;color:rgb(255,0,0);">If you want to take effect after you change selinux, you need to restart the server, reboot or Shutdown-r now</span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><br style="padding:0px;margin:0px;"></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;font-size:16px;font-family:NSimSum;color:rgb(255,0,0);"></span></p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);">Yum install gcc gcc-c++ zlib-devel pcre pcre-devel Apr apr-deve</p></p><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><p style="padding:0px;margin-top:0px;margin-bottom:0px;clear:both;height:auto;color:rgb(85,85,85);font-family:‘宋体‘, ‘Arial Narrow‘, arial, serif;font-size:14px;line-height:28px;white-space:normal;background-color:rgb(255,255,255);"><span style="padding:0px;margin:0px;font-size:16px;font-family:NSimSum;color:rgb(255,0,0);">These are support packages in order to prevent the error ahead of Yum</span></p></p><p><p><br></p></p><p><p><br></p></p><p><p>1, Download</p></p><p><p>#cd/usr/local/src/</p></p><p><p>#wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.31.tar.gz (version 2.2)</p></p><p><p><br></p></p><p><p>2, Unzip</p></p><p><p># tar ZXVF httpd-2.2.31.tar.gz</p></p><p><p><br></p></p><p><p>3, <span style="font-family:Verdana;background-color:#ffffff;">Configuring compilation Parameters</span></p></p><p><p># CD httpd-2.2.31</p></p><p><p># ls</p></p><p><p>About_apache config.layout Httpd.spec LICENSE readme.platforms</p></p><p><p>ACINCLUDE.M4 Configure include makefile.in readme-win32.txt</p></p><p><p>APACHE.DSW configure.in <span style="color:#FF0000;">INSTALL</span> Makefile.win Roadmap</p></p><p><p>Build Docs INSTALLBIN.DSP Modules Server</p></p><p><p>BUILDALL.DSP Emacs-style LAYOUT NOTICE srclib</p></p><p><p>BUILDBIN.DSP HTTPD.DEP LIBHTTPD.DEP nwgnumakefile Support</p></p><p><p>buildconf httpd.dsp libhttpd.dsp OS Test</p></p><p><p>Changes Httpd.mak Libhttpd.mak README VERSIONING</p></p><p><p><span style="color:#FF0000;">#./configure--prefix=/usr/local/apache2--with-included-apr--enable-so--enable-deflate=shared--enable-expires=s Hared--enable-rewrite=shared--with-pcre</span></p></p><p><p><span style="color:#FF0000;">--prefix=/usr/local/apache2 Specify the installation LOCATION--WITH-INCLUDED-APR can Cross-platform</span></p></p><p><p><span style="color:#FF0000;">--enable-deflate=shared--enable-expires=shared--enable-rewrite=shared--with-pcre means installing in a dynamically shared mode--with-pcre A library that represents a regular correlation</span></p></p><p><p><span style="color:#FF0000;"><br></span></p></p><p><p>4, <span style="font-size:16px;font-family:Verdana;background-color:#ffffff;">Compiling and <span style="font-family:Verdana;background-color:rgb(255,255,255);">installing</span> </span></p></p><p><p><strong># make && make install && echo $?</strong></p></p><p><p><br></p></p><p><p>5 Testing</p></p><p><p><strong>#/usr/local/apache2/bin/apachectl Start (start Service)</strong></p></p><p><p><strong>#/usr/local/apache2/bin/apachectl Stop (stop Current Service)</strong></p></p><p><p><strong>#/usr/local/apache2/bin/apachectl Graceful</strong> <strong>(load config file only)</strong></p></p><p><p># PS aux | grep httpd</p></p><p><p>Root 20367 0.1 0.1 4396 1696? Ss 18:07 0:00/usr/local/apache2/bin/httpd-k Start</p></p><p><p>Daemon 20368 0.0 0.1 4396 1120? S 18:07 0:00/usr/local/apache2/bin/httpd-k Start</p></p><p><p>Daemon 20369 0.0 0.1 4396 1120? S 18:07 0:00/usr/local/apache2/bin/httpd-k Start</p></p><p><p>Daemon 20370 0.0 0.1 4396 1120? S 18:07 0:00/usr/local/apache2/bin/httpd-k Start</p></p><p><p>Daemon 20371 0.0 0.1 4396 1120? S 18:07 0:00/usr/local/apache2/bin/httpd-k Start</p></p><p><p>Daemon 20372 0.0 0.1 4396 1120? S 18:07 0:00/usr/local/apache2/bin/httpd-k Start</p></p><p><p>Root 20381 0.0 0.0 6056 796 pts/0 s+ 18:09 0:00 grep httpd</p></p><p><p>#<strong> NETSTAT-LNP |grep</strong></p></p><p><p>TCP 0 0::: +:::* LISTEN 20367/httpd</p></p><p><p><br></p></p><p><p><br></p></p><p><p><strong style="white-space:normal;">here, Apache is Installed. you can enter the IP address in IE to access, if the error please check the SELinux and iptables or detection service is open</strong></p></p><p><p><strong style="white-space:normal;"><br></strong></p></p><p><p><strong style="white-space:normal;"><br></strong></p></p><p><p><span style="line-height:0px;"></span><span style="background-color:rgb(255,255,255);"># <span style="color:rgb(255,0,0);background-color:rgb(255,255,255);">/usr/local/apache2/bin/apachectl-l (view static Module)</span></span></p></p><p><p><span style="background-color:rgb(255,255,0);"><span style="line-height:0px;"></span></span><span style="line-height:0px;"></span><span style="line-height:0px;"></span><span style="background-color:rgb(255,255,255);"># <span style="color:rgb(255,0,0);">/usr/local/apache2/bin/apachectl-m (view Dynamic Module)</span></span></p></p><p><p><strong style="white-space:normal;"><span style="color:#ff0000;">Is the order long? we make some modifications. edit the path file and then customize</span></strong></p></p><p style="white-space:normal;"><p style="white-space:normal;">[email protected] httpd-2.2.31]#<strong> vim/etc/profile.d/path.sh</strong></p></p><p style="white-space:normal;"><p style="white-space:normal;">[email protected] httpd-2.2.31]# cat!$</p></p><p style="white-space:normal;"><p style="white-space:normal;"><strong>cat/etc/profile.d/path.sh</strong></p></p><p style="white-space:normal;"><p style="white-space:normal;"><span style="color:rgb(255,0,0);">#!/bin/bash</span></p></p><p style="white-space:normal;"><p style="white-space:normal;"><span style="color:rgb(255,0,0);">Export Path= $PATH:/usr/local/apache2/bin</span></p></p><p style="white-space:normal;"><p style="white-space:normal;">[email protected] httpd-2.2.31]#<strong> . /etc/profile.d/path.sh or <strong style="white-space:normal;">source/etc/profile.d/path.sh</strong> </strong></p></p><p style="white-space:normal;"><p style="white-space:normal;"><span style="color:rgb(255,0,0);"><br></span></p></p><p><p><strong># ls/usr/local/apache2/modules/(dynamic Config File)</strong></p></p><p><p>Httpd.exp <span style="color:#00B050;">mod_deflate.so mod_expires.so mod_rewrite.so</span></p></p><p><p><strong># ls/usr/local/apache2/bin/httpd (static config File)</strong></p></p><p><p><span style="color:#00B050;">/usr/local/apache2/bin/httpd</span></p></p><p><p><span style="color:#00B050;"><br></span></p></p><p><p><span style="color:#00B050;"><br></span></p></p><p><p><br></p></p><p><p><span style="color:rgb(255,0,0);"><strong>[[email protected] httpd-2.2.31]# apachectl start (start service)</strong></span></p></p><p><p><span style="color:rgb(255,0,0);"><strong>[[email protected] httpd-2.2.31]# apachectl stop (service Off)</strong></span></p></p><p><p><span style="color:#00B050;"></span></p></p><p><p><span style="color:rgb(255,0,0);"><strong>[[email protected] httpd-2.2.31]# apachectl-l <span style="background-color:rgb(255,255,255);">(view static Module)</span></strong></span></p></p><p><p><span style="color:rgb(255,0,0);"><strong>[[email protected] httpd-2.2.31]# apachectl-m <span style="color:rgb(255,0,0);background-color:rgb(255,255,255);">(view dynamic Module)</span></strong></span></p></p><p><p><span style="color:rgb(255,0,0);"><strong><span style="color:rgb(255,0,0);background-color:rgb(0,0,0);"></span></strong></span></p></p><p><p><span style="color:rgb(255,0,0);"></span><span style="color:rgb(255,0,0);"><strong>[[email protected] httpd-2.2.31]# apachectl-t (detection configuration File)</strong></span></p></p><p><p><span style="background-color:rgb(255,255,255);"></span></p></p><p><p><span style="color:rgb(255,0,0);"><strong>[[email protected] httpd-2.2.31]# ls/usr/local/apache2/conf/httpd.conf <span style="background-color:rgb(255,255,255);">(syntax config File)</span></strong></span></p></p><p><p><span style="color:rgb(255,0,0);"><strong><span style="background-color:rgb(255,255,255);">[email protected] httpd-2.2.31]# vim/usr/local/apache2/htdocs/index.html (web Content)</span></strong></span></p></p><p><p>These must be Memorized.</p></p><p><p>Apache Installation (for Beginners)</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.