I. There are two ways to start Apache: 1. Visually configure system offset settings-sharing and select Internet sharing. (I did not test) 2. Enter sudoapachectlstart in the command line mode. Then, enter localhost in the browser and ItWorks will be displayed! The main directory of Apache is: LibaryWebServerDocum
I. There are two ways to start Apache: 1. Visually configure system offset settings-sharing and select Internet sharing. (I did not test) 2. Enter sudo apachectl start in the command line mode. Then, enter http: // localhost in the browser, and It Works will be displayed! The main directory of Apache is: Libary/WebServer/Docum
I. Start Apache
There are two startup methods:
1. Visual Configuration
In "system offset settings"-"share", select Internet sharing. (I did not test)
2. Command Line
Enter sudo apachectl start
Enter http: // localhost in the browser and It Works will be displayed!
The main directory of Apache is: Libary/WebServer/Documents.
II. Configure PHP1. modify the apache configuration file
Set/etc/apache2/httpd. conf
Remove # Before loadModule php5_module libexec/apache2/libphp5.so
2. Set php. ini
Copy/etc/php. ini. default to/etc/php. ini and modify the content as needed.
3. Restart apache
Run sudo apachectl restart on the command line
3. Install MySql1. download and install
: Http://dev.mysql.com/downloads/mysql/, download the latest dmg archieve version. After installation, the MySql icon is displayed in the system offset settings.
2. Set the password
cd /usr/local/mysql/binsudo ./mysqladmin -u root -password root
4. Install mcrypt1.download and decompress libmcrypt-2.5.8.tar.bz2
Region ~ /Downloadssudo tar-xvf libmcrypt-2.5.8.tar
2. Compile
cd ~/Downloads/libmcrypt-2.5.8/./configure --disable-posix-threads --enable-staticmakesudo make install
3. Download the php source code file (select a version)
View php version php-v download http://cn2.php.net/distributions/php-5.5.14.tar.gztar-xvf php-5.5.14.tarcd php-5.5.14/usr/bin/phpize./configuremakesudo make installsudo vi/etc/php. ini add content extension = mcrypt. sosudo apachectl restart
5. Install PhpMyAdmin
1. Download PhpMyAdmin
Place it in/Library/WebServer/Documents/phpMyAdmin.
2. Set
Copy config. sample. inc. php to config. inc. php and make the following changes:
Used for Cookie encryption, random long string
$cfg['blowfish_secret']='fewf323';$cfg['Servers'][$i]['host']='localhost';$cfg['Servers'][$i]['AllowNoPassword']=false;