客戶買了RedHat的JBossON,所以來寫個安裝手冊備份一下。
先介紹一下安裝環境
a.CentOS 6.3 x86_64 (ram 2048, 1 core)
b.JDK (Oracle JDK1.6.0_41)
c.Postgresql (8.4.13)
d.JBossON (3.1)
1.首先要先安裝JDK,請直接到Oracle下載rpm版本這裡demo的是jdk-6u41-linux-x64-rpm.bin
# chmod 777 jdk-6u41-linux-x64-rpm.bin
# ./jdk-6u41-linux-x64-rpm.bin #執行安裝,rpm預設安裝path為/usr/java/下
# vi /etc/profile
JAVA_HOME=/usr/java/jdk1.6.0_41
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH JAVA_HOME CLASSPATH
# mv /usr/bin/java /usr/bin/java.bak
# mv /usr/bin/javac /usr/bin/javac.bak
# mv /usr/bin/javaws /usr/bin/javaws.bak
# ln -s /usr/java/jdk1.6.0_41/bin/java /usr/bin/java
# ln -s /usr/java/jdk1.6.0_41/bin/javac /usr/bin/javac
# ln -s /usr/java/jdk1.6.0_41/bin/javaws /usr/bin/javaws
# reboot
2.安裝PostgreSQL,然後組態一下JBossON所需的資料庫
# yum install postgresql postgresql-server postgresql-contrib
# service postgresql initdb #初始化資料庫
# chkconfig postgresql on #設定開機啟動
# cd /var/lib/pgsql/data/
# vi pg_hba.conf #連入設定
local all all trust
host all all 192.168.38.0/24 trust
host all all 127.0.0.1/32 trust
# vi postgresql.conf #設定Performance組態
listen_addresses = '*'
max_connections = 60
superuser_reserved_connections = 5
shared_buffers = 80MB
work_mem = 1MB
checkpoint_segments = 10
max_prepared_transactions = 60
# service postgresql restart
# psql -U postgres
postgres=# alter user postgres password '你要的密碼';
postgres=# create user rhqadmin password 'rhqadmin的密碼';
postgres=# create database rhq owner rhqadmin;
postgres=# \l #查看database是否正確建立
rhq | rhqadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres=# \q #離開psql
3.安裝JON
先到redhat的customer portal下載JON。
# cp jon-server-3.1.0.GA.zip /op/
# unzip jon-server-3.1.0.GA.zip
# /opt/jon-server-3.1.0.GA/bin/rhq-server.sh start
*如果用rhq-server.sh start 無法啟動server,可以利用 rhq-server.sh console,來開啟console模式,此模式會將背端jboss啟動的所有訊息列出,方便 debug.
接著就可以用browser去連http://localhost:7080