2.5. Mongod System Configuration File¶
The next step is to edit the mongod system configuration file on each of the data teir devices by entering the following commands:
user@host:# cd /etc/sysconfig/
user@host:# mv hawk-mongod.rpmsave hawk-mongod
user@host:# vi hawk-mongod
Remove any extra shards from the “CONFIGLIST” line, or add shards, if needed. Verify that the “CONFIGDB” is set, as shown in the following samples:
CONFIGLIST=( "/etc/mongodb.conf-config" "/etc/mongodb.conf-data01" )
ENABLE_MONGOS=1
CONFIGDB="server1:27019,server2:27019,server3:27019"
ENABLE_MONGOS_KEYFILE=1
MONGOS_KEYFILE="/etc/mongo_keyfile-agg"
MONGO_USER=root
MONGO_GROUP=root
- CONFIGLIST:¶
List of mongo services to be ran on the server.
- ENABLE_MONGOS:¶
Set to 1 if server is to be Mongo Aggregation service. Set to 0 if server is not a Mongo Aggregation service.
- CONFIGDB:¶
Enter the three config server hostnames or IP address.
- ENABLE_MONGOS_KEYFILE:¶
Set to 1 to use authentication. Set to 0 to not use authentication.
- MONGOS_KEYFILE:¶
Location to Mongos key file.
- MONGO_USER:¶
System user name to run mongo as. Default: root
- MONGO_GROUP:¶
System group name to run mongo as. Default: root
Then enter the following commands:
user@host:# killall -15 hawk-monitor-mongos
user@host:# killall -15 mongos mongod
user@host:# service hawk-mongod restart
Note
The configuration file must be configured manually on each data tier. This includes Configuration Services, Data Services, and Aggregation Services.