Deploying Storm
Obtaining Storm
- Download the Storm archive.
1wget https://archive.apache.org/dist/storm/apache-storm-1.2.1/apache-storm-1.2.1.tar.gz - Place apache-storm-1.2.1.tar.gz in the /usr/local directory on server1 and decompress it.
1 2
mv apache-storm-1.2.1.tar.gz /usr/local tar -zxvf apache-storm-1.2.1.tar.gz
- Create a soft link for subsequent version updates.
1ln -s apache-storm-1.2.1 storm
Setting Storm Environment Variables
- Open the configuration file.
1vi /etc/profile - Press i to enter the insert mode and add Storm to environment variables.
1 2
export STORM_HOME=/usr/local/storm export PATH=$STORM_HOME/bin:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the environment variables take effect.
1source /etc/profile
Modifying the Storm Configuration File
All Storm configuration files are stored in the $STORM_HOME/conf directory.
- Go to the Storm configuration directory.
1cd $STORM_HOME/conf
- Modify the storm.yaml file.
1vi storm.yaml - Press i to enter the insert mode and modify the file as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
storm.zookeeper.servers: - "agent1"# Change it to the corresponding IP address. - "agent2" - "agent3" storm.zookeeper.port: 2181 storm.local.dir: "/usr/local/storm/stormLocal"# Manually create the directory. nimbus.seeds: ["server1"]# Change it to the corresponding IP address. supervisor.slots.ports:# Set the number of slots as required. - 6700 - 6701 - 6702 - 6703 storm.health.check.dir: "healthchecks" storm.health.check.timeout.ms: 5000
- Press Esc, type :wq!, and press Enter to save the file and exit.
Synchronizing the Configuration to Other Nodes
- Copy apache-storm-1.2.1 to the /usr/local directory on agent1 to agent3.
1 2 3
scp -r /usr/local/apache-storm-1.2.1 root@agent1:/usr/local scp -r /usr/local/apache-storm-1.2.1 root@agent2:/usr/local scp -r /usr/local/apache-storm-1.2.1 root@agent3:/usr/local
- Log in to agent1 to agent3 and create soft links for apache-storm-1.2.1.
1 2
cd /usr/local ln -s apache-storm-1.2.1 storm
Parent topic: Deployment Guide (CentOS & openEuler)