Skip to content

Instantly share code, notes, and snippets.

@suderman
Created January 29, 2015 19:56
Show Gist options
  • Save suderman/25d39e11b8342e136b3e to your computer and use it in GitHub Desktop.
Save suderman/25d39e11b8342e136b3e to your computer and use it in GitHub Desktop.
nterchange-setup
# Setting up nterchange
#
# Assumptions:
# - PHP, Apache and MySQL are installed
# - Site will live at /var/www/touchstone
# - Apache user is www-data
# - MySQL username and password are "root" and "rootpass"
#
# If anything of these are different, make adjustments to the commands below,
# and adjust conf/conf.php to match.
# 1) Copy the touchstone directory to where it will be run
sudo cp -r ~/touchstone /var/www/touchstone
# 2) Fix file permissions
sudo chown -R $USER:$USER /var/www/touchstone
sudo chown -R www-data:www-data /var/www/touchstone/var/
sudo chown -R www-data:www-data /var/www/touchstone/public_html/upload
# 3) Create database
mysql -u root --password="rootpassword" -e 'CREATE DATABASE touchstone;'
mysql -u root --password="rootpassword" touchstone < /var/www/touchstone/db/touchstone_2014-06-23.sql
# 4) Copy the virtual host to apache's config and restart apache
sudo cp /var/www/touchstone/conf/touchstone-vhost.conf /etc/apache2/sites-enabled/touchstone-vhost.conf
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment