In either editor, you’ll need to find the following line: #LoadModule php5_module libexec/apache2/libphp5.so If you choose the TextEdit command from above, the TextEdit program will open outside the Terminal and will load the configuration file for you to work with. If you’re not familiar with vi (pronounced “vee-eye”), it’s a powerful command-line editor common to UNIX-based systems and you can read more about using it on the University of Washington’s site at. To edit the file, you can use the command line editor vi or the Mac TextEdit program, either of which can be opened from the Terminal. First, you will need to change to the Apache directory and you should make a backup of the file. The Apache configuration file (nf) must be changed to load the necessary PHP module so that PHP pages can be served up. You can determine if Apache is running on OS X by navigating to Configuring PHP and Apache There won’t be any notification on the command line as to the change in status so you will need to verify that Apache is working by opening a web browser window and navigating to the following address: If everything is working, you should get a simple white screen with the heading “It works!” indicating that the web server is up and running. The restart command will start Apache even if it’s stopped. sudo apachectl start sudo apachectl restart You can activate Apache simply by issuing either of the the following commands in the Terminal. It’s safer to use sudo ( super user do) on the individual commands or temporarily switch users with sudo su –.įor more information on working with the root user, see. Improper use of this command can open up your system to security issues, however. In OS X, it is possible to get root access by activating the root user account with dsenableroot. Open the Terminal environment from the Utilities ( Go > Utilities from top menu and then select Terminal). You will need root access in order to install and configure the components. Unlike Windows, OS X already includes the Apache web server and PHP language pre-installed so it’s a much simpler process to ensure that everything is working together. I will be demonstrating the process using the Terminal commands. My installation environment is a hosted Mac server with 1 GB of RAM and 40 GB of disk space. Backgroundįor this demonstration, I’m going to be using Mac OS X El Capitan (v.10.11), the latest version as of this writing. As with Windows, you could just go with a ready-made development environment like MAMP but, if you’re going to be doing real database and web design work with MySQL, it’s best to know how everything works. Now I want to show you how to create an AMP web programming stack ( Apache, MySQL & PHP) on Mac OS X. Ruby: /usr/bin/ruby => /System/Library/Frameworks/amework/Versions/2.0/usr/bin/ruby HOMEBREW_VERSION: >1.0.0 (no git repository) usr/local/Cellar/mysql/5.7.15/bin/mysqld usr/local/include/node/stdint-msvc2008.h usr/local/include/node/openssl/opensslconf.h usr/local/include/node/node_object_wrap.h usr/local/include/node/libplatform/libplatform.h If you didn't put them there on purpose they could cause problems whenīuilding Homebrew formulae, and may need to be deleted. Warning: Unbrewed header files were found in /usr/local/include. Working fine: please don't worry and just ignore them. Please note that these warnings are just used to help the Homebrew maintainers
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |