User Tools

Site Tools


other:storj_centos7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

other:storj_centos7 [2020/02/10 09:39] (current)
dodger created
Line 1: Line 1:
 +====== [HOWTO] storj in centos7 ======
 +
 +Setup disk.
 +
 +
 +Patch firewalld:
 +<code bash>
 +mv /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.pyc /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.pyc.bck
 +mv /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.pyo /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.pyo.bck
 +cp /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.py /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.py.bck
 +</​code>​
 +
 +Download path:
 +<file patch ipXtables.patch>​
 +index 68f14a5203db..2b3d6e4c58be 100644
 +--- a/​src/​firewall/​core/​ipXtables.py
 ++++ b/​src/​firewall/​core/​ipXtables.py
 +@@ -541,6 +541,8 @@ class ip4tables(object):​
 +         ​self.rich_rule_priority_counts = {}
 +         rules = []
 +         for table in BUILT_IN_CHAINS.keys():​
 ++            if not self.get_available_tables(table):​
 ++                continue
 +             # Flush firewall rules: -F
 +             # Delete firewall chains: -X
 +             # Set counter to zero: -Z
 +@@ -552,6 +554,8 @@ class ip4tables(object):​
 +         rules = []
 +         ​_policy = "​DROP"​ if policy == "​PANIC"​ else policy
 +         for table in BUILT_IN_CHAINS.keys():​
 ++            if not self.get_available_tables(table):​
 ++                continue
 +             if table == "​nat":​
 +                 ​continue
 +             for chain in BUILT_IN_CHAINS[table]:​
 +@@ -598,12 +602,13 @@ class ip4tables(object):​
 +     def build_default_rules(self,​ log_denied="​off"​):​
 +         ​default_rules = {}
 + 
 +-        default_rules["​security"​] = [ ]
 +-        self.our_chains["​security"​] = set()
 +-        for chain in BUILT_IN_CHAINS["​security"​]:​
 +-            default_rules["​security"​].append("​-N %s_direct"​ % chain)
 +-            default_rules["​security"​].append("​-A %s -j %s_direct"​ % (chain, chain))
 +-            self.our_chains["​security"​].add("​%s_direct"​ % chain)
 ++        if self.get_available_tables("​security"​):​
 ++            default_rules["​security"​] = [ ]
 ++            self.our_chains["​security"​] = set()
 ++            for chain in BUILT_IN_CHAINS["​security"​]:​
 ++                default_rules["​security"​].append("​-N %s_direct"​ % chain)
 ++                default_rules["​security"​].append("​-A %s -j %s_direct"​ % (chain, chain))
 ++                self.our_chains["​security"​].add("​%s_direct"​ % chain)
 + 
 +         ​default_rules["​raw"​] = [ ]
 +         ​self.our_chains["​raw"​] = set()
 +</​file>​
 +
 +Apply patch:
 +<code bash>
 +patch /​usr/​lib/​python2.7/​site-packages/​firewall/​core/​ipXtables.py < ipXtables.path
 +</​code>​
 +
 +
 +Follow official instructions to setup docker and pull the data.
 +\\
 +The running docker line is something like this:
 +<code bash>
 +docker run -d --restart unless-stopped -p 28967:28967 \
 +    -p 127.0.0.1:​14002:​14002 \
 +    -e WALLET="​0x59A9b64xxxxx59c5"​ \
 +    -e EMAIL="​dodger@ciberterminal.net"​ \
 +    -e ADDRESS="​blabla:​28967"​ \
 +    -e BANDWIDTH="​30TB"​ \
 +    -e STORAGE="​450GB"​ \
 +    --mount type=bind,​source="/​root/​.local/​share/​storj/​identity/​storagenode/",​destination=/​app/​identity \
 +    --mount type=bind,​source="/​home/​storj",​destination=/​app/​config \
 +    --name storagenode storjlabs/​storagenode:​beta
 +</​code>​
 +
 +Note that the **destination** parameters inside ''​mount''​ modifiers are ''​static'',​ you must only modify the ''​source''​.
 +
 +
  
other/storj_centos7.txt ยท Last modified: 2020/02/10 09:39 by dodger