Skip to content

Local Setup

Siqi Tian edited this page Feb 5, 2017 · 1 revision

First, you need to install gdrive for Google Drive connections. You can retrieve from the backup/backup_config.tgz, or download here.

Other package archives we use to keep git, Apache and MySQL up to date are git-core/ppa and ondrej/apache2. Use sudo add-apt-repository ppa:ppa_name to add to system.

Commonly used commands are provided as aliases for shortcut. They are defined in /home/ubuntu/.bash_profile.

Command Description
upd Updates apt-get and pip packages, cleans up old packages, and runs dj_man versions. Afterwards, make sure Apache is running with worker, NOT prefork!
sync Complete procedure for updating server code: pulls repository, runs util_minify.sh, util_sys_asset.sh, util_chmod.sh, and restarts Apache server.
a2rs Restarts Apache server.
a2st Full status of Apache server.
swap_on, swap_off Toggle 2 GB of memory swap. Use upon restart of the server.
dj_man Shortcut for Django management commands.
dj_cron Shortcut for crontab of www-data user.
cl_a2a, cl_a2e Show log of Apache access / error.
cl_cron Show log of crontab.
cl_dj Show log of Django.