I followed these stepsSo I'm newbie to learning react and node and thought of building something based on MERN stack Fixing /etc/sudoers file but- I still cant see my sudoers fileinstalled mongodb using -npm install -g mongodb
then it says its installed - then to create data directory for Monogo to use I ran mkdir -p /data/db
and the response is Permission Denied
.
To solve this I am tryingtried to install MongoDB and it is installed on my machinedo - but as soon asFixing /etc/sudoers file which hasn't led me anywhere either. Anyway when I run this command mongod
to initiate the database, it shutsgives me shutting me down the server - Please help!!!message as below:
2019-03-29T13:30:02.772+1100 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] MongoDB starting : pid=2962 port=27017 dbpath=/data/db 64-bit host=Farwas-MBP
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] db version v4.0.3
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] allocator: system
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] modules: none
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] build environment:
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] distarch: x86_64
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] target_arch: x86_64
2019-03-29T13:30:02.792+1100 I CONTROL [initandlisten] options: {}
2019-03-29T13:30:02.792+1100 E STORAGE [initandlisten] Failed to set up listener: SocketException: Address already in use
2019-03-29T13:30:02.793+1100 I CONTROL [initandlisten] now exiting
2019-03-29T13:30:02.793+1100 I CONTROL [initandlisten] shutting down with code:48