Rate This Document
Findability
Accuracy
Completeness
Readability

Deploying Storm

Obtaining Storm

  1. Download the Storm archive.
    1
    wget https://archive.apache.org/dist/storm/apache-storm-1.2.1/apache-storm-1.2.1.tar.gz
    
  2. 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
    
  3. Create a soft link for subsequent version updates.
    1
    ln -s apache-storm-1.2.1 storm
    

Setting Storm Environment Variables

  1. Open the configuration file.
    1
    vi /etc/profile
    
  2. 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
    
  3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the environment variables take effect.
    1
    source /etc/profile
    

Modifying the Storm Configuration File

All Storm configuration files are stored in the $STORM_HOME/conf directory.

  1. Go to the Storm configuration directory.
    1
    cd $STORM_HOME/conf
    
  2. Modify the storm.yaml file.
    1
    vi storm.yaml
    
  3. 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
    
  4. Press Esc, type :wq!, and press Enter to save the file and exit.

Synchronizing the Configuration to Other Nodes

  1. 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
    
  2. 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