CentOS 5.4下基于Jabber/XMPP协议的Openfire服务器配置笔记

平台 GNU/Linux
版本 CentOS 5.4 X86_X64

1、首先安装MySQL数据库,安装mysql的依赖就不说了,你也直接可以用yum安装
wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.56.tar.gz
tar xzvf mysql-5.1.56.tar.gz
cd mysql-5.1.56
./configure –prefix=/usr/local/mysql \
–without-debug \
–enable-thread-safe-client \
–enable-assembler \
–with-mysqld-user=mysql \
–with-unix-socket-path=/usr/local/mysql/sock/mysql.sock \
–with-mysqld-ldflags=-all-static \
–with-client-ldflags=-all-static \
–with-charset=latin1 \
–with-extra-charsets=utf8,gbk \
–with-plugins=innobase \
–with-ssl \
–enable-local-infile \
–with-server-suffix=-community
make && make install

groupadd dba
useradd -g dba mysql
chown-R dba:mysql /usr/local/mysql/.

cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
sed -i ‘s/skip-locking/skip-external-locking/g’ /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db –user=mysql –basedir=/usr/local/mysql
/usr/local/mysql/bin/mysqld_safe &
/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’
echo “/usr/local/mysql/bin/mysqld_safe &”>>/etc/rc.local

2、安装JDK
wget http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jdk-6u25-linux-x64.bin
chmod +x jdk-6u25-linux-x64.bin
./jdk-6u25-linux-x64.bin
mv jdk1.6.0_25/ /usr/local/jdk

vim /etc/profile ADD
JAVA_HOME=”/usr/local/jdk”
CLASS_PATH=”$JAVA_HOME/lib:$JAVA_HOME/jre/lib”
PATH=”.:$PATH:$JAVA_HOME/bin”
export JAVA_HOME

source /etc/profile

3、安装openfire
如果你觉得RMP更适合你就去这里下载:http://www.igniterealtime.org/downloads/index.jsp
wget http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3_7_0.tar.gz
tar xzvf openfire_3_7_0.tar.gz -C /usr/local/

4、创建数据库、导入数据
/usr/local/mysql/bin/mysql -u root -p
CREATE DATABASE openfire default character set utf8 default collate utf8_general_ci;
USE openfire;
SOURCE /usr/local/openfire/resources/database/openfire_mysql.sql
退出mysql命令行

5、启动和安装openfire
/usr/local/openfire/bin/openfire start //启动openfire
打开有游览器访问http://ip-or-host:9090/ 自己配进入webui安装了很容易,更多的内容可以查看官方文档

注意:如果你填入的数据库url不是这种格式的时候,可能会出现乱码:jdbc:mysql://ip-or-host:3306/openfire?useUnicode=true&characterEncoding=utf8

除非注明,Terrancesiu Notes文章均为原创,转载请以链接形式标明本文地址
转载自:Terrancesiu Notes
原文链接:http://terrancesiu.com/post/597.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值