![]() ![]() Binaries directory : /Users/Admin/pear/binĥ. Temporary directory for downloads : /tmp/pear/installĤ. Temporary directory for processing : /tmp/pear/installģ. ![]() Installation base ($prefix) : /Users/Admin/pearĢ. Type 'all' to change all of them or simply press Enter toġ. ToĬhange individual locations, type the number in front of theĭirectory. ![]() Below is a suggested file layout for your new PEAR installation. I changed this to install it in /usr/local/pear instead of under /Users/Admin. You'll be prompted with a default file layout. $ sudo php -d detect_unicode=0 go-pear.phar PEAR is the PHP Extension and Application Repository, from which we'll install the PHP5 MongoDB driver. Install and Configure the PHP5 MongoDB driver. Create a new PHP file at /Library/WebServer/Documents/phpinfo.php and put in it: īrowse to and you should see a long page showing your PHP configuration.Īpache and PHP5 are now configured. Open the Apache config file, /etc/apache2/nf, and locate the following line. In System Preferences, go to Sharing, and then check the box next to "Web Sharing".Įnable PHP5 support in Apache. The MongoDB server will be automatically launched at startup. You can stop reading now if all you need is MongoDB and don't plan to use PHP with it. Type in a Terminal window: sudo launchctl load /Library/LaunchDaemons/ Put this in a new file at /Library/LaunchDaemons/. Put this in a new file at /etc/nf: # This is an example config file for MongoDB.Ĭonfigure a launchd LaunchDaemon. ![]() But there's lots more to do to get it working.Ĭreate directories required by MongoDB. Open a Terminal, ensure you're using an account with Administrator privileges, and type: sudo port install mongodb MacPorts ensures dependencies are installed correctly, and provides an easy way to upgrade all outdated packages at once. MacPorts is a package manager for Mac OS X that makes it easy to install and configure a lot of open-source software.Īlthough MongoDB binaries are available from the MongoDB web site, I strongly recommend using the MacPorts MongoDB port. If you already have a component installed, simply skip that step. This tutorial assumes a virgin Mac OS X installation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |