본문 바로가기

Linux

openfire 기반의 메신저 프로그램

320x100

openfire 기반의 메신저 프로그램 구축관련 자료

Centos 5.0 기반으로 설치기준(32bit,64bit던 상관없다)

우선 java 가 필요하므로

yum install java* 설치

mysql 으로 설치를 했기때문에

yum install mysql* 설치

mysql 설치 후

root 암호 설정후
mysql>create database openfire;
mysql>flush privileges;
mysql>quit

#vi /etc/my.cnf

 [mysqld]

character-set-client-handshake=FALSE

init_connect="SET collation_connection = utf8_general_ci"

init_connect="SET NAMES utf8"

default-character-set=utf8

character-set-server=utf8

collation-server=utf8_general_ci

추가

php 설치

# yum install php*


모든 준비가 끝났다면 아래 싸이트 가서 openfire 다운로드 후 설치

http://www.igniterealtime.org/downloads/index.jsp

RPM 버전으로 설치는 간단하다. rpm -Uvh 파일.rpm 로 설치를 하던가 그냥 더블클릭

설치가 다됐다면
service openfire start 서비스 실행
http://localhost:9090 접속후 
셋팅 진행
database 관련 항목에서
jdbc:mysql://localhost:3306/openfire?useUnicode=yes&characterEncoding=UTF8
경로를 위처럼 지정 해주면 된다.

그외 특별한 셋팅은 없다.
설치후에 http://localhost:9090 접속후
id/passwd 입력하면 세부적인 셋팅을 할수 있다.
ID는 admin 이다

다 됐다면 openfire 다운 받았던 사이트에 있는 spark 설치후


계정 암호 server 입력후 로긴하면 된다.

자기가 원하는 플러그인 설치해서 사용하면 된다.

http://www.pidgin.im/ 
타 메신저 연동해주는 플러그인 이다. 

 

- java 메모리 늘리기

#vi /etc/sysconfig/openfire 수정

#OPENFIRE_OPTS="-Xmx1024m"

OPENFIRE_OPTS="-Xms256m -Xmx2048m" 으로 수정

#service openfire restart

구축해서 사용하다 보면 업데이트됐다고 뜬다.
업데이트 방법은 간단하다.
service openfire stop
후 업데이트 파일 다운 받은후 
rpm -Uvh openfire-newversion.rpm 
service openfire start
하면 정상적으로 업데이트가 된다.
혹시 모르니 openfire 디렉토리를 백업후 진행하도록 한다.

- 사용 디폴트 포트 
Port 9090 : for the web interface.
Port 9091 : for SSL web interface.
Port 5222 : the main port used for client/server communication by Openfire.
Port 7777 : used for file transfer.
Port 7443 : used for unsecured Http client connections.
Port 7070 : used for secure Http client connections.
Port 3478, 3479 : used by the STUN Servive for entities behind a NAT.

포트를 수정하고 싶다면
환경설정에 서버-서버설정에서 수정 가능하다.

- 한글이 깨진다면
#mysql -u root -p

케릭터셋 확인

 mysql> show variables like '%char%';


-- openfire 버전(3.9) 업그레이드 되면서 java 메모리 수정하는게 변경되었다.

# vi /etc/init.d/openfire

DAEMON_OPTS="$DAEMON_OPTS -server -DopenfireHome=${DAEMON_DIR} \

 -Dopenfire.lib.dir=${DAEMON_LIB} -classpath ${DAEMON_LIB}/startup.jar\

 -jar ${DAEMON_LIB}/startup.jar"

이 부분을

DAEMON_OPTS="-Xms512m -Xmx2048m $DAEMON_OPTS -server -DopenfireHome=${DAEMON_DIR} \
 -Dopenfire.lib.dir=${DAEMON_LIB} -classpath ${DAEMON_LIB}/startup.jar\
 -jar ${DAEMON_LIB}/startup.jar"

빨간색 부분을 추가 해주면 된다.



-- 백업

간단하다 mysql 만 백업 하면 모든게 백업이 된다.

#mysqldump -uroot -p openfire > /backup/openfire.sql


-- 복구

#mysql -uroot -p openfire < /backup/openfire.sql


 -- 파일전송이 느릴때

server - server settings - File Transfer Settings - Proxy Service Disabled


320x100

'Linux' 카테고리의 다른 글

vi 라인 보이게 하기  (0) 2011.04.25
mysql my.conf utf8 변경  (0) 2011.04.21
vim 명령어  (0) 2011.03.31
SCP 옵션  (0) 2011.02.10
Subversion 계정별 권한  (1) 2011.01.20