Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Mahmoud-Alaa-Eldeen/6666f4fd7cdd8e0786ca7554c8c96d10 to your computer and use it in GitHub Desktop.
Save Mahmoud-Alaa-Eldeen/6666f4fd7cdd8e0786ca7554c8c96d10 to your computer and use it in GitHub Desktop.
#Odoo installation guide (on CentOS 7)
chungvh@resolve.com.vn
----------
##Operating system
CentOS 7 64bit (Python 2.7.5 is already existed)
##Update yum
- Update yum
yum -y update
- Add EPEL repository to the distribution’s repositories
yum -y install epel-release
##Install git
yum install git -y
##Install Postgresql 9.4
Locate and edit your distributions .repo file, located:
On Fedora: /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo, [fedora] sections
On CentOS: /etc/yum.repos.d/CentOS-Base.repo, [base] and [updates] sections
On Red Hat: /etc/yum/pluginconf.d/rhnplugin.conf [main] section
To the section(s) identified above, you need to append a line (otherwise dependencies might resolve to the postgresql supplied by the base repository):
exclude=postgresql*
Install PostgreSQL
To list available packages:
yum list postgres*
Install a basic PostgreSQL 9.4 server:
yum install postgresql94-server.x86_64
Init database
/usr/pgsql-9.4/bin/postgresql94-setup initdb
Start the PostgreSQL server and enable it to start at boot time
systemctl start postgresql
systemctl enable postgresql
Set the postgres password
su postgres
psql
ALTER USER postgres WITH PASSWORD '<newpassword>';
\q
exit
Enable remote access to PostgreSQL database server
- Edit the file
nano /var/lib/pgsql/9.4/data/pg_hba.conf
- Append the following configuration lines
host all all 0.0.0.0/0 md5
- Change method from `indent` to `md5` to have below result
host all all 127.0.0.1/32 md5
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 md5
Enable networking for PostgreSQL
- Edit the file
nano /var/lib/pgsql/9.4/data/postgresql.conf
- Find configuration line that read as follows:
listen_addresses='localhost'
- Set IP address(es) to listen on (use comma-separated list of addresses)
listen_addresses='*'
Restart the postgresql service
systemctl restart postgresql-9.4
##Install Odoo
- Create new yum repository for Odoo
nano /etc/yum.repos.d/odoo.repo
With the following content
[odoo-nightly]
name=Odoo Nightly repository
baseurl=http://nightly.odoo.com/9.0/nightly/rpm/
enabled=1
gpgcheck=1
gpgkey=https://nightly.odoo.com/odoo.key
- install Odoo 9
yum install -y odoo
- After the installation is completed, start Odoo and enable it to start at boot times
systemctl start odoo
systemctl enable odoo
- Open Odoo’s configuration file and uncomment the ‘admin_passwd’ line to set the admin master password
nano /etc/odoo/openerp-server.conf
admin_passwd = YourPassword
- Restart Odoo for the changes to take effect
systemctl restart odoo
##Finally
Now, open a web browser and access Odoo 9 at http://yourIPaddress:8069 to create a new PostgreSQL database and set password for the admin user.
**Refer to the following website for more information*
[https://www.rosehosting.com/blog/how-to-install-odoo-9-on-a-centos-7-vps/](https://www.rosehosting.com/blog/how-to-install-odoo-9-on-a-centos-7-vps/ "How to install odoo 9 on a centos 7 vps")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment