centos openfire rpm包安装.
1. linux jdk rpm包安装.
[root@mail packages]# rpm -ivh jdk-8u25-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk1.8.0_25 ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
jfxrt.jar...
环境变量配置
[root@mail ~]# vim /etc/profile
#Java environment
export JAVA_HOME=/usr/java/jdk1.8.0_25
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
[root@mail ~]# source /etc/profile
[root@mail ~]# java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
[root@mail ~]#
2.安装mysql(此处用rpm包方式,也可以用源码包方式安装).
2.1配置好yum源,先检查本机上有无安装过mysql
rpm -qa | grep mysql*
2.2 用yum 进行mysql包安装.
yum install mysql*
2.3 启动mysql服务:
mysqladmin -u root password 123456
2.6 给客户端赋权限.
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456"
3.安装anache Ant
http://ant.apache.org/ apache-ant下载
[root@mail u01]# tar xf apache-ant-1.9.4-bin.tar.gz
[root@mail u01]# mv apache-ant-1.9.4 /usr/local/ant
[root@mail u01]#
[root@mail u01]# ll /usr/local/ant/
total 380
drwxr-xr-x 2 root root 4096 Dec 10 09:19 bin
drwxr-xr-x 3 root root 4096 Dec 10 09:19 etc
-rw-r--r-- 1 root root 11253 Apr 30 2014 fetch.xml
-rw-r--r-- 1 root root 4445 Apr 30 2014 get-m2.xml
-rw-r--r-- 1 root root 126 Apr 30 2014 INSTALL
-rw-r--r-- 1 root root 92261 Apr 30 2014 KEYS
drwxr-xr-x 2 root root 4096 Dec 10 09:19 lib
-rw-r--r-- 1 root root 15289 Apr 30 2014 LICENSE
drwxr-xr-x 8 root root 4096 Dec 10 09:19 manual
-rw-r--r-- 1 root root 305 Apr 30 2014 NOTICE
-rw-r--r-- 1 root root 4119 Apr 30 2014 README
-rw-r--r-- 1 root root 225057 Apr 30 2014 WHATSNEW
[root@mail u01]#
配置环境变量.
[root@mail u01]# vim /etc/profile
#Ant environment
export ANT_HOME=/usr/local/ant
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
[root@mail u01]#
[root@mail u01]# source /etc/profile
[root@mail u01]#
[root@mail u01]#
4.安装openfire(rpm方式)
http://www.igniterealtime.org/downloads/index.jsp 下载(openfire rpm包或源码包)
[root@mail u01]# ll
total 68868
-rw-r--r-- 1 root root 70513157 Dec 10 09:38 openfire-3.9.3-1.i386.rpm
drwxr-xr-x. 4 root root 4096 Dec 10 09:42 packages
[root@mail u01]#
[root@mail u01]#
[root@mail u01]# rpm -ivh openfire-3.9.3-1.i386.rpm
Preparing... ########################################### [100%]
1:openfire ########################################### [100%]
[root@mail u01]#
默认安装在
[root@mail u01]# ll /opt/openfire/
total 224
drwxr-xr-x 2 daemon daemon 4096 Dec 10 09:42 bin
-rw-r--r-- 1 daemon daemon 175122 May 7 2014 changelog.html
drwxr-xr-x 2 daemon daemon 4096 Dec 10 09:42 conf
drwxr-xr-x 4 daemon daemon 4096 Dec 10 09:42 documentation
drwxr-xr-x 5 daemon daemon 4096 Dec 10 09:42 jre
drwxr-xr-x 2 daemon daemon 4096 Dec 10 09:42 lib
-rw-r--r-- 1 daemon daemon 10871 May 7 2014 LICENSE.html
drwxr-xr-x 2 daemon daemon 4096 May 7 2014 logs
drwxr-xr-x 3 daemon daemon 4096 Dec 10 09:42 plugins
-rw-r--r-- 1 daemon daemon 5332 May 7 2014 README.html
drwxr-xr-x 7 daemon daemon 4096 Dec 10 09:42 resources
[root@mail u01]#
启动openfire
[root@mail ~]# /opt/openfire/bin/openfire.sh start &
[1] 3427
[root@mail ~]#
[root@mail ~]# Openfire 3.9.3 [Dec 10, 2014 9:48:56 AM]
Admin console listening at http://mail.lanhaihuimail.com:9090
[root@mail ~]# ps -ef |grep openfire
root 3427 2295 14 09:48 pts/1 00:00:02 /opt/openfire/jre/bin/java -server -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/startup.jar -jar /opt/openfire/lib/startup.jar
root 3454 2295 0 09:49 pts/1 00:00:00 grep openfire
[root@mail ~]#
5.mysql数据库创建openfire database.
[root@mail ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database openfire default character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> use openfire;
Database changed
mysql> source /opt/openfire/resources/database/openfire_mysql.sql;
mysql> grant all on openfire.* to admin@"%" identified by 'admin'
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
6.windows客户端浏览器进行设置.
http://192.168.1.128:9090 (192.168.1.128为我虚拟机server ip,9090为openfire的默认端口)
6.1 语言先把英文或简体中文.
6.2 服务器设置. 域名 我这里写成了Server ip(192.168.1.128),其它端口默认.
6.3 数据库设置 此处选择了 标准数据库连接
6.4 数据库设置 数据库选择mysql
JDBC驱动程序类:com.mysql.jdbc.Driver
jdbc:mysql://[host-name]:3306/[database-name]?rewriteBatchedStatements=true
host-name建议写Server IP. database-name写mysql中openfire的数据库名称.
解决数据库字符编码问题,可以在后面加
?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
即 jdbc:mysql://192.168.1.128:3306/openfire?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
6.5 用户名与密码为mysql 用户root的用户名与密码.
7.外形设置: 初使设置.
8. openfire 管理员用户设置.
设置用户admin 密码与邮箱.
9. 客户端park登录.
openfire设置完毕后,在openfire中设置添加用户后,用spark就可以进行通讯了。
http://www.igniterealtime.org/downloads/index.jsp spark下载.
spark软件登录,即可进行通讯.
注: 1.此处openfire安装遇到一个异常. openfire服务用/opt/openfire/bin/openfire.sh start & 脚本启到后台.
把/etc/init.d/openfire命令,用chkconfig加载到开机自动启动.测试机SERVER,再次启动后,openfire客户端http://192.168.1.128:9090登录时,
又提示重新注册openfire,选择完语言选项后,点击服务设置后,报如下错误.
HTTP ERROR 500 Problem accessing /setup/setup-profile-settings.jsp server error
查询许多资料,发现用/opt/openfire/bin/openfire.sh start, openfire客户端注册后,如测试机server重新启动,用/etc/init.d/openfire命令开机自启动,
就会报如上错误. chkconfig --level 345 openfire off, openfire开机启动关闭.
把/opt/openfire/bin/openfire.sh start & 脚本写入/etc/rc.d/rc.local中,解决问题.
2.如上异常,也做过ln -s /opt/openfire/bin/openfire.sh /etc/init.d/openfire或 cp /opt/openfire/bin/openfire.sh /etc/init.d/openfire
在chkconfig -add openfire时,报不支持此服务.
1. linux jdk rpm包安装.
[root@mail packages]# rpm -ivh jdk-8u25-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk1.8.0_25 ########################################### [100%]
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
jfxrt.jar...
环境变量配置
[root@mail ~]# vim /etc/profile
#Java environment
export JAVA_HOME=/usr/java/jdk1.8.0_25
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
[root@mail ~]# source /etc/profile
[root@mail ~]# java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
[root@mail ~]#
2.安装mysql(此处用rpm包方式,也可以用源码包方式安装).
2.1配置好yum源,先检查本机上有无安装过mysql
rpm -qa | grep mysql*
2.2 用yum 进行mysql包安装.
yum install mysql*
2.3 启动mysql服务:
service mysqld start 或/etc/init.d/mysqld start
2.4 把mysql服务加入开机自启动
chkconfig -add mysqld
chkconfig --level 345 mysqld on
2.5 刚安装完的mysql密码为空,故需要设置一个mysql root用户密码.2.4 把mysql服务加入开机自启动
chkconfig -add mysqld
chkconfig --level 345 mysqld on
mysqladmin -u root password 123456
2.6 给客户端赋权限.
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456"
3.安装anache Ant
http://ant.apache.org/ apache-ant下载
[root@mail u01]# tar xf apache-ant-1.9.4-bin.tar.gz
[root@mail u01]# mv apache-ant-1.9.4 /usr/local/ant
[root@mail u01]#
[root@mail u01]# ll /usr/local/ant/
total 380
drwxr-xr-x 2 root root 4096 Dec 10 09:19 bin
drwxr-xr-x 3 root root 4096 Dec 10 09:19 etc
-rw-r--r-- 1 root root 11253 Apr 30 2014 fetch.xml
-rw-r--r-- 1 root root 4445 Apr 30 2014 get-m2.xml
-rw-r--r-- 1 root root 126 Apr 30 2014 INSTALL
-rw-r--r-- 1 root root 92261 Apr 30 2014 KEYS
drwxr-xr-x 2 root root 4096 Dec 10 09:19 lib
-rw-r--r-- 1 root root 15289 Apr 30 2014 LICENSE
drwxr-xr-x 8 root root 4096 Dec 10 09:19 manual
-rw-r--r-- 1 root root 305 Apr 30 2014 NOTICE
-rw-r--r-- 1 root root 4119 Apr 30 2014 README
-rw-r--r-- 1 root root 225057 Apr 30 2014 WHATSNEW
[root@mail u01]#
配置环境变量.
[root@mail u01]# vim /etc/profile
#Ant environment
export ANT_HOME=/usr/local/ant
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
[root@mail u01]#
[root@mail u01]# source /etc/profile
[root@mail u01]#
[root@mail u01]#
4.安装openfire(rpm方式)
http://www.igniterealtime.org/downloads/index.jsp 下载(openfire rpm包或源码包)
[root@mail u01]# ll
total 68868
-rw-r--r-- 1 root root 70513157 Dec 10 09:38 openfire-3.9.3-1.i386.rpm
drwxr-xr-x. 4 root root 4096 Dec 10 09:42 packages
[root@mail u01]#
[root@mail u01]#
[root@mail u01]# rpm -ivh openfire-3.9.3-1.i386.rpm
Preparing... ########################################### [100%]
1:openfire ########################################### [100%]
[root@mail u01]#
默认安装在
[root@mail u01]# ll /opt/openfire/
total 224
drwxr-xr-x 2 daemon daemon 4096 Dec 10 09:42 bin
-rw-r--r-- 1 daemon daemon 175122 May 7 2014 changelog.html
drwxr-xr-x 2 daemon daemon 4096 Dec 10 09:42 conf
drwxr-xr-x 4 daemon daemon 4096 Dec 10 09:42 documentation
drwxr-xr-x 5 daemon daemon 4096 Dec 10 09:42 jre
drwxr-xr-x 2 daemon daemon 4096 Dec 10 09:42 lib
-rw-r--r-- 1 daemon daemon 10871 May 7 2014 LICENSE.html
drwxr-xr-x 2 daemon daemon 4096 May 7 2014 logs
drwxr-xr-x 3 daemon daemon 4096 Dec 10 09:42 plugins
-rw-r--r-- 1 daemon daemon 5332 May 7 2014 README.html
drwxr-xr-x 7 daemon daemon 4096 Dec 10 09:42 resources
[root@mail u01]#
启动openfire
[root@mail ~]# /opt/openfire/bin/openfire.sh start &
[1] 3427
[root@mail ~]#
[root@mail ~]# Openfire 3.9.3 [Dec 10, 2014 9:48:56 AM]
Admin console listening at http://mail.lanhaihuimail.com:9090
[root@mail ~]# ps -ef |grep openfire
root 3427 2295 14 09:48 pts/1 00:00:02 /opt/openfire/jre/bin/java -server -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/startup.jar -jar /opt/openfire/lib/startup.jar
root 3454 2295 0 09:49 pts/1 00:00:00 grep openfire
[root@mail ~]#
5.mysql数据库创建openfire database.
[root@mail ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database openfire default character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> use openfire;
Database changed
mysql> source /opt/openfire/resources/database/openfire_mysql.sql;
mysql> grant all on openfire.* to admin@"%" identified by 'admin'
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
6.windows客户端浏览器进行设置.
http://192.168.1.128:9090 (192.168.1.128为我虚拟机server ip,9090为openfire的默认端口)
6.1 语言先把英文或简体中文.
6.2 服务器设置. 域名 我这里写成了Server ip(192.168.1.128),其它端口默认.
6.3 数据库设置 此处选择了 标准数据库连接
6.4 数据库设置 数据库选择mysql
JDBC驱动程序类:com.mysql.jdbc.Driver
jdbc:mysql://[host-name]:3306/[database-name]?rewriteBatchedStatements=true
host-name建议写Server IP. database-name写mysql中openfire的数据库名称.
解决数据库字符编码问题,可以在后面加
?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
即 jdbc:mysql://192.168.1.128:3306/openfire?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
6.5 用户名与密码为mysql 用户root的用户名与密码.
7.外形设置: 初使设置.
8. openfire 管理员用户设置.
设置用户admin 密码与邮箱.
9. 客户端park登录.
openfire设置完毕后,在openfire中设置添加用户后,用spark就可以进行通讯了。
http://www.igniterealtime.org/downloads/index.jsp spark下载.
spark软件登录,即可进行通讯.
注: 1.此处openfire安装遇到一个异常. openfire服务用/opt/openfire/bin/openfire.sh start & 脚本启到后台.
把/etc/init.d/openfire命令,用chkconfig加载到开机自动启动.测试机SERVER,再次启动后,openfire客户端http://192.168.1.128:9090登录时,
又提示重新注册openfire,选择完语言选项后,点击服务设置后,报如下错误.
HTTP ERROR 500 Problem accessing /setup/setup-profile-settings.jsp server error
查询许多资料,发现用/opt/openfire/bin/openfire.sh start, openfire客户端注册后,如测试机server重新启动,用/etc/init.d/openfire命令开机自启动,
就会报如上错误. chkconfig --level 345 openfire off, openfire开机启动关闭.
把/opt/openfire/bin/openfire.sh start & 脚本写入/etc/rc.d/rc.local中,解决问题.
2.如上异常,也做过ln -s /opt/openfire/bin/openfire.sh /etc/init.d/openfire或 cp /opt/openfire/bin/openfire.sh /etc/init.d/openfire
在chkconfig -add openfire时,报不支持此服务.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28569596/viewspace-1363072/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28569596/viewspace-1363072/