no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | ralph [2017/06/30 20:59] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== ralph ====== | ||
| + | * [[Python]] | ||
| + | * [[Ubuntu]] | ||
| + | |||
| + | Note that installing the '' | ||
| + | |||
| + | Create a '' | ||
| + | |||
| + | < | ||
| + | useradd -m -s /bin/bash ralph | ||
| + | </ | ||
| + | |||
| + | Create a MySQL user: | ||
| + | |||
| + | < | ||
| + | CREATE DATABASE ralph; | ||
| + | GRANT ALL PRIVILEGES ON ralph.* TO ' | ||
| + | </ | ||
| + | |||
| + | Update '' | ||
| + | |||
| + | < | ||
| + | source / | ||
| + | </ | ||
| + | |||
| + | Set up migration and database: | ||
| + | |||
| + | < | ||
| + | ralph migrate | ||
| + | ralph sitetree_resync_apps | ||
| + | </ | ||
| + | |||
| + | Changes to runtime site can go in ''/ | ||
| + | |||
| + | By default, '' | ||
| + | |||
| + | runserver script: | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | export PATH="/ | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | init script: | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | export PATH="/ | ||
| + | |||
| + | case " | ||
| + | start) | ||
| + | pgrep -f "/ | ||
| + | if [ $? -eq 0 ]; then echo "ralph already running"; | ||
| + | su - ralph -c "/ | ||
| + | ;; | ||
| + | stop) | ||
| + | pkill -9 -u ralph -f "/ | ||
| + | ;; | ||
| + | restart) | ||
| + | pkill -9 -u ralph -f "/ | ||
| + | sleep 2 | ||
| + | su - ralph -c "/ | ||
| + | ;; | ||
| + | *) | ||
| + | echo " | ||
| + | ;; | ||
| + | esac | ||
| + | </ | ||
| + | |||
| + | If using Ubuntu, add it to start on boot: | ||
| + | |||
| + | < | ||
| + | update-rc.d ralph defaults | ||
| + | </ | ||