MAC Environment Setting Up (ii) PHP environment

Source: Internet
Author: User
Tags keepassx
MAC Environment Setting Up (2) PHP environment
MAC Environment Setting Up (2) PHP environment
1. Check and Install Apache2
>sudo apachectl-v
Server version:apache/2.2.22 (Unix)
Server Built:jun 20 2012 13:57:09

My Apache with version 2.2.22 is already there.
>sudo Apachectl Start
Visit the home page http://localhost. I can see the testing page.
The default Web pages would be under this directory/library/webserver/documents.

2. Check and Install PHP
in/etc/apache2/httpd.conf, uncomment this line:
LoadModule Php5_module libexec/apache2/libphp5.so

Copy and prepare the PHP configuration files.
>sudo Cp/etc/php.ini.default/etc/php.ini
We can change this configuration file as we do.

Prepare The testing page of PHP.
>sudo cp/library/webserver/documents/index.html.en/library/webserver/documents/info.php

Then we can visit the page http://localhost/info.php now.

3. KeePassX
http://www.keepassx.org/

4. Install MySQL
Download these installation files from here http://dev.mysql.com/downloads/mysql/5.1.html.
Mysql-5.1.65-osx10.6-x86_64.dmg

After install this software, I got the MySQL in this folder mysql-5.1.65-osx10.6-x86_64.

If we install mysqlstartupitem.pkg, then MySQL would start automatically when the PC start.

Mysql.prefpane is for the icon in System configuration.

>chmod 777/ETC/BASHRC
>sudo VI/ETC/BASHRC
ADD 3 lines at the bottom
#mysql
Alias mysql= '/usr/local/mysql/bin/mysql '
Alias mysqladmin= '/usr/local/mysql/bin/mysqladmin '

. /etc/bashrc
>mysqladmin-u root password ' Kaishi '
Set the root password of MySQL.

5. Install Coda
Http://soft.macx.cn/2647.htm


References
http://sillycat.iteye.com/blog/1543227
http://sillycat.iteye.com/blog/1286175
http://sillycat.iteye.com/blog/1073598
http://sillycat.iteye.com/blog/1040371

http://sillycat.iteye.com/blog/768664
http://sillycat.iteye.com/blog/769110
http://sillycat.iteye.com/blog/770369

Http://maestric.com/doc/mac/apache_php_mysql_snow_leopard
http://dancewithnet.com/2010/05/09/run-apache-php-mysql-in-mac-os-x/
  • 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.