Webmasters can easily install Odoo on Centos with a series of steps that also involve the install of PostgreSQL Database Server.
As a part of our Server Management Services, we help our Customers with software installations regularly.
Let us today discuss the steps to install Odoo on Centos.
How to install Odoo on Centos?
Odoo is a popular business software with a range of business applications. These applications can be managed from one web console.
Install of Odoo on Centos involves a series of steps as listed below:
- Add EPEL Repository
- Install PostgreSQL Database Server
- Install Odoo
Add EPEL Repository
The initial step in installing Odoo is to add EPEL repository. We can perform it with the steps in the write-up here.
Once this is done, put SELinux in permissive mode.
$ sudo setenforce 0
$ sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
Lets us then perform an update on the system.
$ sudo yum -y update
Install PostgreSQL Database Server
Next, let us install the PostgreSQL database server.
Add PostgreSQL Yum Repository
The PostgreSQL Yum Repository will integrate with the normal systems/ patch management, and provide automatic updates for all supported versions of PostgreSQL. We can add it with the command below:
$ sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Install PostgreSQL 12
With the YUM repository added, we can install PostgreSQL client and server packages:
$ sudo yum -y install epel-release yum-utils
$ sudo yum-config-manager --enable pgdg12
$ sudo yum install postgresql12-server postgresql12
Initialize and start database service
After installation, let us initialize the database before starting the service.
$ sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
Now, start and enable the database server service.
$ sudo systemctl enable --now postgresql-12
At this stage, we may also require to allow the PostgreSQL service on the Firewall, for the remote clients to connect to the database. The exact step for this may vary based on the firewall used.
Set PostgreSQL admin user’s password
Let us now set PostgreSQL admin user with the command below
$ sudo su - postgres
~]$ psql -c "alter user postgres with password 'StrongPassword'"
ALTER ROLE
Enable remote access
To enable remote access, we need to edit the configuration file located at /var/lib/pgsql/12/data/postgresql.conf. Set listen address to the server IP address or “*” for all interfaces.
listen_addresses = 'IP_address'
Also to set PostgreSQL to accept remote connections edit the /var/lib/pgsql/12/data/pg_hba.conf as follows
# Accept from anywhere
host all all 0.0.0.0/0 md5
# Accept from trusted subnet
host all all Subnet_address md5
Restart database service after committing the change.
$ sudo systemctl restart postgresql-12
To connect to a remote database we could use the syntax below:
$ psql -U <dbuser> -h <serverip> -p 5432 <dbname>
Install Odoo
We will now start Odoo install by adding Odoo Yum repository to our system.
$ sudo yum -y install yum-utils
$ sudo yum-config-manager --add-repo=http://nightly.odoo.com/13.0/nightly/rpm/odoo.repo
Once this is done, let us update the packages index and install Odoo.
$ sudo yum makecache fast
$ sudo yum install odoo
After the install, start the odoo systemd service created and set it to start at boot time.
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
The Odoo service should bind to TCP port 8069 once started. Thus we may require to allow this port on the firewall.
Access Odoo
At this stage your installation is over, open any browser, and type <ip_address>:8069. By default master password is ‘admin’, set database name, admin user email address, and password for the admin user.
We can use the Apps menu to install other Odoo applications.
[Need any further assistance to install Odoo on Centos? – We’re available 24*7]
Conclusion
In short, Odoo is a popular business software with a range of business applications. Today, we saw how our Support Engineers install Odooon Centos 7.
0 Comments