Skip to main content

Posts

Showing posts from February, 2020

Mongodb Replication startup

Start the Mogodbserver ==================== 1)  mongod --replSet rs0 --port 27017 --bind_ip localhost --dbpath /srv/mongodb/rs0-0  --oplogSize 128 & 2)  mongod --replSet rs0 --port 27018 --bind_ip localhost --dbpath /srv/mongodb/rs0-1  --oplogSize 128 & 3)  mongod --replSet rs0 --port 27019 --bind_ip localhost --dbpath /srv/mongodb/rs0-2  --oplogSize 128 & 4) mongo --port 27017 5) rs.status() 6) conf = {             _id: "rs0",             members:                       [                          {_id : 0, host : "localhost:27017"},                          {_id : 1, host : "localhost:27018"},                          {_i...

IPTABLES Rules add and delete

IPTABLES  Rules add and delete 1) Add RULE    iptables -t nat -A DOCKER -p tcp --dport 3000 -j DNAT --to-destination 172.17.0.10:3000 2) Delete RULE  iptables -t nat -v -L -n --line-numbers output: Chain DOCKER (2 references) num   pkts bytes target     prot opt in     out     source               destination        1     3712  223K RETURN     all  --  docker0 *       0.0.0.0/0            0.0.0.0/0          2        0     0 RETURN     all  --  br-8ce9d4979c48 *       0.0.0.0/0            0.0.0.0/0          3       36  2160 DNAT      ...