Advertisement
E-werd

Throat Install Guide, base Alpine Linux 3.9.2

Mar 29th, 2019
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. ====
  2. Assume basic installation of Alpine Linux, openssh server installed and setup, a non-root user created.
  3. ====
  4.  
  5. su -
  6. apk add --no-cache git bash build-base libffi-dev openssl-dev bzip2-dev zlib-dev readline-dev sqlite-dev curl bash bash-doc bash-completion redis npm mariadb mariadb-client mariadb-connector-c-dev jpeg-dev exiv2-dev boost-dev libxml2-dev libxslt-dev freetype-dev
  7. adduser --disabled-password --gecos "" -s /bin/bash app
  8. su - app
  9.  
  10. curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
  11. echo 'export PATH="/home/app/.pyenv/bin:$PATH"' >> ~/.bashrc
  12. echo 'eval "$(pyenv init -)"' >> ~/.bashrc
  13. echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
  14. bash
  15. pyenv install 3.5.7
  16. pyenv virtualenv 3.5.7 app
  17.  
  18. git clone https://phab.phuks.co/source/throat.git
  19. cd throat
  20. npm install
  21. npm run build
  22. pyenv local app
  23. pip install --upgrade pip
  24. pip install -r requirements.txt
  25.  
  26. exit
  27. exit
  28. mysql_install_db --user=mysql --datadir=/var/lib/mysql
  29. rc-service mariadb start
  30. mysqladmin -u root password "P@ssword"
  31. rc-update add mariadb default
  32. mysql -u root -p
  33. CREATE DATABASE throat;
  34. CREATE USER 'throat'@localhost IDENTIFIED BY 'P@ssword';
  35. GRANT ALL PRIVILEGES ON throat.* TO 'throat'@localhost;
  36. exit
  37.  
  38. rc-service redis start
  39. rc-update add redis default
  40.  
  41. su - app
  42. bash
  43. cd throat
  44. cp example.config.py config.py
  45. nano config.py
  46. #set DB_USER to throat
  47. #set DB_PASSWD to P@ssword
  48. #set DB_NAME to throat (or whatever was created, default is phuks)
  49.  
  50. cd scripts
  51. ./install.py
  52. cd ..
  53. nano wsgi.py
  54. #socketio.run(app, debug=True, host='0.0.0.0')
  55.  
  56. # to run: ./wsgi.py
  57. # find IP of your machine, visit: http://<ip address>:5000
  58. # username: admin, password: adminadmin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement