Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Flectra On Ubuntu 16.04 LTS
sudo adduser --system --quiet --shell=/bin/bash --home=/home/flectra --gecos 'flectra' --group flectra
sudo passwd flectra
sudo usermod -a -G adm,sudo flectra
sudo mkdir /etc/flectra && sudo mkdir /opt/flectra && sudo mkdir /var/log/flectra/
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install postgresql postgresql-server-dev-9.5 build-essential python3-pillow python3-lxml python-ldap3 python3-dev python3-pip python3-setuptools npm nodejs git gdebi libldap2-dev libsasl2-dev libxml2-dev libxslt1-dev libjpeg-dev zlib1g-dev -y
sudo git clone --depth=1 --branch=master /opt/flectra/server
sudo chown flectra:flectra /opt/flectra/ -R && sudo chown flectra:flectra /var/log/flectra/ -R && cd /opt/flectra/server && sudo pip3 install -r requirements.txt
sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /tmp && wget && sudo gdebi -n wkhtmltox- && rm wkhtmltox-
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/
wget -N && sudo gunzip GeoLiteCity.dat.gz && sudo mkdir /usr/share/GeoIP/ && sudo mv GeoLiteCity.dat /usr/share/GeoIP/
sudo su - postgres -c "createuser -sP flectra1"
sudo su - flectra -c "/opt/flectra/server/flectra-bin --addons-path=/opt/flectra/server/addons -s --stop-after-init"
sudo mv /home/flectra/.flectrarc /etc/flectra/flectra-server.conf
sudo sed -i "s,^\(logfile = \).*,\1"/var/log/flectra/flectra-server.log"," /etc/flectra/flectra-server.conf
sudo sed -i "s,^\(logrotate = \).*,\1"True"," /etc/flectra/flectra-server.conf
sudo sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/flectra/flectra-server.conf
sudo cp /opt/flectra/server/debian/init /etc/init.d/flectra-server && sudo chmod +x /etc/init.d/flectra-server
#sudo ln -s /opt/flectra/server/flectra-bin /usr/bin/flectra
sudo update-rc.d -f flectra-server defaults
sudo service flectra-server start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment