Xinghui Information Technology Odoo Development Tutorial 14-Source Code Installation Odoo Lecture 3

Initialize the new Odoo database

To create and initialize the Odoo database according to Odoo's data model, we should run the Odoo service with the -d parameter:

~ / odoo-dev / odoo / odoo-bin -d testdb

"Note: The modification of Odoo 9 starts from Odoo 9, and it will be automatically created if the database does not exist. However, this is not the case in Odoo 8, it needs to be manually created using the createdb command in the PostgreSQL command line."
By default, the database will be initialized when it is initialized. With demo data, this is often useful as a development database. This is equivalent to checking Load demonstration data when creating a database in the front end. If you do not need to bring demo data during initialization, add –without-demo = all to the command line.
"Tips: At the time of writing, there is a problem in Ubuntu WSL for PostgreSQL. It is not possible to create an empty database in this environment. One solution is to manually create an empty database through the createdb 12-library command. This will repeatedly prompt WARNING: could not Flush dirty data: Function not implemented. Although there is a warning message, the database is created normally. Press Ctrl + C to stop the warning, use the command line to start Odoo and initialize the database. "The current user needs to be a super user of PostgreSQL to create new The database, the relevant operations have been carried out during the installation process.
"Tips: For the development environment, it is no problem to use the database super user to run the Odoo instance. However, in the production environment, Odoo best security practices recommend that you do not use the database super user authority to run the production instance."
Odoo instance has been It's running, now we can access it in the browser through http: //: 8069. At this time, the login interface will appear. If you don't know the host name, you can use the hostname command to view or the IP address through ifconfig. The user name and password of the default administrator are both admin. After logging in, you can see the Apps menu and installable apps.
Press Ctrl + C in the command terminal to stop the Odoo service instance and return to the command line. Press the up arrow key to return to the previous command, so that you can quickly start Odoo again with the same command.

 

Guess you like

Origin www.cnblogs.com/odoo14/p/12703725.html