'openfire'에 해당되는 글 1건

  1. 2014.11.19 Openfire (XMPP) 설치 1
2014. 11. 19. 00:40
Ubuntu에서 OpenFire를 설치해 보자!

1. Openfire를 다운로드 받기 [다운로드 사이트]
- openfire_src_{version}.tar.gz 를 다운로드 받으세요.자 

2. Java (JDK)가 설치가 되어 있어야만 합니다. 자신의 머신에 맞게 JDK를 설치해주세요.

3. Ant 빌드 툴 설치
ant를 ubuntu에 설치해봅시다. (굳이 ant를 설치하지 않아도 포함하고 있습니다.)

4. 컴파일 & 설치 & 실행
$ tar xvfz openfire_src_3_9_3.tar.gz
$ cd openfire_src/build
$ ant
$ mv ../target/openfire /opt/.
$ cd /opt/openfire/bin
$ sudo ./openfire.sh or $ sudo ./openfirectl

5. 설정
http://localhost:9090 or http://{domain-name}:9090
브라우져에서 서버가 설치된 컴퓨터의 9090포트로 접속을 하여 설정을 진행하자.

5.1 Choose Language
  - English 선택 (안타깝게도 아직 한국어는 지원하지 않는다)

5.2 Server Settings: 
  - 도메인 명만 분명히 입력해주시면 됩니다. (같은 컴퓨터에서 진행할 경우 localhost를 다른 컴퓨터를 사용할 경우 적당한 도메인 명을 입력해주면되며 /etc/hosts 파일을 수정하여 테스트를 진행할 수도 있다.)
  - 접속 포트를 수정해줄 수 있다.

5.3 Database Settings
  - Standard Database Connection

5.4 Database Settings - Standard Connection
  - jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true
  - mysql에 database와 user를 미리 Openfire 서버로부터 사용할 수 있는 권한을 주어야 한다.
    (참조 
http://www.mobilehunter.net/105)
예) mysql > create user 'openfire'@'localhost' identified by 'openfire-password';
     mysql > create database openfire;
     mysql > grant all privileges on openfire.* to 'openfire'@'localhost' identified by 'openfire-password';

5.5 Profile Settings
  - Default를 설정하자.

5.6 Administrator Account
  - email과 password를 설정하자

6. admin 접속
username은 admin이다. 
(Administrator Account설정시 email을 입력하였다고 해서 email을 입력하면 안된다. 하지만 password는 Administrator Account 설정 시 입력한 password이다.)

7. openfirectl 설정

### BEGIN INIT INFO
# Provides:          openfire
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start openfire
# Description:       Start the openfire engine.
### END INIT INFO
...
[ -z "$OPENFIRE_USER" ] && OPENFIRE_USER="root"
...
start() {
        # Start daemons.
        echo "Starting openfire: "
        PID=`su - $OPENFIRE_USER -c "nohup $OPENFIRE_RUN_CMD > $OPENFIRE_LOGDIR/nohup.out 2>&1 &"`
        RETVAL=$?

        OPENFIRE_PID=`ps -U $OPENFIRE_USER  -o pid,cmd --no-heading | grep 'DopenfireHome' | grep -v "grep"  | cut -d " " -f 2`
        echo $OPENFIRE_PID >  $OPENFIRE_PIDFILE

        [ $OPENFIRE_PID -gt 0 -a -d /var/lock/subsys ] && touch /var/lock/subsys/openfire

        sleep 1 # allows prompt to return
}

약간의 수정을 하셔야만 Ubuntu에서 정상동작 합니다.
$ sudo cp /opt/openfire/bin/openfirectl /etc/init.d/.
sudo update-rc.d openfirectl defaults




'Tip > 우분투' 카테고리의 다른 글

MySQL 원격접속 허용하기  (0) 2014.11.19
MySQL 접속  (0) 2014.11.19
ant를 ubuntu에 설치해봅시다.  (0) 2014.11.18
MySQL 유저관리  (0) 2014.11.12
Ubuntu의 명령라인에서 패키지 관리  (0) 2014.11.11
Posted by 모바일헌터