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