Today, I purchased Microsoft A0 ECs instances at a price of 0.22 RMB/hour.
768M memory, memory G hard drive, 5 MB dedicated bandwidth
Install Apache2.4.4 in CentOS 6.3
Install the Apache2.4.9 service.
Before installation, check gcc. It is speechless. It is the minimum configuration for installation. Without any software, the system occupies 1.9 GB.
Without gcc, I directly installed gcc in yum.
[Testuser @ localhost ~] Sudo su root
[Root @ localhost ~] Yum install gcc
[Root @ localhost ~] # Yum-y install gcc-c ++
After gcc is installed, you can see that no software is installed, that is, you have to install Apr and apr-util on your own.
Official apr website
Http://apr.apache.org/
Official Apr-util
Http://apr.apache.org/
I direct wget the file to my software directory/opt/soft/
[Testuser @ localhost soft] sudo wget http://apache.fayea.com/apache-mirror//apr/apr-1.5.0.tar.gz
[Testuser @ localhost soft] sudo wget http://apache.fayea.com/apache-mirror//apr/apr-util-1.5.3.tar.gz
[Testuser @ localhost soft] sudo wget http://mirror.esocc.com/apache//httpd/httpd-2.4.9.tar.gz
[Testuser @ localhost soft] sudo wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
Decompress apr-1.5.0.tar.gz
Tar-xzvf apr-1.5.0.tar.gz
Cd apr-util-1.5.3
./Configure -- prefix =/usr/local/apr
Make
Make test
Make install
Decompress apr-util.1.5.3.tar.gz
Tar-xzvf apr-util-1.5.3.tar.gz
Cd apr-util-1.5.3
./Configure -- prefix =/usr/local/apr-util
Make
Make test
Make install
Decompress pcre-8.35.tar.gz
Tar-xzvf pcre-8.35.tar.gz
Cd pcre-8.35
./Configure -- prefix =/usr/local/pcre
Make
Make test
Make install
Decompress httpd-2.4.9.tar.gz
Tar-xzvf httpd-2.4.9.tar.gz
Cd httpd-2.4.9
. /Configure -- prefix =/opt/ansitech/apache2 -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr-util/-- -pcre =/usr/local/pcre/
Make
Make test
Make install
Decompress tomcat-connectors-1.2.39-src.tar.gz
[Root @ localhost sudytech] # tar-xzvf tomcat-connectors-1.2.39-src.tar.gz
[Root @ localhost sudytech] # cd tomcat-connectors-1.2.39-src/native
[Root @ localhost native] #./configure -- prefix =/usr/local/tomcat-connector -- with-apxs =/opt/ansitech/apache2/bin/apxs
[Root @ localhost native] # make
[Root @ localhost native] # make install
Mod_jk.so is generated under/opt/ansitech/apache2/modules /.
4. Configure httpd. conf
The content is as follows:
-----------------------------------------------------------
# Load the mod_jk Module
LoadModule jk_module modules/mod_jk.so
Include conf/mod_jk.conf
-----------------------------------------------------------
Create mod_jk.conf
The content is as follows:
-------------------------------------------------------
JkWorkersFile conf/workers. properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[% a % B % d % H: % M: % S % Y]"
JkOptions + ForwardKeySize + ForwardURICompat-ForwardDirectories
JkRequestLogFormat "% w % V % T"
JKMount/*. jsp worker1
-------------------------------------------------------
Next, we will create two new files under the conf directory of Apache: workers. properties and uriworkermap. properties (which can be omitted)
The content is as follows:
-----------------------------------------------------------
Worker. list = worker1
Worker. worker1.type = ajp13
Worker. worker1.host = 127.0.0.1
Worker. worker1.port = 8009
Worker. worker1.lbfactor = 50
Worker. worker1.cachesize = 10
Worker. worker1.cache _ timeout = 600
Worker. worker1.socket _ keepalive = 1
Worker. worker1.socket _ timeout = 300
-----------------------------------------------------------
Start apache, start tomcat, access, successful!
It's Works ~!
Install Apache2.4.4 in CentOS 6.3