博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos安装openfire
阅读量:7009 次
发布时间:2019-06-28

本文共 3172 字,大约阅读时间需要 10 分钟。

hot3.png

1.在下下载openfire

# rpm -ivh openfire-3.9.1-1.i386.rpm

Preparing...                ########################################### [100%]

   1:openfire               ########################################### [100%]

默认安装在 /opt/openfire

注:openfire安装完后到目录文件都在 /opt/openfire 目录下,其中用到的SQL脚本在/opt/openfire/resources/database下面,这里我用的是Oracle数据库,用 https://127.0.0.1:1158/em登录到控制台新建了表空间和用户,接着用PL/SQL Developer  导入openfire_oracle.sql,完了成了openfire所需要的表创建。

特别注意:这里需要将ojdbc6.jar文件拷贝到/opt/openfire/lib目录下,才能启动服务器,否则连接Oracle数据库会报错。我的环境是jdk1.7,Oracle11g

ojdbc6.jar下载地址:

# vi /etc/sysconfig/iptables
追加下面2行
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9090 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9091 -j ACCEPT
:wq保存退出后执行
# service iptables restart

可以使用下面的命令启动服务:

# /opt/openfire/bin/openfire.sh

运行后出现以下错误:/opt/openfire/jre/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

解决方案:http://www.webhostingskills.com/articles/solving_the_problem_installing_openfire_on_centos_64_bit
There is a slight problem with installing Openfire on the latest CentOS 6 64-bit. The server is placed perfectly, runs. Check the status of the server after installation: /etc/init.d/openfire status and see openfire is not running.
Go to the folder with log: /opt/openfire/logs/nohup.out and watch the result of start-up and no error java in the folder /opt/openfire/jre/bin. The file is there, but the problem is that required for Openfire version of the library for 32-bit.

The following problem is solved, set the desired library libldb.i686 type command:

yum install libldb.i686.

重新启动,正常

注意:这里如果你是远程通过SSH操作,可能遇到一个问题,就是当你离开界面后服务就关闭了。如果你看过Linux的入门书可能就会了解其中的关于shell的概念。可是由于很多人像我一样一知半解,所以出现这种问题。解决的办法是要将openfire.sh提交到后台去运行,命令如下 

#setsid /opt/openfire/bin/openfire.sh & 
设置成功! 

或者用保存在/etc/init.d/下的openfire脚本启动服务,命令是/etc/init.d/openfire start

设置为开机自启动

# chkconfig openfire on
# chkconfig --list openfire
openfire        0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
设置成功!
2.在浏览器下输入:http://localhost:9090对openfire进行设置

(1)语言选择:中文简体

(2)服务期设置:选择域及端口,建议默认
(3)数据库设置:根据需要,这里选“标准数据库”
(4)标准数据库设置:选择MySQL,数据库URL填入你的数据库地址端口和数据库名称(请自行创建)用户名密码填入你的mysql的帐号密码,其他根据需要选择填写。继续之后会在你的mysql中创建表并初始化。
(5)特性设置:如果你不打算用LDAP,保留默认
(6)管理员帐户设置:填入系统管理员信息
(7)安装完成

3.mySQL设置

一.修改/etc/my.cnf文件

default-character-set=utf8
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

old_passwords=1
default-character-set=utf8 增加
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql] 增加
default-character-set=utf8 增加

二.启动Mysql并设置隋系统启动

chkconfig mysqld on
chkconfig --list mysqld(查看系统服务)
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
2-5为on,OK。
/etc/rc.d/init.d/mysqld start
三.设置密码
 /usr/bin/mysqladmin -u root password '123456'

四.登陆服务器

#mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or /g.
Your MySQL connection id is 7
Server version: 5.0.77 Source distmysql> ribution

mysql>

五.为openfire创建一个数据库

create database openfire;(必须要有“;”,不然会一直->下去)

测试下数据库,

转载于:https://my.oschina.net/zhangjie830621/blog/290197

你可能感兴趣的文章
黑马程序员-蓝桥杯110问题练习
查看>>
AtCoder Beginner Contest 127 解题报告
查看>>
最大流EK算法
查看>>
在nuxt中引入Font Awesome字体图标库
查看>>
sql trace script
查看>>
程序员,请不要抢系统管理员的饭碗
查看>>
VCS双机由于ID冲突导致启动失败
查看>>
Windows 8上安装本地回环网卡
查看>>
修改计算机名的注意事项
查看>>
PowerBI从Exchange跟踪日志中分析数据和KPI展现
查看>>
你能成为什么样的人,取决于你心中的那颗种子!
查看>>
接口自动化测试系列之PHPUnit介绍和环境搭建
查看>>
通过ssl调用远程WebService
查看>>
SQL Server 何时将“脏页”回写到硬盘
查看>>
笔记本电脑的选购之一(2011年10月)
查看>>
电子商务时代必知的PKI及HTTPS
查看>>
程序员教你如何追女生
查看>>
各种测试用例简要模板
查看>>
SCCM 2007 R2部署、操作详解系列之概念篇一:SCCM功能详解
查看>>
Hyper-V 2016 系列教程34 在局域网内架设Windows时间服务器
查看>>