logo
Menu
How to Install Odoo 17 on Amazon EC2

How to Install Odoo 17 on Amazon EC2

Odoo is an open-source, self-hosted ERP business suite with modules for accounting, CRM, sales, purchasing, Point of Sale, E-Commerce, project management, inventory, and more. This guide explains how to install Odoo on Ubuntu 22.04. Now How to Install Odoo 16 on Amazon EC2

Published Feb 10, 2024
1. Create a new Key Pair
  1. In this lab, you will need to create an EC2 instance using an SSH keypair. The following steps outline creating a unique SSH keypair for you to use in this lab.
  2. Sign into the AWS Management Console and open the Amazon EC2 console. In the upper-right corner of the AWS Management Console, confirm you are in the desired AWS region.
  3. Click on Key Pairs in the Network & Security section near the bottom of the leftmost menu. This will display a page to manage your SSH key pairs.
  4. Type Name Key Pair into the Key Pair Name: text box and click Create key pair button. For Windows users, please select ppk for file format.
  5. The page will download the file Name Key Pair.ppk to the local drive. Follow the browser instructions to save the file to the default download location. Remember the full path to the key pair file you just downloaded.
2. Launch a Web Server Instance
We will launch an Amazon Linux 2 instance, will display information about our instance. Before that select Region what you want.
  1. Click on EC2 Dashboard near the top of the leftmost menu. And Click on Launch instances.
  2. In Name, put the value Odoo. And check the default setting for Amazon Machine Image below.
  3. Select Application and OS Imane in Instance Type. Select Ubuntu 22.04
  4. Select t3.micro in Instance Type & Select the key pair that you created in the beginning of this lab from the drop-down.
  5. Click the Edit button in Network settings to set the space where EC2 will be located. Check default VPC and subnet. Auto-assign public IP is set to Enable. Right below it, create Security groups to act as a network firewall. Security groups will specify the protocols and addresses you want to allow in your firewall policy. For the security group you are currently creating, this is the rule that applies to the EC2 that will be created. After entering laucnh-wizard in Security group name and Description, select Add Security group rule and set HTTP to Type. Also allow TCP/80, allow TCP/443, Custom TCP/8069 for Web Service by specifying it.
  6. All other values accept the default values, expand by clicking on the Advanced Details tab at the bottom of the screen.
  7. Click the View Instances button in the lower right hand portion of the screen to view the list of EC2 instances. Once your instance has launched, you will see your Web Server as well as the Availability Zone the instance is in, and the publicly routable DNS name. Click the checkbox next to your web server to view details about this EC2 instance.
  8. Connect Instance with ec2 instance connect
  9. Update the system packages
  1. Install Git
  1. Install Pip.
  1. Install other required dependencies.
  1. Create a new odoo user.
  1. Download and add PostgreSQL Repositories.
  1. Install PostgreSQL.
  1. Start the database server.
  1. Enable the database server to start automatically on system boot.
  1. Change the default PostgreSQL password.
  1. Switch to the postgres user.
  1. Create a database user named odoo.
  1. Go to the PostgreSQL interactive shell.
  1. Give the database user odoo permission to create databases.
  1. Exit the interactive shell.
  1. Return to the non-root example_user account.
  1. Wkhtmltopdf is a group of open-source command-line tools for rendering HTML pages into PDF and other image formats. It enables Odoo to print PDF reports. Download Wkhtmltopdf from GitHub.
  1. Install Wkhtmltopdf.
  1. At the time of this writing, Odoo 17 is the latest version. Create a directory for Odoo and set the owner to the Odoo user.
  1. Switch to the odoo user account.
  1. Clone the Odoo 14 source code from GitHub to /opt/odoo/odoo directory.
  1. Create a new Python virtual environment for Odoo.
  1. Activate the virtual environment.
  1. Install all required Python modules with pip3.
  1. Deactivate the environment.
  1. Create a new directory for 3rd party add-ons.
  1. Switch back to your non-root example_user account.
  1. Create a configuration file.
  1. Add the following code to the file. Change StrongMasterPassword to a unique password.
  1. Close and save the file.
  2. Create a service unit file called odoo.service.
  1. Add the following code to the file. Close and save the file.
  1. Reload system daemon for changes to take effect.
  1. Start the Odoo service.
  1. Enable the service to start on system boot.
  1. Check the service status.
Access Web Interface. To access the Odoo web interface, navigate to your server's IP address at port 8069 in your web browser. For example, http:/DNS_Name:8069. You should see the database setup screen:
  1. Enter the admin_password value you chose in /etc/odoo.conf for the Master Password field.
  2. Enter the other information as desired for your installation.

Conclusion

You have installed Odoo. You can now access the Dashboard and configure it to begin managing your busines
 

1 Comment