Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo su -
- 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
- adduser --disabled-password --gecos "" app
- su - app
- git clone https://phab.phuks.co/source/throat.git
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- echo 'export PATH="/home/app/.pyenv/bin:$PATH"' >> ~/.bashrc
- echo 'eval "$(pyenv init -)"' >> ~/.bashrc
- echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
- script
- pyenv install 3.5.7
- pyenv virtualenv 3.5.7 app
- exit
- exit
- apt install -y npm
- su - app
- script
- cd throat
- npm install
- npm run build
- pyenv local app
- pip install --upgrade pip
- pip install -r requirements.txt
- exit
- exit
- nano /etc/mysql/debian.cnf
- #user = debian-sys-maint
- #password =
- mysql -u debian-sys-maint -p
- CREATE DATABASE throat;
- exit
- su - app
- script
- cd throat
- cp example.config.py config.py
- nano config.py
- #set DB_USER to debian-sys-maint
- #set DB_PASSWD to password from /etc/mysql/debian.cnf
- #set DB_NAME to throat (or whatever was created, default is phuks)
- cd scripts
- ./install.py
- cd ..
- nano wsgi.py
- #socketio.run(app, debug=True, host='0.0.0.0')
- # to run: ./wsgi.py
- # find IP of your machine, visit: http://<ip address>:5000
- # username: admin, password: adminadmin
- ### To install mobile site
- #as user app: "sudo su - app"
- git clone https://phab.phuks.co/source/mobile.git
- cd mobile
- git submodule init
- git submodule update
- npm install
- npm run build
- pyenv local app
- cd libphuk
- pip install --upgrade pip
- pip install -r requirements.txt
- cd ..
- nano config.py
- #Past the following
- ##BEGIN
- LEMA = "Throat: we do stuff and test"
- NAME = "Throat"
- SECRET_KEY = 'foo'
- DATABASE_URL = 'mysql://root:foobar@localhost/phuks'
- RECAPTCHA_PUBLIC_KEY = ""
- RECAPTCHA_PRIVATE_KEY = ""
- THUMBNAILS = "./thumbs"
- THUMBNAIL_HOST = "https://t.phoxy.win/"
- STORAGE = "./thumbs"
- STORAGE_HOST = "https://i.phoxy.win/"
- TESTING = True
- ##END
- #Replace "root:foobar" in DATABASE_URL with the credentials you used for throat.
- #save and exit: ctrl+o, ctrl+x
- nano run.py
- #app.run(debug=True, host='0.0.0.0')
- # to run: ./run.py
- # find IP of your machine, visit: http://<ip address>:5000
- # credentials will be the same as your throat instance
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement