1) create user - mongod
home directory - /home/mongod
groupadd -g 490 mongod
useradd mongod -u 496 -g mongod -c 'mongod User' -s /bin/bash -d /home/mongod
id mongod
2) Create file in /etc/init.d - /etc/init.d/mongod
chown mongod:mongod /etc/init.d/mongod
chmod 775 /etc/init.d/mongod
3) create directory in /var/run/ - /var/run/mongodb/
chown mongod:mongod /var/run/mongodb/
chmod 775 /var/run/mongodb/
4) Change ownership and permission for /data
chown -R mongod:mongod /data
chmod -R 775 /data
home directory - /home/mongod
groupadd -g 490 mongod
useradd mongod -u 496 -g mongod -c 'mongod User' -s /bin/bash -d /home/mongod
id mongod
2) Create file in /etc/init.d - /etc/init.d/mongod
chown mongod:mongod /etc/init.d/mongod
chmod 775 /etc/init.d/mongod
3) create directory in /var/run/ - /var/run/mongodb/
chown mongod:mongod /var/run/mongodb/
chmod 775 /var/run/mongodb/
4) Change ownership and permission for /data
chown -R mongod:mongod /data
chmod -R 775 /data
No comments:
Post a Comment