![]() ![]() Then visit the page in your browser You can then scroll down the page and you should see a section titled ‘mongo’. Then we make folder to hold the Mongo data files with. To install the latest MongoDB version supported for on-premises use, MongoDB 6.0, see the MongoDB 6.0 installation instructions. For more information, see MongoDB Versioning. MongoDB 6.1 is not supported for use on-premises. If you create a file in your Sites directory, called test.php, and add the following to it: To install and run MongoDB on Mac OS, we install MongoDB with brew install. Install MongoDB Community Edition on macOS Important MongoDB 6.1 is a rapid release and is only supported for MongoDB Atlas. If youre on Windows, please see the video for installing the. Now startup Apache using the alias created earlier: apache-start In this lesson, well take a look at how to install the Mongo Shell on a Mac OS X system. How To Install MongoDB on Mac Operating System > sudo chown -R id -un /data/db > Enter your password > cd Downloads > mv mongodb-osx. You’ll need to add the extension to the bottom of your php.ini file: sudo mate /opt/local/etc/php5/php.ini ![]() Now we can get onto installing MongoDB (this will install the latest stable version as of time of writing - 1.2.1): sudo port install mongodbĪnd then the PHP MongoDB extension: sudo pecl install mongo My timezone is for London: date.timezone = Europe/London Now we need to setup the php.ini file: sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini We also want to enable index.php as a directory index file: ĪddType application/x-httpd-php-source. Then update the path to the updated DocumentRoot path. I’m using Textmate here ( mate), but you can use any editor you wish, like nano.Ĭhange the DocumentRoot: DocumentRoot "/Users/davidwinter/Sites" Now we can make a few changes to the Apache config so that we can use our Sites directory: sudo mate /opt/local/apache2/conf/nf I like to make some alias commands for starting, restarting and stopping Apache: mate ~/.bashrcĪlias apache-start="sudo /opt/local/apache2/bin/apachectl start"Īlias apache-restart="sudo /opt/local/apache2/bin/apachectl restart"Īlias apache-stop="sudo /opt/local/apache2/bin/apachectl stop" Sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so echo JAVAHOME /Users/griff/.jenv/versions/17 groovy -version Groovy Version: 4.0.0 JVM: 17.0.1 Vendor: Oracle Corporation OS: Mac OS X groovy -e. To enable PHP for Apache: cd /opt/local/apache2/modules Now we can move onto PHP: sudo port install php5 +apache2 +pear You must have installed the Xcode developer tools (found on the Snow Leopard install DVD) and MacPorts for this to all work.įirst, let’s install Apache: sudo port install apache2 ![]() The following is how I went about installing Apache, PHP and MongoDB on Snow Leopard. There’s a lot of buzz brewing about it, so I wanted to give it a try with PHP on my development Mac. MongoDB (from “humongous”) is a scalable, high-performance, open source, schema-free, document-oriented database. Apache, PHP and MongoDB on Mac OS X 10.6 Snow Leopard ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |