Fastest Way to install the latest Drupal 6 version on Mac OS X
This assumes the web sharing method is the standard OS X user web sharing service as shared from ~/Sites, the shared drupal directory will be called “drupal“. The mysql database is called drupal and the mysql user is root, the password for the database you have to add. This assumes that OS X has apache/mysql/php and phpmyadmin all ready to go.
make a sharing directory and move into it
mkdir ~/Sites/drupal ; cd ~/Sites/drupal
get the last drupal version 6,
curl -O http://ftp.drupal.org/files/projects/drupal-6.22.tar.gz
expand it
tar -xvzf drupal-6.22.tar.gz
move all files into shared directory one level up
mv drupal-6.22/* .
move hidden files one level up
mv drupal-6.22/.* .
remove compressed archive and empty directory
rm -rf drupal-*
create a settings file
cp ~/Sites/drupal/sites/default/default.settings.php ~/Sites/drupal/sites/default/settings.php
fix permissions on the default directory and settings file
chmod -R a+w ~/Sites/drupal/sites/default
or do the first lot in one hit
mkdir ~/Sites/drupal ; cd ~/Sites/drupal ; curl -O http://ftp.drupal.org/files/projects/drupal-6.22.tar.gz ;tar -xvzf drupal-6.22.tar.gz ; mv drupal-6.22/* . ; mv drupal-6.22/.* . ; rm -rf drupal-* ; cp ~/Sites/drupal/sites/default/default.settings.php ~/Sites/drupal/sites/default/settings.php ; chmod -R a+w ~/Sites/drupal/sites/default
create it a new database (no space between -p and password – as an alternative this can be done in phpmyadmin
mysql -u [username] -p[password] -e "create database [databasename];"
open it up in your default browser
open http://localhost/~username/drupal/
Or the whole 9 yards in one command line string
!! [dropcap]D[/dropcap]oing the whole nine yards – make sure you swap in your deats!
mkdir ~/Sites/drupal ; cd ~/Sites/drupal ; curl -O http://ftp.drupal.org/files/projects/drupal-6.22.tar.gz ;tar -xvzf drupal-6.22.tar.gz ; mv drupal-6.22/* . ; mv drupal-6.22/.* . ; rm -rf drupal-* ; cp ~/Sites/drupal/sites/default/default.settings.php ~/Sites/drupal/sites/default/settings.php ; chmod -R a+w ~/Sites/drupal/sites/default ; mysql -u [username] -p[password] -e "create database [databasename] ; open http://localhost/~username/drupal
Finish the install via the browser…
Thats all there is to it – to install Drupal 7 is exactly the same process and if you need to sort out clean URLs check it out here.
And also for smoother compatibilities for Drupal upgrades and module/theme add on installs change the local ownership to _www
sudo chown -R _www ~/Sites/drupal