zakhttp / mongostead7 Goto Github PK
View Code? Open in Web Editor NEWA bash script to install MongoDB on Laravel Homestead with php7
License: MIT License
A bash script to install MongoDB on Laravel Homestead with php7
License: MIT License
Hi,
thanks a lot for your script, it have successfully installed mongodb!
Now i'm trying to connect it with Robomongo.
I have made forward port on 27017 and 3000.
But, i'm not able to connect (i tried: 127.0.0.1, 192.168.10.10, localhost)... but nothing.
do you know how to solve this ?
The mongodb.ini files should be referenced/linked (ln -s) in the following locations /etc/nginx/conf.d/30-mongodb.ini, /etc/php/7.1/fpm/conf.d/30-mongodb.ini and /etc/php/7.1/cli/conf.d.30-mongodb.ini. However it just gets copied to the location where the script is initialized from. I ended up copying them manually. Also the mongodb.ini in mods-available (location linked from) is also corrupted. With the comment on the first line not showing up as a comment. As a result without these fixes the error Class 'MongoDB\Driver\Manager' was being shown. @zakhttp
I ran into several permission issues:
Line 28/29:
sudo echo "extension = mongodb.so" >> /etc/php/7.0/cli/php.ini;
sudo echo "extension = mongodb.so" >> /etc/php/7.0/fpm/php.ini;
needed to be adjusted to:
sudo sh -c "echo 'extension = mongodb.so' >> /etc/php/7.0/cli/php.ini";
sudo sh -c "echo 'extension = mongodb.so' >> /etc/php/7.0/fpm/php.ini";
I also needed to manually add the mongodb.service file.
Finally I had to install mongo manually after all of this.
sudo apt-get install -y mongodb-org
And now it is running.
Could this repo be updated to support PHP 7.2 as well?
The mongodb.ini files should be in the following locations /etc/nginx/conf.d/30-mongodb.ini, /etc/php/7.1/fpm/conf.d/30-mongodb.ini and /etc/php/7.1/cli/conf.d.30-mongodb.ini. However it just gets copied to the location where the script is initialized from. I ended up copying them manually. WIthout it he error being shown was Class 'MongoDB\Driver\Manager' not found.
Cant confirm for php 7.0 as not using it.
Something didn't go correctly when I ran the script, I had to remove the inserted code into php.ini, then added it extension=mongodb.so into the following files instead:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/mongodb.so' - /usr/lib/php/20160303/mongodb.so: undefined symbol: php_json_serializable_ce in Unknown on line 0
i believe we need to add the selected answer to the script to be used instead of the current echo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.