Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===================================================
- Installation guide for Throat on Alpine Linux v3.9
- Assume basic installation of Alpine Linux, with...
- - openssh server installed and setup
- - a non-root user created with sudo
- - edge repos enabled
- ===================================================
- 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
- apk add sudo
- sed -i 's/#h/h/g' /etc/apk/repositories
- adduser user
- # choose password, enter twice. you may see a warning if the password is bad, but it will still work.
- echo "user ALL=(ALL) ALL" >> /etc/sudoers
- apk update
- apk upgrade
- reboot
- #When it starts back up, you should be able to SSH into the machine as the new user we created.
- ===================================================
- 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
- git clone https://phab.phuks.co/source/throat.git
- cd throat
- 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
- npm install
- npm run build
- sudo mysql_install_db --user=mysql --datadir=/var/lib/mysql
- sudo rc-service mariadb start
- sudo rc-update add mariadb default
- mysqladmin -u root password "P@ssword"
- mysql -u root -p
- #enter password set above
- CREATE DATABASE throat;
- CREATE USER 'throat'@localhost IDENTIFIED BY 'P@ssword';
- GRANT ALL PRIVILEGES ON throat.* TO 'throat'@localhost;
- exit
- sudo rc-service redis start
- sudo rc-update add redis default
- cp example.config.py config.py
- sed -i -e '/DB_USER/s/root/throat/' config.py
- sed -i -e "/DB_PASSWD/s/''/'P@ssword'/" config.py
- sed -i -e '/DB_NAME/s/phuks/throat/' config.py
- cd scripts
- ./install.py
- cd ..
- sed -i -e "/socketio.run/s/e)/e, host='0.0.0.0')/" wsgi.py
- # to run: ./wsgi.py
- # find IP of your machine, visit: http://<ip address>:5000
- # username: admin, password: adminadmin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement