Configure Php+apache+phpmyadmin under Mac

Source: Internet
Author: User
Tags phpmyadmin

The most recent project is the development of the public platform, the official demo is PHP, found that most of the learning material is also PHP, then well, give up Java, to paragraph PHP bar

Let's talk about setting up a PHP environment under Mac

Database: mysql-5.6.26

OS x:10.11.1

Apache : 2.4.16

phpmyadmin:4.5.2

Editor: Sublime TEXT3

Apache:

The Mac system already comes with, open "terminal" input:

-V or  and password

You can see the version information that comes with your system:

Server version:apache/2.4.  - (Unix) Server built:     A  - *:£ º

Here are the basic commands:

// Launch Apache Service sudo apachectl Start // Restart Apache Service sudo apachectl Restart // Close Apache Service sudo apachectl stop

Configure Apache to add support for PHP

1 . Edit the http.conf configuration file with the following terminal: sudo vim/etc/apache2/http.conf2. Remove the comment from the following section: LoadModule php5_module libexec/ apache2/libphp5.so (i.e. remove the previous #)3. Restart Apache service:sudo apachectl restart

Next, open directly with the browser http://localhost the following page appears, that is, the configuration is successful

Now you can write a php file yourself, test1.php put in,/ library/webserver/documents under

Open Browser, http://localhost/test1.php

The following configuration phpMyAdmin, I do not know this thing has what eggs, accustomed to the terminal, as a Mysql-front use?

Download the latest version on http://www.phpmyadmin.net/home_page/downloads.php

To unzip the resulting folder, rename it to phpMyAdmin, and move to:

Create a new config.inc.php file under this folder

Configure Php+apache+phpmyadmin under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.