1/Ajouter l'user flectra:
sudo adduser --system --quiet --shell=/bin/bash --home=/opt/flectra --gecos 'flectra' --group flectra
2/ Creer les repertoires /etc/flectra et /var/log/flectra
sudo mkdir /etc/flectra && sudo mkdir /var/log/flectra/
3/ Installer les dependances :
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 -y
4/ Telecharger la derniere version de flectra avec git
git clone --depth=1 --branch=v1.2.0 https://gitlab.com/flectra-hq/flectra.git /opt/flectra/flectra
5/ Donner les droits a l'utilisateur flectra et installation d'autres dependances
sudo chown flectra:flectra /opt/flectra/ -R && sudo chown flectra:flectra /var/log/flectra/ -R && cd /opt/flectra/flectra && sudo pip3 install -r requirements.txt
6/ Creation de plugin
sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node
7/ Install de wkhtmltopdf
cd /tmp && wget https://downloads.wkhtmltopdf.org/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo gdebi -n wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/
8/ Installation de geolite
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && sudo gunzip GeoLiteCity.dat.gz && sudo mkdir /usr/share/GeoIP/ && sudo mv GeoLiteCity.dat /usr/share/GeoIP/
9/ Creer l'user de al base de donnee
sudo su - postgres -c "createuser -s flectra"
10/ Paramettrage des script de demarrage
sudo su - flectra -c "/opt/flectra/flectra/flectra-bin --addons-path=/opt/flectra/flectra/addons -s --stop-after-init"
sudo mv /opt/flectra/.flectrarc /etc/flectra/flectra.conf
sudo sed -i "s,^\(logfile = \).*,\1"/var/log/flectra/flectra-server.log"," /etc/flectra/flectra.conf
sudo sed -i "s,^\(logrotate = \).*,\1"True"," /etc/flectra/flectra.conf
sudo sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/flectra/flectra.conf
sudo cp /opt/flectra/flectra/debian/init /etc/init.d/flectra && sudo chmod +x /etc/init.d/flectra
sudo ln -s /opt/flectra/flectra/flectra-bin /usr/bin/flectra
sudo update-rc.d -f flectra defaults
sudo service flectra start
11/Connecter vous via
http://adresseipduserveur:7073
enjoy
source :https://gitlab.com/flectra-hq/flectra/snippets/1694168
sudo adduser --system --quiet --shell=/bin/bash --home=/opt/flectra --gecos 'flectra' --group flectra
2/ Creer les repertoires /etc/flectra et /var/log/flectra
sudo mkdir /etc/flectra && sudo mkdir /var/log/flectra/
3/ Installer les dependances :
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 -y
4/ Telecharger la derniere version de flectra avec git
git clone --depth=1 --branch=v1.2.0 https://gitlab.com/flectra-hq/flectra.git /opt/flectra/flectra
5/ Donner les droits a l'utilisateur flectra et installation d'autres dependances
sudo chown flectra:flectra /opt/flectra/ -R && sudo chown flectra:flectra /var/log/flectra/ -R && cd /opt/flectra/flectra && sudo pip3 install -r requirements.txt
6/ Creation de plugin
sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node
7/ Install de wkhtmltopdf
cd /tmp && wget https://downloads.wkhtmltopdf.org/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo gdebi -n wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/
8/ Installation de geolite
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && sudo gunzip GeoLiteCity.dat.gz && sudo mkdir /usr/share/GeoIP/ && sudo mv GeoLiteCity.dat /usr/share/GeoIP/
9/ Creer l'user de al base de donnee
sudo su - postgres -c "createuser -s flectra"
10/ Paramettrage des script de demarrage
sudo su - flectra -c "/opt/flectra/flectra/flectra-bin --addons-path=/opt/flectra/flectra/addons -s --stop-after-init"
sudo mv /opt/flectra/.flectrarc /etc/flectra/flectra.conf
sudo sed -i "s,^\(logfile = \).*,\1"/var/log/flectra/flectra-server.log"," /etc/flectra/flectra.conf
sudo sed -i "s,^\(logrotate = \).*,\1"True"," /etc/flectra/flectra.conf
sudo sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/flectra/flectra.conf
sudo cp /opt/flectra/flectra/debian/init /etc/init.d/flectra && sudo chmod +x /etc/init.d/flectra
sudo ln -s /opt/flectra/flectra/flectra-bin /usr/bin/flectra
sudo update-rc.d -f flectra defaults
sudo service flectra start
11/Connecter vous via
http://adresseipduserveur:7073
enjoy
source :https://gitlab.com/flectra-hq/flectra/snippets/1694168
Commentaires