"iOS Dev-92" on Mac How to build Apache+php+mysql environment for iOS network testing?

Source: Internet
Author: User

(1) Open Apache (because the Mac comes with Apache, so it only needs to be turned on)

--In the terminal input, prompted to enter the password.

sudo apachectl-k start
--Verify: Enter 127.0.0.1 or localhost in the browser to display "It works! "That means success.

--Change the default address, the configuration file in the/ect/apache2/in the httpd.conf, note the above two sentences, add the following two sentences. (The address below is our own definition of the new address, the future projects are here to do)

#DocumentRoot "/library/webserver/documents" #<directory "/library/webserver/documents" >documentroot "/Users /andy/site "<directory"/users/andy/site ">
--After the change is complete, restart the Apache server sudo apachectl-k restart


(2) Installing MySQL

--Download to MySQL website, preferably download in DMG format (http://dev.mysql.com/downloads/mysql/)

--then install, three files are installed.

--Modify aliases in terminal

CD to current user directory vim. Bash_profile#mysqlalias mysql= '/usr/local/mysql/bin/mysql ' Alias mysqladmin= '/usr/local/mysql/bin/ Mysqladmin ' #lsalias ls= ' ls-g '

--Use the previous alias to set the Administrator password (only the PHP script can access the database if the password is set)

mysqladmin-u root Password "123456"

(3) can use Navicat to manage database


(4) Open PHP

--In the/ect/apache2/of the httpd.conf, the following sentence to cancel the previous # can,

LoadModule Php5_module libexec/apache2/libphp5.so

--also need to change the configuration information file to INI format in/ect/

sudo cp php.ini.default php.ini



"iOS Dev-92" on Mac How to build Apache+php+mysql environment for iOS network testing?

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.