Advertisement
E-werd

Throat Install Guide, base Ubuntu 18.04

Jul 5th, 2018
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. sudo su -
  2. apt install -y git redis-server build-essential python3 python3-pip libmagic-dev mysql-server mysql-client libmysqlclient-dev libexiv2-dev libssl1.0-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget libffi-dev libboost-python-dev arcanist curl
  3. adduser --disabled-password --gecos "" app
  4. su - app
  5. git clone https://phab.phuks.co/source/throat.git
  6. curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
  7. echo 'export PATH="/home/app/.pyenv/bin:$PATH"' >> ~/.bashrc
  8. echo 'eval "$(pyenv init -)"' >> ~/.bashrc
  9. echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
  10. script
  11. pyenv install 3.5.7
  12. pyenv virtualenv 3.5.7 app
  13. exit
  14. exit
  15. apt install -y npm
  16. su - app
  17. script
  18. cd throat
  19. npm install
  20. npm run build
  21. pyenv local app
  22. pip install --upgrade pip
  23. pip install -r requirements.txt
  24.  
  25. exit
  26. exit
  27. nano /etc/mysql/debian.cnf
  28. #user = debian-sys-maint
  29. #password =
  30. mysql -u debian-sys-maint -p
  31. CREATE DATABASE throat;
  32. exit
  33.  
  34. su - app
  35. script
  36. cd throat
  37. cp example.config.py config.py
  38. nano config.py
  39. #set DB_USER to debian-sys-maint
  40. #set DB_PASSWD to password from /etc/mysql/debian.cnf
  41. #set DB_NAME to throat (or whatever was created, default is phuks)
  42.  
  43. cd scripts
  44. ./install.py
  45. cd ..
  46. nano wsgi.py
  47. #socketio.run(app, debug=True, host='0.0.0.0')
  48.  
  49. # to run: ./wsgi.py
  50. # find IP of your machine, visit: http://<ip address>:5000
  51. # username: admin, password: adminadmin
  52.  
  53.  
  54. ### To install mobile site
  55. #as user app: "sudo su - app"
  56.  
  57. git clone https://phab.phuks.co/source/mobile.git
  58. cd mobile
  59. git submodule init
  60. git submodule update
  61. npm install
  62. npm run build
  63. pyenv local app
  64. cd libphuk
  65. pip install --upgrade pip
  66. pip install -r requirements.txt
  67. cd ..
  68. nano config.py
  69.  
  70. #Past the following
  71. ##BEGIN
  72. LEMA = "Throat: we do stuff and test"
  73. NAME = "Throat"
  74.  
  75. SECRET_KEY = 'foo'
  76. DATABASE_URL = 'mysql://root:foobar@localhost/phuks'
  77.  
  78. RECAPTCHA_PUBLIC_KEY = ""
  79. RECAPTCHA_PRIVATE_KEY = ""
  80.  
  81. THUMBNAILS = "./thumbs"
  82. THUMBNAIL_HOST = "https://t.phoxy.win/"
  83.  
  84. STORAGE = "./thumbs"
  85. STORAGE_HOST = "https://i.phoxy.win/"
  86.  
  87. TESTING = True
  88. ##END
  89. #Replace "root:foobar" in DATABASE_URL with the credentials you used for throat.
  90. #save and exit: ctrl+o, ctrl+x
  91.  
  92. nano run.py
  93. #app.run(debug=True, host='0.0.0.0')
  94.  
  95. # to run: ./run.py
  96. # find IP of your machine, visit: http://<ip address>:5000
  97. # credentials will be the same as your throat instance
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement