上QQ阅读APP看书,第一时间看更新
Installing the PostgreSQL database
Odoo needs a PostgreSQL server to work with. The typical development setup is to have PostgreSQL installed in the same machine as Odoo. We still need to install the PostgreSQL database, required to run Odoo:
$ sudo apt update
$ sudo apt install postgresql # Install PostgreSQL
$ sudo su -c "createuser -s $USER" postgres # Create db superuser
The last command creates a PostgreSQL user for the current system user. We need that so that we can create and drop the databases to be used by our Odoo instances.
If you are running Ubuntu inside the WSL, note that system services are not automatically started. This means that you may need to manually start the PostgreSQL service before running any command that needs a database connection, such as createuser or starting an Odoo server. To manually start the PostgreSQL service, run the following: sudo service postgresql start.