一、安装
环境:
1,安装java8$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer
java -version(查看是否安装成功)
sudo update-alternatives --config java (通过这个命令可以看到java安装路径)
sudo vim /etc/environment
source /etc/environment
/etc/profile
2,安装maven
sudo apt-get install maven mvn -version
sudo vim /etc/maven/settings.xml
- <mirror>
- id>alimaven</>
- mirrorOf>centralname>aliyunmavenurl>http://maven.aliyun.com/nexus/content/groups/public/
- >ui>HumanReadableNameforthisMirror.>http://uk.maven.org/maven2/
- >jboss-public-repository-group>JBossPublicRepositoryGroup>http://repository.jboss.org/nexus/content/groups/public>
4,下载源代码及编译
> git clone -b develop https://github.com/apache/rocketmq.git > cd rocketmq > mvn -Prelease-all -DskipTests clean install -U > cd distribution/target/apache-rocketmq
5,启动 name server
> nohup sh bin/mqnamesrv & > tail -f ~/logs/rocketmqlogs/namesrv.log The Name Server boot success...
6,启动 broker
> nohup sh bin/mqbroker -n localhost:9876 & > tail -f ~/logs/rocketmqlogs/broker.log The broker[%s,172.30.30.233:10911] boot success...