1. ์ค๋น์ฌํญ
๋ฆฌ๋
์ค ์๋ฒ ํ๊ฒฝ์ JAVA ๋ฅผ ์ค์นํฉ๋๋ค.
2. JBOSS ๋ค์ด๋ก๋ ๋ฐ ์ค์
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[root@localhost ~] # cd /usr/local/src [root@localhost src] # wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz [root@localhost src] # tar xvfz jboss-as-7.1.1.Final.tar.gz -C /usr/share [root@localhost src] # mv /usr/share/jboss-as-7.1.1.Final/ /usr/share/jboss-as [root@localhost src] # cd /usr/share/jboss-as [root@localhost jboss-as] # groupadd jboss [root@localhost jboss-as] # useradd -s /bin/bash -g jboss jboss [root@localhost jboss-as] # chown -Rf jboss.jboss /usr/share/jboss-as/ [root@localhost jboss-as] # su - jboss [jboss@localhost ] $ java -version java version "1.7.0_10" Java(TM) SE Runtime Environment (build 1.7.0_10-b18) Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode) [jboss@localhost ] $ exit |
3. JBOSS start/stop/restart ์คํฌ๋ฆฝํธ ๋ง๋ค๊ธฐ
1 2 3 4 5 6 7 8 9 |
[root@localhost src] # cd /usr/share/jboss-as/bin/init.d [root@localhost init.d] # cp jboss-as-standalone.sh /etc/init.d/jboss [root@localhost init.d] # vi /etc/init.d/jboss ~~ vi /etc/init.d/jboss ํ์ฌ 16๋ผ์ธ ์ฏค 'export JAVA_HOME' ์๋ ๋ค์ ๋์ค์ ์ถ๊ฐ ํฉ๋๋ค. JBOSS_USER=jboss export JBOSS_USER ~~ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
#!/bin/sh # # JBoss standalone control script # # chkconfig: - 80 20 # description: JBoss AS Standalone # processname: standalone # pidfile: /var/run/jboss-as/jboss-as-standalone.pid # config: /etc/jboss-as/jboss-as.conf # Source function library. . /etc/init.d/functions # Load Java configuration. [ -r /etc/java/java.conf ] && . /etc/java/java.conf export JAVA_HOME JBOSS_USER=jboss export JBOSS_USER # Load JBoss AS init.d configuration. if [ -z "$JBOSS_CONF" ]; then JBOSS_CONF="/etc/jboss-as/jboss-as.conf" fi ~ ์๋ต ~ |
1 2 3 4 5 6 7 8 9 10 |
[root@localhost init.d] # cd /etc/init.d/ [root@localhost init.d] # chmod 755 jboss [root@localhost init.d] # chkconfig --add jboss [root@localhost init.d] # chkconfig --level 234 jboss on [root@localhost init.d] # service jboss start Starting jboss-as: [ OK ] [root@localhost init.d] # service jboss stop jboss-as ๋ฅผ ์ ์ง ์ค: *** JBossAS process (1521) received TERM signal *** [ OK ] [root@localhost init.d] # |
4. JBOSS ๋ฐ์ธ๋ฉ ๋ณ๊ฒฝ
1 2 3 4 |
JBOSS ์ ๊ธฐ๋ณธ ๋ฐ์ธ๋ ์ฃผ์๋ 127.0.0.1 ์
๋๋ค. ์น๋ธ๋ผ์ฐ์ ์์ JBOSS ํ์ธ์ ์ํด ๋ฐ์ธ๋ ์ฃผ์๋ฅผ ๋ณ๊ฒฝํด ๋ณด๊ฒ ์ต๋๋ค. [root@lo ~] # vi /usr/share/jboss-as/standalone/configuration/standalone.xml interface name="public" ๋ถ๋ถ์ ๋ฐ์ธ๋ ์ฃผ์๋ฅผ ๋ณ๊ฒฝํฉ๋๋ค. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:0.0.0.0}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:0.0.0.0}"/> </interface> <!-- TODO - only show this if the jacorb subsystem is added --> <interface name="unsecure"> <!-- ~ Used for IIOP sockets in the standard configuration. ~ To secure JacORB you need to setup SSL --> <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces> |
1 |
[root@localhost ~] # service jboss start |
5. ์น์ ์ ํ์ธ
์น๋ธ๋ผ์ฐ์ ์ฃผ์์ฐฝ์ http://IP์ด๋๋ ์ค:8080 ์
๋ ฅํ์ฌ ์ ์ํฉ๋๋ค.
6. JBOSS Admin ์ฝ์์ ์
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@localhost ~] # cd /usr/share/jboss-as/bin [root@localhost bin]# ./add-user.sh What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): Enter the details of the new user to add. Realm (ManagementRealm) : Username : user_id Password : Re-enter Password : About to add user 'user_id' for realm 'ManagementRealm' Is this correct yes/no? yes Added user 'user_id' to file '/usr/share/jboss-as/standalone/configuration/mgmt-users.properties' Added user 'user_id' to file '/usr/share/jboss-as/domain/configuration/mgmt-users.properties' [root@localhost bin]# |
์น๋ธ๋ผ์ฐ์ ์ฐฝ์ http://ip์ด๋๋ ์ค:9990 ํ์ฌ ๊ด๋ฆฌ์ฝ์๋ก ์ ์ ํฉ๋๋ค.
์ฐธ์กฐ : http://www.davidghedini.com/pg/entry/install_jboss_7_on_centos