secure a mongo instance with client access control

https://docs.mongodb.com/v2.6/tutorial/enable-authentication/ https://docs.mongodb.com/v2.6/reference/configuration-options/#security.authorization Set up the first user: exec sudo vim /etc/mongod.conf add security: authorization: enabled restart sudo service mongod restart connect from localhost, start mongo shell mongo insert superadmin use admin db.createUser( { user: “superadmin”, pwd: “123456”, roles: [ { role: “userAdminAnyDatabase”, db: “admin” } ] } ) restart sudo Read more…

install mongodb for php7

sudo apt-get install php7.0-dev ## if apt-get is unable to finde the package # sudo apt-get install ppa-purge # sudo ppa-purge ppa:ondrej/php-7.0 # sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php # sudo apt-get update # sudo apt-get install php7.0-dev pecl -v ## if you see warnings like “unable to find pdo_mysql.so” etc. reinstall Read more…