最近搞了一台阿里云的ECS服务器,因为搞活动半年免费,所以就申请了一台,过两天就批准下来,顺便多花了1百多RMB买了固定IP。总体说来还是挺值的,觉得一个人用挺浪费,分享出来跟大家一起玩玩。
搞台服务器主要为了学习即时聊天功能模块的开发,服务器采用OpenFire,i OS前端基于XMPPFrameWork,经过一段时间学习,写了一个开源作品JLWeChat,已从oschina的私有仓库转移到github,欢迎参与讨论交流。
主要功能类似微信的简单聊天功能,包括表情、图片、音频,后台存储基于七牛免费提供云存储。
下面记录下在阿里云ECS服务器配置OpenFire的过程,需要的同学可以参考下,少走弯路。
1、安装Axel
$ apt-get install axel2、下载OpenFire安装文件,目前最新为3.9.3
$ wget -O openfire.tar.gz http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_9_3.tar.gz3、解压到/opt > If using the .tar.gz, extract the archive to /opt or /usr/bin:
$ tar -xzvf openfire_3_9_3.tar.gz$ mv openfire /opt1、执行安装命令
$ netstat -tap | grep mysql如果遇到下面这个错误,请执行下面操作 > apt-get install mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
$ apt-get autoremove mysql* --purge$ apt-get remove apparmor$ apt-get install mysql-server mysql-common$ mysql -umysql> create database openfire;mysql> use openfiremysql> source /opt/openfire/resources/database/openfire_mysql.sql;$ /opt/openfire/bin/openfire start1、数据库设置如下
jdbc:mysql://121.41.129.248:3306/openfire?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
阿里云ECS服务器配置ubuntu安装openfire服务器
原文:http://www.cnblogs.com/ligun123/p/4359954.html