解决在centos x64 上安装openfire出现的错误

在centos x64 上安装openfire,运行  /etc/init.d/openfire start后发现服务器没法开启,查看log日志:


nohup: failed to run command `/opt/openfire/jre/bin/java': No such file or directory


很奇怪,我是在centos上安装了java,openfire自带的jre就没法使用了,在论坛上搜索到下面的解决办法:


http://community.igniterealtime.org/thread/43673


cd /opt/openfire/jre/bin

cp java java.bak

rm java

ln -s /usr/bin/java java

service openfire start


问题解决^-^



[文章作者]曾健生

[作者邮箱]zengjiansheng1@126.com

[作者QQ]190678908

[博客]  http://blog.csdn.net/newjueqi

http://blog.sina.com.cn/h6k65




[root@yfw ~]# cd /opt/openfire/enterprise [root@yfw enterprise]# ll 总用量 31896 drwxr-xr-x 3 root root 4096 10月 30 14:58 spark-extracted drwxr-xr-x 8 root root 4096 10月 21 17:54 Spark-master -rwxr-xr-x 1 openfire openfire 32648521 10月 30 14:56 Spark-master.zip [root@yfw enterprise]# ls -la Spark-master/ 总用量 76 drwxr-xr-x 8 root root 4096 10月 21 17:54 . drwxr-xr-x 4 openfire openfire 4096 10月 30 14:58 .. drwxr-xr-x 3 root root 4096 10月 21 17:54 core drwxr-xr-x 3 root root 4096 10月 21 17:54 distribution -rw-r--r-- 1 root root 311 10月 21 17:54 .editorconfig drwxr-xr-x 3 root root 4096 10月 21 17:54 emoticons -rw-r--r-- 1 root root 911 10月 21 17:54 .gitattributes drwxr-xr-x 3 root root 4096 10月 21 17:54 .github -rw-r--r-- 1 root root 441 10月 21 17:54 .gitignore drwxr-xr-x 2 root root 4096 10月 21 17:54 .idea -rw-r--r-- 1 root root 11357 10月 21 17:54 LICENSE.txt drwxr-xr-x 22 root root 4096 10月 21 17:54 plugins -rw-r--r-- 1 root root 5049 10月 21 17:54 pom.xml -rw-r--r-- 1 root root 2592 10月 21 17:54 README.md -rw-r--r-- 1 root root 455 10月 21 17:54 SECURITY.md -rw-r--r-- 1 root root 1901 10月 21 17:54 .transifex.yml [root@yfw enterprise]# java -version openjdk version "1.8.0_312" OpenJDK Runtime Environment (build 1.8.0_312-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode) [root@yfw enterprise]# javac -version javac 1.8.0_312 [root@yfw enterprise]# yum install -y maven 上次元数据过期检查:0:16:20 前,执行于 2025年10月30日 星期四 14时47分05秒。 软件包 maven-1:3.5.4-5.module_el8.0.0+39+6a9b6e22.noarch 已安装。 依赖关系解决。 无需任何处理。 完毕! [root@yfw enterprise]# mvn -version -bash: mvn: command not found [root@yfw enterprise]# find /usr/share/maven -name mvn /usr/share/maven/bin/mvn [root@yfw enterprise]# echo 'export PATH="/usr/share/maven/bin:$PATH"' >> ~/.bashrc [root@yfw enterprise]# source ~/.bashrc [root@yfw enterprise]# mvn -version /usr/share/maven/bin/mvn:行118: build-classpath: 未找到命令 错误: 找不到或无法加载主类 org.codehaus.plexus.classworlds.launcher.Launcher 原因: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher [root@yfw enterprise]#
最新发布
10-31
[root@yfw ~]# cd /opt/openfire/enterprise/spark/Spark [root@yfw Spark]# ls -la total 68 drwxr-xr-x 9 root root 4096 Apr 1 2023 . drwxr-xr-x 3 openfire openfire 4096 Oct 30 07:47 .. drwxr-xr-x 2 root root 4096 Apr 1 2023 .install4j -rwxr-xr-x 1 root root 15294 Apr 1 2023 Spark drwxr-xr-x 2 root root 4096 Apr 1 2023 bin drwxr-xr-x 4 root root 4096 Apr 1 2023 documentation drwxr-xr-x 4 root root 4096 Apr 1 2023 lib drwxr-xr-x 2 root root 4096 Apr 1 2023 plugins drwxr-xr-x 3 root root 4096 Apr 1 2023 resources -rwxr-xr-x 1 root root 14336 Apr 1 2023 starter drwxr-xr-x 3 root root 4096 Apr 1 2023 xtra [root@yfw Spark]# cd /opt/openfire/enterprise/spark/Spark [root@yfw Spark]# ./Spark [root@yfw Spark]# chmod +x Spark [root@yfw Spark]# ./Spark [root@yfw Spark]# systemctl status openfireopenfire.service - Openfire XMPP Server Loaded: loaded (/etc/systemd/system/openfire.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2025-10-16 16:06:47 CST; 1 weeks 6 days ago Process: 1242 ExecStart=/opt/openfire/bin/openfire start (code=exited, status=0/SUCCESS) Main PID: 1328 (java) Tasks: 233 (limit: 23712) Memory: 641.0M CGroup: /system.slice/openfire.service ├─1328 /usr/lib/jvm/java-11/bin/java -server -Djdk.tls.ephemeralDHKeySize=matched -Djsse.SSLEn> ├─4101 /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64/bin/java -Xmx1024m -XX:+HeapDum> └─4124 /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64/bin/java -Xmx1024m -XX:+HeapDum> Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable. ...skipping... ● openfire.service - Openfire XMPP Server ● openfire.service - Openfire XMPP Server Loaded: loaded (/etc/systemd/system/openfire.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2025-10-16 16:06:47 CST; 1 weeks 6 days ago Process: 1242 ExecStart=/opt/openfire/bin/openfire start (code=exited, status=0/SUCCESS) Main PID: 1328 (java) Tasks: 233 (limit: 23712) Memory: 641.0M CGroup: /system.slice/openfire.service ├─1328 /usr/lib/jvm/java-11/bin/java -server -Djdk.tls.ephemeralDHKeySize=matched -Djsse.SSLEn> ├─4101 /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64/bin/java -Xmx1024m -XX:+HeapDum> └─4124 /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-4.el8_5.x86_64/bin/java -Xmx1024m -XX:+HeapDum> Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ lines 1-13/13 (END)
10-31
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

newjueqi

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值