Advertisement
E-werd

Throat Install Guide, base Alpine Linux 3.9.2, simple

Apr 7th, 2019
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. ===================================================
  2. Installation guide for Throat on Alpine Linux v3.9
  3.  
  4. Assume basic installation of Alpine Linux, with...
  5. - openssh server installed and setup
  6. - a non-root user created with sudo
  7. - edge repos enabled
  8. ===================================================
  9. How to meet the prerequisite... starting from a fresh install of Alpine Linux 3.9.2 from alpine-virt-3.9.2-x86_64.iso
  10.  
  11. apk add sudo
  12. sed -i 's/#h/h/g' /etc/apk/repositories
  13. adduser user
  14. # choose password, enter twice. you may see a warning if the password is bad, but it will still work.
  15. echo "user ALL=(ALL) ALL" >> /etc/sudoers
  16. apk update
  17. apk upgrade
  18. reboot
  19. #When it starts back up, you should be able to SSH into the machine as the new user we created.
  20. ===================================================
  21.  
  22. sudo apk add --no-cache python3 python3-dev py3-flask py3-bcrypt py3-flask-login py3-tinycss2 py3-mysqlclient py3-redis py3-requests py3-pillow py3-pytest py3-beautifulsoup4 py3-flask-oauthlib py3-magic py3-coverage py3-pep8 py3-lxml git build-base libffi-dev exiv2-dev boost-dev npm mariadb mariadb-client mariadb-connector-c-dev redis
  23. git clone https://phab.phuks.co/source/throat.git
  24. cd throat
  25.  
  26. pip3 install --user Flask-WTF==0.13.1 misaka>=2.1.1 peewee>=3.9.2 Flask-SocketIO>=3.3.2 Flask-Webpack>=0.1.0 flask-caching sendgrid eventlet wheezy.template wheezy.html py3exiv2 pyotp flask-jwt-extended
  27.  
  28. npm install
  29. npm run build
  30.  
  31. sudo mysql_install_db --user=mysql --datadir=/var/lib/mysql
  32. sudo rc-service mariadb start
  33. sudo rc-update add mariadb default
  34. mysqladmin -u root password "P@ssword"
  35.  
  36. mysql -u root -p
  37. #enter password set above
  38.  
  39. CREATE DATABASE throat;
  40. CREATE USER 'throat'@localhost IDENTIFIED BY 'P@ssword';
  41. GRANT ALL PRIVILEGES ON throat.* TO 'throat'@localhost;
  42. exit
  43.  
  44. sudo rc-service redis start
  45. sudo rc-update add redis default
  46.  
  47. cp example.config.py config.py
  48. sed -i -e '/DB_USER/s/root/throat/' config.py
  49. sed -i -e "/DB_PASSWD/s/''/'P@ssword'/" config.py
  50. sed -i -e '/DB_NAME/s/phuks/throat/' config.py
  51.  
  52. cd scripts
  53. ./install.py
  54. cd ..
  55. sed -i -e "/socketio.run/s/e)/e, host='0.0.0.0')/" wsgi.py
  56.  
  57. # to run: ./wsgi.py
  58. # find IP of your machine, visit: http://<ip address>:5000
  59. # username: admin, password: adminadmin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement