Install PostgreSQL<\/h3>\r\n\r\n\r\n\r\nyum install postgresql-server<\/pre>\r\n\r\n\r\n\r\npostgresql-setup initdb<\/pre>\r\n\r\n\r\n\r\nOnce finished, we can start and enable PostgreSQL on boot<\/p>\r\n\r\n\r\n\r\n
systemctl enable postgresql<\/pre>\r\n\r\n\r\n\r\nsystemctl start postgresql<\/pre>\r\n\r\n\r\n\r\nWe created a system user named odoo, now we need to create a PostgreSQL with the same name.<\/p>\r\n\r\n\r\n\r\n
su - postgres -c \"createuser -s odoo\"<\/pre>\r\n\r\n\r\n\r\n<\/span>Step 5:<\/span><\/h2>\r\n\r\n\r\n\r\nInstall wkhtmltopdf<\/h3>\r\n\r\n\r\n\r\n It is a command line tool to render HTML into PDF format using the QT Webkit rendering engine. Sometimes we need to print reports in Odoo to PDF, and this tool can help us to do it.<\/p>\r\n\r\n\r\n\r\n
wget https:\/\/github.com\/wkhtmltopdf\/wkhtmltopdf\/releases\/download\/0.12.5\/wkhtmltox-0.12.5-1.centos7.x86_64.rpm<\/pre>\r\n\r\n\r\n\r\nyum localinstall wkhtmltox-0.12.5-1.centos7.x86_64.rpm<\/pre>\r\n\r\n\r\n\r\n<\/span>Step 6:<\/span><\/h2>\r\n\r\n\r\n\r\nInstall Odoo 11<\/h3>\r\n\r\n\r\n\r\n We created a system user “odoo”,\u00a0 let’s switch to this system user to install Odoo<\/p>\r\n\r\n\r\n\r\n
su - odoo<\/pre>\r\n\r\n\r\n\r\nNext, clone Odoo 11 from GitHub repository:<\/p>\r\n\r\n\r\n\r\n
git clone https:\/\/www.github.com\/odoo\/odoo --depth 1 --branch 11.0 \/opt\/odoo\/odoo11<\/pre>\r\n\r\n\r\n\r\nEnable software collections to enable us to access the Python 3.5 binaries:<\/p>\r\n\r\n\r\n\r\n
scl enable rh-python35 bash<\/pre>\r\n\r\n\r\n\r\nNow, let’s create a virtual environment<\/p>\r\n\r\n\r\n\r\n
cd \/opt\/odoo<\/pre>\r\n\r\n\r\n\r\npython3 -m venv odoo11-venv<\/pre>\r\n\r\n\r\n\r\nActivate the newly created virtual environment<\/p>\r\n\r\n\r\n\r\n
source odoo11-venv\/bin\/activate<\/pre>\r\n\r\n\r\n\r\nAnd now, let’s install all modules:<\/p>\r\n\r\n\r\n\r\n
pip3 install -r odoo11\/requirements.txt<\/pre>\r\n\r\n\r\n\r\nOnce finished, we need to deactivate the virtual environment and go out from it<\/p>\r\n\r\n\r\n\r\n
deactivate && exit<\/pre>\r\n\r\n\r\n\r\nexit<\/pre>\r\n\r\n\r\n\r\nOdoo11 has been successfully installed, it’s time to create a configuration file.<\/p>\r\n\r\n\r\n\r\n
nano \/opt\/odoo11.conf<\/pre>\r\n\r\n\r\n\r\n[options]\r\n; This is the password that allows database operations:\r\nadmin_passwd = Mod1fyth15\r\ndb_host = False\r\ndb_port = False\r\ndb_user = odoo\r\ndb_password = False\r\naddons_path = \/opt\/odoo\/odoo11\/addons<\/pre>\r\n\r\n\r\n\r\nYou can specify your master password in admin_password in \/opt\/odoo11.conf file.<\/p>\r\n\r\n\r\n\r\n
Create Odoo systemd file<\/p>\r\n\r\n\r\n\r\n
nano \/etc\/systemd\/system\/odoo11.service<\/pre>\r\n\r\n\r\n\r\n[Unit]\r\nDescription=Odoo11\r\nRequires=postgresql.service\r\nAfter=network.target postgresql.service\r\n\r\n[Service]\r\nType=simple\r\nSyslogIdentifier=odoo11\r\nPermissionsStartOnly=true\r\nUser=odoo\r\nGroup=odoo\r\nExecStart=\/usr\/bin\/scl enable rh-python35 -- \/opt\/odoo\/odoo11-venv\/bin\/python3 \/opt\/odoo\/odoo11\/odoo-bin -c \/opt\/odoo11.conf\r\nStandardOutput=journal+console\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/pre>\r\n\r\n\r\n\r\nsystemctl daemon-reload\r\nsystemctl start odoo11\r\nsystemctl enable odoo11<\/pre>\r\n\r\n\r\n\r\nWe can check the status of Odoo<\/p>\r\n\r\n\r\n\r\n
[root@rose \/]# systemctl status odoo11\r\n\u25cf odoo11.service - Odoo\r\nLoaded: loaded (\/etc\/systemd\/system\/odoo11.service; disabled; vendor preset: disabled)\r\nActive: active (running) since Fri 2018-08-10 20:10:35 CDT; 4s ago\r\nMain PID: 13085 (scl)\r\nCGroup: \/system.slice\/odoo11.service\r\n\u251c\u250013085 \/usr\/bin\/scl enable rh-python35 -- \/opt\/odoo\/odoo11-venv\/bin\/python3 \/opt\/odoo\/odoo11\/odoo-bin -c \/opt\/odoo11.conf\r\n\u251c\u250013086 \/bin\/bash \/var\/tmp\/scl2im0eB\r\n\u2514\u250013089 \/opt\/odoo\/odoo11-venv\/bin\/python3 \/opt\/odoo\/odoo11\/odoo-bin -c \/opt\/odoo11.conf<\/pre>\r\n\r\n\r\n\r\n\r\n
<\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n