Deploy mongodb fragment combined with replica set to realize distributed storage of MySQL database files (step 10)

Configure the mongos process of the SHARD2 node
[root@shard2 bin]# cat < > /usr/local/mongodb/bin/mongos.conf

bind_ip=192.168.100.103
port=27025
logpath=/usr/local/mongodb/logs/mongos.log
fork=true
maxConns=5000
configdb=configs/192.168.100.101:27017,192.168.100.101:27018,192.168.100.101:27019
END

[root @ shard2 bin] # touch…/logs/mongos.log
[root @ shard2 bin] # chmod 777…/logs/mongos.log
[root @ shard2 bin] # mongos -f/usr/local/mongodb/bin/mongos.conf

about to fork child process, waiting until server is ready for connections.
forked process: 1562
child process started successfully, parent exiting

[root@shard2 ~]# netstat -utpln |grep mongo

tcp        0      0 192.168.100.103:27019   0.0.0.0:*               LISTEN      1095/mongod         
tcp        0      0 192.168.100.103:27020   0.0.0.0:*               LISTEN      1122/mongod         
tcp        0      0 192.168.100.103:27025   0.0.0.0:*               LISTEN      12122/mongos        
tcp        0      0 192.168.100.103:27017   0.0.0.0:*               LISTEN      1041/mongod         
tcp        0      0 192.168.100.103:27018   0.0.0.0:*               LISTEN      1068/mongod 

Read More: