This repository was archived by the owner on May 21, 2026. It is now read-only.
Repository navigation
Test Server Setup
Siqi Tian edited this page Jul 3, 2016
·
7 revisions
The following setup does not use Apache. Your test server will behave exactly the same as production.
- Follow
README.mdto install dependencies. - Clone the repository from https://github.com/DasLab/Server_Primerize.git.
- Run
util_prep_dir.shto create necessary folders (empty). - Copy backup files either from AWS instance or from daslab Google Drive. Then run
python manage.py restoreto unpack static files and overwrite MySQL database tables. You may need to manually create a primerize table in MySQL first if not exists. - Use
config/*.conffiles from the backup. Remember to editconfig/t47_dev.pyto set IS_DEVEL to true (turns on DEBUG mode). - Start the test server with
python manage.py runserver, and it should be listening at localhost:8000/. You may need to start MySQL service first, bymysql.server start.
To set up a new server for production, you need to complete the following steps besides the ones above. Most of the system requirements/settings are in the config/sys/ folder in the backup files, which are handled by util_sys_asset.sh.
- Store SSL Certificate on the server (currently at
/home/ubuntu/.ssl_cert/). Useaws iamto register them to AWS console. See here. - Overwrite Apache settings from backup. See /admin/ref/ for more explanations.
- Install django-filemanager.
- Put
yuicompressor.jarin the parent directory (used byutil_minify.sh). - Soft link gdrive executable system-wide, and restore its settings (
/home/ubuntu/.drive/). - (optional) bash settings and others (e.g. dircolors).
- Change IS_DEVEL to false in
config/t47_dev.py. - Run
util_minify.shandutil_chmod.shfor preparing minified files and proper permissions.
New Admin Setup
Admin Responsibility
Server Environment
Overview
Linux
Python