當前位置:網站首頁>Cenos7安裝mqtt服務器apache-artemis shell 脚本安裝

Cenos7安裝mqtt服務器apache-artemis shell 脚本安裝

2022-05-15 06:04:53puamac

#!/bin/bash
#Cenos7安裝mqtt服務器apache-artemis
wget https://mirrors.tuna.tsinghua.edu.cn/apache/activemq/activemq-artemis/2.22.0/apache-artemis-2.22.0-bin.tar.gz --no-check-certificate
tar -zxvf apache-artemis-2.22.0-bin.tar.gz
mv apache-artemis-2.22.0/ /opt/
# java 需要昇級到高版本
java -version
wget https://repo.huaweicloud.com/java/jdk/13+33/jdk-13_linux-x64_bin.tar.gz
mkdir /usr/local/java/
tar -zxvf jdk-13_linux-x64_bin.tar.gz -C /usr/local/java/
#vi /etc/profile
#export JAVA_HOME=/usr/local/java/jdk-13
#export JRE_HOME=${JAVA_HOME}/jre
#export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
#export PATH=${JAVA_HOME}/bin:$PATH
#cat >> /etc/profile11111<< EOF
##java
#export JAVA_HOME=/usr/local/java/jdk-13
#export JRE_HOME=${JAVA_HOME}/jre
#export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
#export PATH=${JAVA_HOME}/bin:$PATH
#EOF
echo "#java -version">> /etc/profile
echo "JAVA_HOME=/usr/local/java/jdk-13">> /etc/profile
echo 'JRE_HOME=${JAVA_HOME}/jre'>> /etc/profile
echo 'CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib'>> /etc/profile
echo 'PATH=${JAVA_HOME}/bin:$PATH'>> /etc/profile
source /etc/profile
java -version

cd /opt/apache-artemis-2.22.0/bin/
./artemis create --user admin --password admin --role admins --allow-anonymous true /opt/artemis
cd /opt/artemis/etc/
#vi bootstrap.xml
# localhost 替換為0.0.0.0
#vi jolokia-access.xml
# localhost 替換為0.0.0.0
#關閉防火牆
systemctl stop firewalld
systemctl disable firewalld
"/opt/artemis/bin/artemis-service" start


版權聲明
本文為[puamac]所創,轉載請帶上原文鏈接,感謝
https://cht.chowdera.com/2022/135/202205142243165302.html

隨機推薦