autocat3/configuring.txt

65 lines
1.7 KiB
Plaintext

sudo yum install git
#sudo yum install postgresql-server
#sudo yum install postgresql-contrib
# install py3 (might not be the bast way to do this)
#sudo yum install centos-release-scl
#sudo yum install rh-python36
#scl enable rh-python36 bash
#install pip
sudo yum groupinstall 'Development Tools'
# pip is not on secure_path
sudo /opt/rh/rh-python36/root/usr/bin/pip install --upgrade pip
sudo /opt/rh/rh-python36/root/usr/bin/pip install pipenv
# create autocat user with home directory /var/lib/autocat
sudo useradd -d /var/lib/ autocat
sudo passwd autocat
sudo su - autocat
# create ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub using app key from the gutenbergtools/autocat3 repo
# id_rsa should have permissions 400
mkdir .ssh
install -m 600 .ssh/id_rsa
touch .ssh/id_rsa.pub
#!! from local
# scp [local:]~.ssh/github [autocat@host:]~/.ssh/id_rsa
# scp [local:]~.ssh/github.pub [autocat@host:]~/.ssh/id_rsa.pub
chmod 400 .ssh/id_rsa
# create ~/.pgpass file to store password in format
# [pghost]:*:[pgdatabase]:[pguser]:[password]
chmod 400 .pgpass
#set default python - only needed if pu3 is
scl enable rh-python36 bash
echo 'source scl_source enable rh-python36' >> /var/lib/autocat/.bash_profile
git clone git@github.com:gutenbergtools/autocat3.git
cd autocat3
pipenv --three
git checkout remotes/origin/master
pipenv install
# add conf file
#!! from local
# scp [local:]~/autocat3.conf [autocat@host:]~/.autocat3
mkdir /var/lib/autocat/log/
touch /var/lib/autocat/log/error.log
touch /var/lib/autocat/log/access.log
exit
sudo mkdir /var/run/autocat
sudo touch /var/run/autocat/autocat3.pid
sudo chown autocat /var/run/autocat/autocat3.pid
sudo systemctl enable /var/lib/autocat/autocat3/autocat3.service
sudo systemctl start autocat3