1.安装编译环境gcc
gcc-4.2.0-3.aix6.1.ppc.rpm
gcc-cplusplus-4.2.0-3.aix6.1.ppc.rpm
libgcc-4.2.0-3.aix6.1.ppc.rpm
libstdcplusplus-4.2.0-3.aix6.1.ppc.rpm
libstdcplusplus-devel-4.2.0-3.aix6.1.ppc.rpm
1.1下载地址:
http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/rpmgroups.html#Development/Tools
ftp下载地址:
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/
1.2安装gcc
rpm -ivh gcc-4.2.0-3.aix6.1.ppc.rpm
rpm -ivh libgcc-4.2.0-3.aix6.1.ppc.rpm
rpm -ivh libstdcplusplus-4.2.0-3.aix6.1.ppc.rpm
rpm -ivh libstdcplusplus-devel-4.2.0-3.aix6.1.ppc.rpm
rpm -ivh gcc-cplusplus-4.2.0-3.aix6.1.ppc.rpm
2.安装apche
2.1到apache官网
http://httpd.apache.org/下载最新版本的httpd-2.2.20.tar.gz
2.2远程登录aix6
telnet 10.161.14.20
输入用户名:root
输入密码: xxx
2.3利用ftp上传httpd-2.2.20.tar.gz到aix6系统中/opt/soft目录下
创建文件夹soft
cd /opt
mkdir soft
2.4解压httpd-2.2.20.tar.gz
cd /opt/soft
gzip -d httpd-2.2.20.tar.gz
tar -xvf httpd-2.2.20.tar
2.5创建apche安装目录
cd /opt
mkdir cist
cd cist
mkdir apache2
2.6拷贝httpd-2.2.20文件到/opt/cist目录下
cd /opt/soft
cp -r httpd-2.2.20 /opt/cist/httpd-2.2.20
2.7配置apche安装环境,编译,安装.
./configure --prefix=/opt/cist/apache2/ --enable-proxy --enable-proxy-ajp --enable-proxy-balancer --enable-proxy-connect --enable-proxy-http --enable-info
make
make install
2.8修改配置文件
cd /opt/cist/apche2/conf
vi httpd.conf
把以下的两行
User daemon
Group daemon
改为
User
nobody
Group
nobody
3.配置apche负载
3.1修改配置文件httpd.conf
cd /opt/cist/apche2/conf
vi httpd.conf
# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf
# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf
# Language settings
#Include conf/extra/httpd-languages.conf
# User home directories
#Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
<!--取消注释,配置后台监控-->
Include conf/extra/httpd-info.conf
# Virtual hosts
<!--取消注释,配置apche虚拟主机-->
Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf
# Various default settings
#Include conf/extra/httpd-default.conf
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
<!--配置AJP分发节点-->
ProxyRequests Off
<proxy balancer://gycluster>
BalancerMember ajp://10.161.14.55:8055/gis loadfactor=1 route=gis55
BalancerMember ajp://10.161.14.20:8020/gis loadfactor=1 route=gis20
</proxy>
3.2开启后台监控
为了了解某个节点负载多少,响应时间多久,服务是否正常呢?Apache提供了负载均衡监控平台,默认情况下服务是关闭的,需要通过修改配置文件开启服务,开启服务后,通过访问http://localhost/balancer-manager就可以查看负载详细情况
除了用于负载均衡还有http://localhost/server-status和http://localhost/server-info
修改配置文件httpd-info.conf
cd /opt/cist/apache2/conf/extra/
vi httpd-info.conf
#
# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_status (for the server-status handler),
# mod_info (for the server-info handler)
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".localhost" to match your domain to enable.
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
<!--修改为all,允许所有IP访问. 默认为.localhost只允许localhost访问-->
Allow from [color=blue]all
[/color]
</Location>
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".localhost" to match your domain to enable.
#
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
<!--修改为all,允许所有IP访问. 默认为.localhost只允许localhost访问-->
Allow from [color=blue]all
[/color]
</Location>
<!--开启负载信息监控-->
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from all
</Location>
3.3配置apche虚拟主机
修改配置文件httpd-vhosts.conf
cd /opt/cist/apache2/conf/extra/
vi httpd-vhosts.conf
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.localhost
DocumentRoot "D:/Apache2.2/docs/dummy-host.localhost"
<!--配置负载均衡节点balancer://gycluster-->
ServerName localhost
ServerAlias localhost
ProxyPass /gygis balancer://gycluster/ stickysession=jsessionid nofailover=On
ProxyPassReverse /gygis balancer://gycluster/
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.localhost
DocumentRoot "D:/Apache2.2/docs/dummy-host2.localhost"
ServerName dummy-host2.localhost
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common
</VirtualHost>
3.4开启/停止apche
cd /opt/cist/apache2/bin
./apachectl -k start
或者
./apachectl -k stop
或者
./apachectl -k restart
3.5配置Tomcat相关模块(AJP)
vi /opt/cist/tomcat7/conf/server.xml
3.5.1开启AJP配置
<!--修改ajp连接端口-->
<Connector
port="8055" protocol="AJP/1.3"
URIEncoding="UTF-8"
redirectPort="8443" />
3.5.2开启Session唯一,粘性会话
<Engine defaultHost="localhost" name="Catalina"
jvmRoute="gis55">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--取消注释开启session同步-->
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
</Host>
</Engine>
3.6修改JAVAEE应用中WebRoot/WEB-INF/web.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="xxx" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>xxx</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<!--开启分布式处理-->
<distributable/>
</web-app>
4.AIX重启时,apache自动启动
4.1创建启动脚本
cd /etc
touch rc.apache
chown g+x rc.apache或者 chmod 700 rc.apache
vi rc.apache
<!--创建启动脚本-->
#!/usr/bin/ksh
echo "----------------apache starting---------------------------------"
su - root "-c /opt/cist/apache2/bin/apachectl -k start"
echo "----------------apache start completed---------------------------------"
4.2添加启动脚本到/etc/inittab最下面,实现自启动。并且输出启动日志。
vi /etc/inittab
rc.apache:2:wait:/etc/rc.apache > /dev/console 2>&1
参考博文:
http://www.linuxidc.com/Linux/2011-01/31484.htm
分享到:
相关推荐
IBM AIX 下安装Tomcat6 和jdk6配合使用
AIX下安装JDK和Tomcat的详细步骤 AIX是一种UNIX操作系统,安装JDK和Tomcat需要按照特定的步骤进行。下面是从头到尾的安装步骤: 一、安装JDK 首先,需要将JDK的安装文件java6_64.sdk.tar上传到AIX服务器上,然后...
在AIX操作系统上安装Apache Tomcat是一个相对复杂的过程,因为AIX系统是IBM开发的一种专为大型企业级服务器设计的Unix变体。以下是一个详细的步骤指南: 首先,我们需要准备两个关键的软件包:Apache Tomcat和IBM的...
### AIX环境下Apache 2.4的编译安装详解 #### 一、环境准备与依赖安装 在AIX系统上编译安装Apache 2.4需要先准备好一系列的依赖库,包括PCRE(Perl Compatible Regular Expressions)、APR(Apache Portable ...
aix6.1+oracle11g+rac安装配置手册 aix6系统安装,裸设备配置 oracle11G-RAC安装配置
根据给定文件的部分内容,我们可以提炼出关于AIX+5L和AIX+5.3安装及配置的关键知识点。以下是对这些知识点的详细说明: ### AIX+5L 安装及配置说明 #### 一、设置boot引导顺序 - **对于服务器而言**: 1. 打开...
6. **测试安装**:安装完成后,通过运行`sqluldr2 -version`或`sqlldr -help`来验证安装是否成功。 7. **依赖处理**:尽管sqluldr2是Oracle的一部分,但它可能依赖于系统的一些库。在AIX上,可能需要安装额外的开发...
AIX操作系统安装配置规范详细解读 在IT行业中,AIX(Advanced Interactive eXecutive)是一种由IBM开发的Unix操作系统,主要用于IBM的Power Systems服务器。AIX因其稳定性、安全性以及在大型企业环境中的卓越性能而...
在本文中,我们将深入探讨如何在AIX操作系统上安装和配置Apache Tomcat,这是一个流行的Java Servlet容器,用于部署和运行Java web应用程序。Tomcat 5.5.33 版本是本文的重点,但基本步骤适用于其他版本。 首先,...
在Linux和AIX操作系统上安装和配置DB2需要深入了解操作系统环境、系统资源管理以及DB2的特性和配置选项。以下是对这个压缩包文件中可能包含的知识点的详细解释: 1. **Linux环境下的DB2安装**: - **系统要求**:...
在RS6000.AIX环境下安装Apache Tomcat是一个涉及多步骤的过程,主要涉及下载、安装JDK、解压和配置Tomcat、启动和停止Tomcat,以及对Tomcat进行基本的配置。以下是对这些步骤的详细说明: 1. **下载软件**: - ...
在AIX操作系统上配置Jboss集群的过程中,Apache服务器扮演了重要的角色,用于负载均衡和管理应用服务器。以下是根据标题和描述中的内容详细说明的步骤: 首先,为了在AIX上安装Jboss集群所需的Apache组件,我们需要...
AIX安装配置脚本,本人小白写的配置脚本。 请直接运行主脚本 #sh AIX_config_6L_shell.sh 试用版说明:内容的话5个功能 1.修改登录数 2.修改文件传输的限制 3.修改pagespace 4.修改chgsys 5.刷文件系统大小 主程序...
AIX 上安装 DB2 的经验分享 在工作中,我们经常需要在 AIX 平台上安装 DB2 数据库,本文将分享作者在安装 DB2 9.1 For AIX 5.3 和 DB2 8.1 For AIX 5.2 环境时的经验,旨在帮助大家顺利完成安装。 获取安装程序 ...
AIX系统配置及参数修改是AIX系统安装的重要步骤。在这个步骤中,需要对AIX系统进行配置和参数修改,以确保系统能够正确地运行。 3.1 服务器IP及路由配置 服务器IP及路由配置是AIX系统配置的重要步骤。在这个步骤中...
2. **启动SNMPd及相关进程**: 确保SNMP守护进程`snmpd`和相关进程(如`hostmibd`, `snmpmibd`, `aixmibd`)在系统启动时自动运行。这可以通过编辑`/etc/rc.tcpip`文件完成。在文件中添加或修改相关行,指定启动...
### WebLogic与Apache集成安装及配置详解 #### 一、概述 本文档旨在详细介绍如何在IBM AIX 64位操作系统上安装配置JDK 1.6、Apache HTTP服务器以及WebLogic 10,并实现三者的集成。通过这种方式,可以构建一个稳定...
6. **安装过程中的验证**:安装程序可能会进行一些硬件和系统级别的验证,确保满足DB2的最低需求。 7. **完成安装**:安装结束时,系统会生成一些配置文件和启动脚本,供后续启动和管理DB2使用。 四、启动和配置...