1.下载Apache服务器:(http://www.apache.org),我下载的是apache_2.2.14-win32-x86-openssl-0.9.8k.msi,双击安装即可(若提示先删除的话说明电脑已安装http服务)。
2.启动http服务,找到${http_home}/bin,点击ApacheMonitor.exe,在电脑右下角有一个apache的标志,右击->start,然后访问:127.0.0.1:80,出现It works! 说明成功。还有就是修改http的服务端口,默认是80端口,要修改的话在${http_home}/conf/http.conf下修改。
3.下载mod_jok.so,http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/,访问该网址,根据需要下载对应的mod_jok.so。我下载的是win32/jk-1.2.14/mod_jk-1.2.14-apache-2.0.54.so ,重命名为mod_jok.so。将该文件放在${http_home}/moudles下。
4.修改httpd.conf,导入mode_jk.conf :Include conf/mod_jk.conf
5.在${http_home}/conf下新建mod_jk.conf
# Load mod_jk module. Specify the filename
# of the mod_jk lib you’ve downloaded and
# installed in the previous section
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile conf/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel error
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
JkMountFile conf/uriworkermap.properties
6.在${http_home}/conf下新建uriworkermap.properties
/memcached/*=LoadBalancer
#
# Mount jkstatus to /jkmanager
# For production servers you will need to
# secure the access to the /jkmanager url
#
/jkmanager=jkstatus