Mamp Installation Configuration PHP development environment in MAC OSX environment

Source: Internet
Author: User
Tags configuration php php development environment install wordpress
This section describes how to install MAMP on your Mac. The Apache Web server, MySQL, and phpMyAdmin will be installed through an operation, and the required friends can refer to the following

A. Brief introduction:

The PHP page needs to be processed by the WEB server. Therefore, to develop in PHP, you need access to a PHP-supported WEB server and MySQL database. PhpMyAdmin is also very useful, it is MySQL graphics interface. These three components are open source software that you can use to develop, test, and deploy WEB applications. And it's all free. The Apache Web server and PHP are all preinstalled in Mac OS x. However, they are not enabled by default. Also, a preinstalled version of PHP lacks many useful features, and you need to install and configure MySQL separately. Unless you can easily use the command line in Terminal, it's much easier to install the integrated solution MAMP. This section describes how to install MAMP on your Mac. Apache Web Server, MySQL, and phpMyAdmin will be installed through an operation.

Two. Tools/Materials

(1) MAMP (Macintosh, Apache, MySQL, PHP) Download address is an application that allows you to build a server locally, MAMP file size of about 245MB, like other software to initialize MAMP, load and run MAMP, ignore MAMP Pro Edition, Continue to use the free version of Mamp.

Click Preferences, select Ports and click Set Apache & MySQL ports to & 3306 recommended ports instead of the default values.

Next click Web Server/apache, select the location that will be installed, the default location is Macintosh Hd/applications/mamp/htdocs. Similar to public_html in the Network hosting server folder (the default path can be modified by itself).

(2) Mac OS X

(3) thinkphp

Three. Steps:

1. Open "System Preferences" and select "Share"

Make sure Internet sharing is turned off.

You can continue as long as MySQL is never installed in the system.

2. Download the latest version of Mamp

3. Press continue to install after download

4. Drag the Mamp file to the applications

5. Locate Mamp in the application locate the Htdocs file and create a new file in this directory:

6. Create a MYSQ database: Create a new database with phpMyAdmin

(1) Open Mamp and click Start Servers (may need to enter the MAC username and password), using the browser to access the Http://localhost/phpmyadmin, the following interface will appear to create a new database

7. After extracting the downloaded thinkphp framework, put the thinkphp framework directly into the school folder created by the above steps and create a new index.php file

<?phpdefine ("App_debug", "ture"); require "./thinkphp/thinkphp.php"?>

Then entering Http://localhost:8888/School on the browser will display the following information:

If you can see a smiley face stating that the connection was successful, the following file is automatically generated in the school file (the file in the red box was built by me and is not automatically generated:

By the end of this, PHP can be developed.

Perhaps there will be a variety of errors in the middle: but please continue, knowledge is a little accumulation, encountered the wrong idea to solve, slowly will find a lot of progress.

MAMP: Build Apache, MySQL, PHP Environment in OSX and install and debug WordPress locally

MAMP's name comes from the Macintosh Apache MySQL PHP, which is clearly designed to build Apache, MySQL, and PHP platforms in a MAC environment.

Although the Apache 1.3.x and PHP 4.3.2 environments are already preinstalled in OSX, enabling, configuring, and installing MySQL integration is still a very complex task. MAMP is characterized by its simplicity (as seen in the following installation steps), and it does not destroy the files of the system itself, and the scope of the modified and created files is limited to the program itself.

System requirements: Mac OS X 10.4 (Tiger) and above (for 10.3 Panther users can install MAMP 1.4.1)

Installation steps:

Go to the official website to download the latest version.
Open the DMG file and drag MAMP into the Applications folder (Note: MAMP must be in the Applications folder to work properly).
Set Mamp

Open MAMP (instead of MAMP Pro), select the Preferences tab and see the Settings for the port (Ports). The default Apache port is 8888, and if not modified, it means that it needs to be accessed via http://localhost:8888/. You can also change to other (for example, change to 80, you do not have to enter: The following part), but the disadvantage is that you need to enter the password every time.
Choose PHP 5.2.4 or above in PHP tags (minimum requirements for WordPress 3.2).
In the Apache tab, select the location of the file, this can be arbitrarily modified. For example, my settings are:
Click OK to complete the setup.
Open the MAMP service and create a database

Click Start Servers, and wait a moment to find that the red light turns green, indicating that the service is open successfully.
When on, the MAMP start page should appear automatically (if not, click the Open Start Page button.
Select PhpMyAdmin in the Web page that opens, and then select the Database tab. In the new database, give your database a name (for example, I use WordPress), fill it out and then click "New".
Install WordPress

Download WordPress.
After downloading, unzip, put the WordPress folder to the previously set file storage location. According to my settings, the files are all in/users/renfei/documents/localhost/wordpress.
Visit localhost (Follow my settings, address is localhost:8888/wordpress) and start to familiarize yourself with the WordPress installation process.
The relevant content is filled in this way:

Database Name:wordpressdatabase host/server:localhostdatabase user:rootdatabase password:root

At this point, the entire installation process is complete, you can use WordPress in this machine.

Related Article

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: 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.