Hi,
this is a howto of installing Flectra HQ, a crm fork of odoo.
Thanks to @fausp, who provided a lot of technical info in Flectra HQ - Open Source fork of Odoo 11
It’s an inital draft, there may be too much RPM installs or some packages available in epel that are installed from source actually so don’t mind posting corrections so I can improve the howto.
Tested on a fresh NS 7.4, just copy/paste the following into your terminal:
cd ~
adduser --system --shell=/bin/bash --home-dir=/opt/flectra --user-group flectra
yum -y groupinstall "development tools"
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install python36u python36u-pip python36u-devel wget unzip nethserver-postgresql postgresql-devel npm nodejs git libjpeg-devel libxml2-devel libxslt-devel openldap-devel cyrus-sasl-devel
pip3.6 install --upgrade pip
ln -s /usr/bin/python3.6 /usr/bin/python3
wget -nc https://gitlab.com/flectra-hq/flectra/repository/master/archive.zip
unzip -nq archive.zip
mkdir -p /opt/flectra
mkdir -p /etc/flectra
mkdir -p /var/log/flectra
mv flectra-master* flectra
mv flectra /opt/flectra/
chown flectra:flectra /opt/flectra/ -R && chown flectra:flectra /var/log/flectra/ -R
cd /opt/flectra/flectra && pip3.6 install -r requirements.txt
npm install -g less less-plugin-clean-css -y
mkdir /opt/wkhtmltox && cd /opt/wkhtmltox && wget -nc https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cd /opt/wkhtmltox/wkhtmltox
cp -R /opt/wkhtmltox/wkhtmltox/* /usr/local/
ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
ln -s /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
mkdir /opt/geolite && cd /opt/geolite && wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mkdir /usr/share/GeoIP
mv /opt/geolite/GeoLiteCity.dat /usr/share/GeoIP
postgresql-setup initdb
systemctl enable --now postgresql
su - postgres -c "createuser -s flectra"
su - postgres -c "psql -c \"alter user flectra with encrypted password 'flectra';\""
su - flectra -c "/opt/flectra/flectra/flectra-bin --addons-path=/opt/flectra/flectra/addons -s --stop-after-init"
mv /opt/flectra/.flectrarc /etc/flectra/flectra.conf
sed -i "s,^\(logfile = \).*,\1"/var/log/flectra/flectra-server.log"," /etc/flectra/flectra.conf
sed -i "s,^\(logrotate = \).*,\1"True"," /etc/flectra/flectra.conf
sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/flectra/flectra.conf
sed -i "s,^\(db_host = \).*,\1"localhost"," /etc/flectra/flectra.conf
sed -i "s,^\(db_name = \).*,\1"flectra"," /etc/flectra/flectra.conf
sed -i "s,^\(db_password = \).*,\1"flectra"," /etc/flectra/flectra.conf
sed -i "s,^\(db_template = \).*,\1"template0"," /etc/flectra/flectra.conf
sed -i "s,^\(db_user = \).*,\1"flectra"," /etc/flectra/flectra.conf
ln -s /opt/flectra/flectra/flectra-bin /usr/bin/flectra
cat << EOF > /usr/lib/systemd/system/flectra.service
[Unit]
Description=Flectra
Wants=network.target
[Service]
Type=simple
User=flectra
Group=flectra
ExecStart=/usr/bin/flectra --config /etc/flectra/flectra.conf --logfile /var/log/flectra/flectra-server.log
[Install]
WantedBy=multi-user.target
EOF
config set fw_flectra service status enabled TCPPort 7073 access green
signal-event firewall-adjust
systemctl enable --now flectra
Browse to http://YOURNETHSERVER:7073 and login with admin/admin…