Skip to content

Latest commit

 

History

History
83 lines (50 loc) · 2.3 KB

install.md

File metadata and controls

83 lines (50 loc) · 2.3 KB

Installing OPUS Locally Using Ubuntu Linux

NOTE: OPUS REQUIRES PYTHON 3.6 OR HIGHER

1. Install mysql if necessary

  sudo apt-get install mysql-server
  sudo apt-get install mysql-client
  sudo apt-get install libmysqlclient-dev
  1. Ubuntu dependencies

Ubuntu also requires the following packages be installed:

    apt-get install libncurses-dev xvfb libfontconfig

and the patched version of wkhtmltopdf:

    wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
    sudo tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
    sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin/

3. Create the mysql databases

  • Run the mysql command line:

      mysql [-u <username>] -p
    
  • In the mysql command line, create the two databases and the opus user:

      # OPUS databases
      create database opus_small;
      create database dictionary;
    
      # the OPUS web user
      create user 'USERNAME'@'localhost' identified by "PASSWORD";
    
  1. Initialize the databases from dump files (ask the Ring-Moon Systems Node for these files)

     mysql opus_small [-u <username>] -p < opus_small.sql
     mysql dictionary [-u <username>] -p < dictionary.sql -p
    
  2. Clone the repo

     cd <YOUR_PROJECTS_DIRECTORY>
     git clone https://github.com/SETI/pds-opus.git
    
     However, it is a better practice to fork the repo first into your private GitHub account, and then clone from there.  
    
  3. Clone the other repos that are needed for support

     cd <YOUR_PROJECTS_DIRECTORY>
     git clone https://github.com/SETI/pds-tools.git
     git clone https://github.com/SETI/pds-webtools.git
    

7. Create a virtualenv and install the dependencies

    cd <PDS-OPUS DIRECTORY>
    virtualenv --python=<YOUR PYTHON 3.x EXECUTABLE> venv

    source venv/bin/activate
    pip install -r requirements-python3.txt

8. Edit the opus_secrets.py file

  • Copy the template:

    cd <PDS-OPUS DIRECTORY>
    cp opus_secrets_template.py opus_secrets.py
    

    Update opus_secrets.py as needed for your system.

  1. Make the logs directory

     mkdir logs
    
  2. Run migrate:

    cd /opus/application python manage.py migrate

  3. Run the webserver

    python manage.py runserver