Installing MongoDB with Homebrew

后端 未结 4 414
梦谈多话
梦谈多话 2020-12-07 11:24

I\'m relatively new to MongoDB and am trying to install MongoDB on my Mac with Homebrew, but I\'m getting the following error:

Error: No available formula wi         


        
4条回答
  •  误落风尘
    2020-12-07 12:16

    In MacOs Catalina doesn't work properly for me.

    After the installation (https://zellwk.com/blog/install-mongodb/) i had to add permission to "/tmp/mongodb-27017.sock"

    sudo chown -R `id -un` /tmp/mongodb-27017.sock
    

    and the command "mongod" seems to ignore the config file (mongod.conf) in "/usr/local/etc" so i have to always launch it with the dbpath argument

    mongod --dbpath /usr/local/var/mongodb
    

    even if the same path is specified in the config file.

    Also using "mongod" with configuration file doesn't work for me

    mongod -f /usr/local/etc/mongod.conf
    

    or

    mongod --config /usr/local/etc/mongod.conf
    

    I solved all these issues starting the mongodb via brew services. That worked well without issues and takes the parameters from the right configuration file.

    brew services run mongodb-community
    

提交回复
热议问题