-
Notifications
You must be signed in to change notification settings - Fork 16
Install Dotspotting locally for Snow Leopard
shawnbot edited this page Feb 1, 2011
·
9 revisions
This outlines my steps to getting Dotspotting up & running locally on my Macbook, OS X 10.6.6
A few gotchas I ran into:
- Enable PHP short tags
- Fix annoying mysql socket problem
- Install PHP mycrypt module
The steps:
-
If you don't have Git, install it
-
Grab a copy of dotspotting
-
Move whole thing into a web enabled folder, like
/Users/user/Sites
or/Library/WebServer/Documents
-
Install MySQL by downloading the DMG, then: /* Follow instructions from installer */ install preference panel & startup scripts (pref pane did not work for me)
/* need to add 'mysql' to path */ open bash_profile, (~/.bash_profile) add this: export PATH=/usr/local/mysql/bin:$PATH /* Start & Stop commands if pref panel doesn't work for you */ In Terminal app, type: /* Start */ sudo /usr/local/mysql/bin/mysqld_safe or sudo /Library/StartupItems/MySQLCOM/MySQLCOM start /* stop mysql */ sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop recommend creating alias, stick in bash_profile alias start_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM start" alias stop_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM stop" alias restart_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM restart"
-
Set up users & database (using Terminal app):
/* set password for root */ mysqladmin -u root password {new-password} mysqladmin -u root -p{new-password} -h localhost password {new-password} mysqladmin -u root -p reload /* create new database */ mysql -u root -p > create dotspotting; /* create new user for dotspotting, obviously change username & password */ mysql -u root -p > CREATE USER 'dotperson'@'localhost' IDENTIFIED BY 'alldots'; > CREATE USER 'dotperson'@'%' IDENTIFIED BY 'alldots'; > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON dotspotting.* TO 'dotperson'@'localhost'; > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON dotspotting.* TO 'dotperson'@'%'; > FLUSH PRIVILEGES; /* load schema's */ look at README.DATABASE.md in Dotspotting folder, but it goes something like this: mysql -u root -p dotspotting < schema/db_main.schema mysql -u root -p dotspotting < schema/db_users.schema mysql -u root -p dotspotting < schema/db_tickets.schema
-
Fix the mysql socket file:
/* needed to create a symbolic link for mysql.sock probably a better way */ sudo mkdir /var/mysql sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
-
Configure PHP:
You'll need to enable "Web Sharing", in System Preference's -> Sharing Panel /* Enable PHP */ open /etc/apache2/httpd.conf uncomment this line: LoadModule php5_module libexec/apache2/libphp5.so restart apache /* create php.ini */ cd /etc sudo cp php.ini.default php.ini sudo chmod 666 php.ini /* need to allow php short tags */ open php.ini change 'short_open_tag = Off' to 'short_open_tag = On' /* need to install mcrypt php module */ Thankfully found this: http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/ restart apache (turn 'web sharing' on & off)
-
Create virtual host & configure apache to point to the www folder
-
Copy the config file in config folder to
dotspotting.php
and update the settings. (Mainly the database stuff.) -
Enjoy!