1.基本信息
版本 | 1.0.2 |
---|---|
安装机器 | 三台机器 |
账号 | hadoop |
源路径 | /opt/software/apache-storm-1.0.2.tar.gz |
目标路径 | /opt/storm -> /opt/apache-storm-1.0.2/ |
依赖关系 | 无 |
2.安装过程
1).使用hadoop账号解压:
[root @bgs -5p173-wangwenting opt]# su hadoop [hadoop @bgs -5p173-wangwenting opt]$ cd /opt/software [hadoop @bgs -5p173-wangwenting software]$ tar -zxvf /opt/software/apache-storm-${version}tar.gz -C /opt [hadoop @bgs -5p173-wangwenting software]$ cd /opt [hadoop @bgs -5p173-wangwenting opt]$ ln -s /opt/apache-storm-${version}/ /opt/storm |
2).修改环境变量,并使其生效:
[hadoop @bgs -5p173-wangwenting hadoop]$ vim /etc/profile 添加下面的内容: export STORM_HOME=/opt/storm export PATH=${STORM_HOME}/bin:$PATH 使环境变量生效: [hadoop @bgs -5p173-wangwenting hadoop]$ source /etc/profile |
3).修改配置文件storm.yaml
[hadoop @bgs -5p173-wangwenting opt]$ cd /opt/storm/ [hadoop @bgs -5p173-wangwenting storm]$ vim conf/storm.yaml storm.zookeeper.servers: - "172.24.5.173" - "172.24.5.174" - "172.24.5.175" storm.local.dir: "/opt/storm/local" nimbus.host: "172.24.5.173" ui.port: 10088 supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703 |
注意:注意空格的格式问题,很容易出现空格的格式问题,其次6700以及下面的这些与左端是一个tab键的距离。
4).通过scp复制其他两台机器上,并按照第2步修改环境变量。
[hadoop @bgs -5p173-wangwenting storm]$ scp -r /opt/apache-storm-${version} hadoop @bgs -5p174-wangwenting:/opt [hadoop @bgs -5p174-wangwenting opt]$ ln -s /opt/apache-storm-${version}/ /opt/storm [hadoop @bgs -5p173-wangwenting storm]$ scp -r /opt/hadoop/apache-storm-${version} hadoop @bgs -5p175-wangwenting software:/opt/hadoop [hadoop @bgs -5p175-wangwenting opt]$ ln -s /opt/hadoop/apache-storm-${version}/ /opt/hadoop/storm |
5).启动storm集群:
[hadoop @bgs -5p173-wangwenting storm]$ cd /opt/storm/bin [hadoop @bgs -5p173-wangwenting bin]$ nohup ./storm nimbus & [hadoop @bgs -5p173-wangwenting bin]$ nohup ./storm ui & |
b.再在bgs-5p174-wangwenting,bgs-5p175-wangwenting机器上启动supervisor
[hadoop @bgs -5p174-wangwenting bin]$ nohup ./storm supervisor & |
[hadoop @bgs -5p175-wangwenting bin]$ nohup ./storm supervisor & |
6).测试网址:
若能正常访问,说明启动成功