MacOSLion installation of Apache + MySQL + PHP

Source: Internet
Author: User
. Apache and PHP are installed by default in MacOS, and Apache is 2.2.20 in Lion. You can select the checkbox in front of "system preference settings-sharing-Web Sharing. To install MySQL, go to the official website to download the DMG package. PHP is also built in MacOS. The Lion version is 5.3.6. The specific installation method is acceptable.

. Apache and PHP are installed by default in MacOS, and Apache is 2.2.20 in Lion. You can select the checkbox in front of "system preference settings-> sharing-> Web Sharing. To install MySQL, go to the official website to download the DMG package. PHP is also built in MacOS. The Lion version is 5.3.6. The specific installation method is acceptable.

. Apache and PHP are installed by default in MacOS, and Apache is 2.2.20 in Lion. You can select the checkbox in front of "system preference settings-> sharing-> Web Sharing. To install MySQL, go to the official website to download the DMG package. PHP is also built in MacOS. The Lion version is 5.3.6. For specific installation methods, refer to the following link. This article mainly records some installation exceptions and solutions.

Install mcryt Extension

This extension is not installed in the default PHP in the system. However, if you want to use PHPMyAdmin to manage the database, you need to install it manually. Compared with Linux, it is quite troublesome to install extensions for PHP in MacOS. You must not only manually compile the libmcrypt library, but also downloadCorresponds to the current system versionPHP source code. To manually compile the code, you need to install GCC or XCODE. For more information about the compilation and installation process, see link 2.

PHPMyAdmin cannot connect to the database (error 2002)

This is because the default socket path (/tmp/MySQL. sock) of mysql on MacOS is inconsistent with the default path (/var/mysql. sock) in the php configuration file. Change mysql. default_socket in/etc/php. ini to/tmp/mysql. sock.

To Be Continued.

References

MacOS installation AMP http://dancewithnet.com/2010/05/09/run-apache-php-mysql-in-mac-os-x/
Mac PHP installation mcrypt extension http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/

Original article address: MacOS Lion installation of Apache + MySQL + PHP. Thanks for sharing with me.

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.