Salon software without all the fluff
Todo
- Add /usr/sbin to your path:
- Create or edit a ~/.profile file:
pico ~/.profile - Add this line: export PATH='/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin'
- Save your profile file
- Reload it in all active terminals:
source ~/.profile
- Enable Apache
sudo apachectl start - Grab the mochi repo (for example: /Users/dickason/code/mochi-php)
- Edit your config file:
sudo pico /etc/apache2/httpd.conf
- set
DocumentRoottoDocumentRoot "/Users/dickason/code/mochi-php/document_root" - set
ServerNametoServerName localhost:80
- Restart apache:
sudo apachectl restart - Visit http://localhost:80 to make sure it works.
If not, use this command to debug: sudo bash -x /usr/sbin/apachectl -k restart
- Uncomment this line:
LoadModule php5_module libexec/apache2/libphp5.so - Verify that it works by creating a temporary php info file:
- Create the file from your www directory:
echo "<?php phpinfo(); ?>" > test.php - Load test.php in your browser: http://localhost/test.php
- Remove the file from your www directory:
rm -rf test.php
- Download the OSX DMG: http://dev.mysql.com/downloads/mysql/
- Create a link to the mysql executable:
sudo ln -s /usr/local/mysql/bin/mysql /usr/sbin/mysql - Verify that it works:
sudo mysql - Add the user 'mochi':
CREATE USER 'mochi'@'localhost' IDENTIFIED BY '<PASSWORD>'; - Create database 'mochi':
CREATE DATABASE mochi - Switch to database 'mochi':
use mochi - Grant the user mochi privileges:
GRANT ALL PRIVILEGES ON *.* to mochi; - Import the snapshot for testing:
source snapshot.sql
- Make the
tempdirectory writeable:chmod 777 app/temp - Access the site!: http://localhost:80/