Install apache 2.2.23 on CentOS 6.3, as in the previous blog, all software packages are downloaded to/usr/local/src, and the software is installed under/usr/local. Http://service.ap-southeast-1.maxcompute.aliyun-inc.com/api
Apr provides better performance for tomcat. 1. install ssl (optional) # yum install openssl-devel 2. install pcre (optional) # cd/usr/local/src # tar-zxvf pcre-8.32.tar.gz # cd pcre-8.32 #. /configure # make install 3, install apr (optional) www.2cto.com # cd/usr/local/src # tar-zxvf apr-1.4.6.tar.gz # cd apr-1.4.6 #. /configure -- prefix =/usr/local/apr # make install # cd/usr/local/src # tar-zxvf apr-util-1.5.1.tar.gz # cd apr-util-1.5.1 #. /configure -- prefix =/usr/local/apr-util -- with-apr =/usr/local/apr # make install 4. install apache # cd/usr/local/ src # tar-zxvf httpd-2.2.23.tar.gz # Music httpd-2.2.23/usr/local/apache2 # cd/usr/local/apache2 #. /configure -- prefix =/usr/local/apache2 -- enable-modules -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr- util -- enable-ssl -- enable-so -- enable-rewrite (-- enable-ssl whether ssl is supported, -enable-so: This module is required to integrate tomcat. -- enable-rewrite supports URL rewriting. -- enable-modules can be used to load more modules) # make install 5. An error occurs when the apache server is configured without modification. # vi/usr/local/apache2/conf/httpd. find # ServerName www.example.com: 80 in conf and remove # www.2cto.com 6. Configure apache startup and add httpd service # cp/usr/local/apache/bin/apachectl/etc/rc. d/init. d/httpd # vi/etc/rc. d/init. d/httpd -- add the following two sentences at the beginning of the file (Note: The three numeric parameters in the first line indicate which Linux-level httpd (, 5) needs to be started respectively ); start No. (85); close no. (15) # chkconfig: 345 85 15 # description: activates/Deactivates add httpd service to Apache Web Server # chkconfig -- add httpd start-up # chkconfig httpd on 7. Open Port 80 of the firewall # vi/etc/sysconfig/iptables after port 22 one row-a input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT # chkconfig iptables on -- restart firewall # reboot -- After restarting the system, you can access apache