Setting Web-Server on MacOSX in easy way

Edit /etc/apache2/httpd.conf
– uncomment line : LoadModule php5_module libexec/apache2/libphp5.so
– change webroot directory in line : DocumentRoot “/Users/stev/Sites”
– create dir /Users/stev/Sites using your local user
– create an index page (index.html,index.php) in your new dir

sample of index.php as below,

<?php
phpinfo();
?>

Start apache : sudo apachectl start
Download mysql-server dmg installer and mount dmg file
Install pkg and prefpane
Start mysql from prefpane

Open terminal and change your MySQL root password :

$ mysql -uroot
mysql> use mysql;
mysql> update user set password=PASSWORD(“NEWPASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s