Install JBoss AS in CentOS
a) install JDK, both 1.5 and 1.6 are suitable.
[root@centos ~]# yum install java-1.6*
[root@centos]# vi /etc/profile JAVA_HOME=/usr/java/jdk1.6.0 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar [root@centos ~]# java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
b) install JBoss.
[root@centos ~]# cd /usr/java/jboss-5.1.0.GA [root@centos ~]# jar -xf jboss-5.1.0.GA.zip [root@centos ~]# vi jboss
#!/usr/bin/python
import os,sys,stat
if len(sys.argv)<2 :
        print 'No action specified.'
	print 'usage: jboss (start|stop|restart)'
        sys.exit()
#change or add an environment variable.:
JBOSS_HOME = '/usr/java/jboss-5.1.0.GA'
os.putenv('JBOSS_HOME', JBOSS_HOME)
STARTCMD = JBOSS_HOME +'/bin/run.sh -c default -b 0.0.0.0 &'
SHUTDOWNCMD = JBOSS_HOME + '/bin/shutdown.sh -S'
option = sys.argv[1]
if option == 'start' :	
        os.system(STARTCMD)
elif option == 'stop' :	
        os.system(SHUTDOWNCMD)
elif option == 'restart' :
	os.system(SHUTDOWNCMD)
	os.system(STARTCMD)
else :
	print 'usage: jboss (start|stop|restart)'
        sys.exit()By default JBoss listens only to localhost, keep this in mind, and provide the startup with the “-b 0.0.0.0″ if you want your installation be accessible from anywhere.
[root@centos ~]# chmod 755 jboss [root@centos ~]# chmod 755 /usr/java/jboss-5.1.0.GA/bin/*.sh [root@centos ~]# ./jboss start [root@centos ~]# ./jboss stop
相关推荐
  凯哥Java    2020-03-28  
   forliberty    2015-05-04  
   Strongding    2011-09-04  
   Congpanpan    2011-04-30  
   linuxisperfect    2008-10-27  
   tianshijianbing    2008-09-05  
   stoneechogx    2019-10-23  
   xieronghua    2019-10-11  
   姚强    2016-01-05  
   llystar    2017-08-10  
   lvzhiliang    2018-11-29  
   宁静致远    2017-08-10  
   菜鸟上路CCLinux    2014-11-06  
   85530194    2017-12-27  
   hunningtu    2011-07-15  
   farwang    2011-07-10  
   enen0    2011-05-12  
   mahy    2011-05-10