1、安装 rocketmq首先要有java以及maven环境,这里略过,可参考
安装JDK 1.8
安装maven 3.5.1
2、切换目录
root@ubuntu:~$ cd /usr/local
3、按照官网指示,下载源文件 ,下载页
root@ubuntu:/usr/local$ wget h
4、解压文件
root@ubuntu:/usr/local$ unzip rocketmq-all-4.4.0-source-release.zip
5、删除文件
root@ubuntu:/usr/local$ remove rocketmq-all-4.4.0-source-release.zip
6、编译打包程序
切换目录
root@ubuntu:/usr/local$ cd rocketmq-all-4.4.0/
编译打包
root@ubuntu:/usr/local/rocketmq-all-4.4.0$ mvn -Prelease-all -DskipTests clean install -U
7、运行
切换目录
root@ubuntu:/usr/local/rocketmq-all-4.4.0$ cd distribution/target/apache-rocketmq
启动nameserver
root @ubuntu:/usr/local/rocketmq-all-4.4.0/distribution/target/apache-rocketmq$ nohup sh bin/mqnamesrv &
[1] 3107root@ubuntu:/usr/local/rocketmq-all-4.4.0/distribution/target/apache-rocketmq$ nohup: 忽略输入并把输出追加到'/home/root/nohup.out'启动broker
root@ubuntu:/usr/local/rocketmq-all-4.4.0/distribution/target/apache-rocketmq$ nohup sh bin/mqbroker -n localhost:9876 &[2] 3134root@ubuntu:/usr/local/rocketmq-all-4.4.0/distribution/target/apache-rocketmq$ nohup: 忽略输入并把输出追加到'/home/root/nohup.out'备注:这里注意启动可能要注意调下内存设定,最低4G,调内存可在将bin目录下面的runserver.sh、runbroker.sh文件关于启动内存设定参数调整一下 ,修改成
JAVA_OPT=”${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m”
8、按照官网给的简单以及其他示例
进行客户端测试,这里略过
9、安装控制台
前提安装git
切换目录
root@ubuntu:~$ cd /usr/local
创建目录
root@ubuntu:/usr/local$ mkdir rocketmq
下载工程
root@ubuntu:/usr/local/rocketmq$ git clone https://github.com/apache/rocketmq-externals.git
切换目录
root@ubuntu:/usr/local/rocketmq$ cd rocketmq-externals/rocketmq-console/
root@ubuntu:/usr/local/rocketmq/rocketmq-externals/rocketmq-console/$ vi src/main/resources/application.properties
最后完成了