官术网_书友最值得收藏!

Installing Odoo from source

Ready-to-install Odoo packages can be found at nightly.odoo.com, available as Windows (.exe), Debian (.deb), CentOS (.rpm), and source code tarballs (.tar.gz).

As developers, we will prefer installing directly from the GitHub repository. This will end up giving us more control over versions and updates.

To keep things tidy, let's work in an /odoo-dev directory inside your home directory. Throughout the book, we will assume this is where your Odoo server is installed.

First, make sure you are logged in as the user created above, or during the installation process, and not as root. Assuming your user is odoo, you can confirm this with the following command:

$ whoami
odoo
$ echo $HOME
/home/odoo

Now we can use this script. It shows us how to install Odoo from source in a Debian system:

$ sudo apt-get update && sudo apt-get upgrade # Install system updates
$ sudo apt-get install git # Install Git
$ mkdir ~/odoo-dev # Create a directory to work in
$ cd ~/odoo-dev # Go into our work directory
$ git clone https://github.com/odoo/odoo.git -b 8.0 # Get Odoo source code
$ ./odoo/odoo.py setup_deps # Installs Odoo system dependencies
$ ./odoo/odoo.py setup_pg # Installs PostgreSQL & db superuser for unix user

At the end, Odoo should be ready to be used. The ~ symbol is a shortcut for your home directory (for example, /home/odoo). The git -b 8.0 option asks to explicitly download the 8.0 branch of Odoo. At the time of writing this book, this is redundant, since 8.0 is the default branch, but this may change, so it will make the script time resilient.

To start an Odoo server instance, just run odoo.py:

$ ~/odoo-dev/odoo/odoo.py

By default, Odoo instances listen from port 8069, so if we point a browser to http://<server-address>:8069 we will reach that instance. When we are accessing it for the first time, it will show us an assistant to create a new database, as shown in the following screenshot:

Installing Odoo from source

But we will learn how to initialize new databases from the command line, now so press Ctrl + C to stop the server and get back to the command prompt.

主站蜘蛛池模板: 伊宁市| 贡觉县| 旌德县| 巫溪县| 花莲市| 武清区| 西充县| 呼伦贝尔市| 大关县| 大丰市| 抚州市| 姜堰市| 泰宁县| 东丰县| 兖州市| 迭部县| 亳州市| 沙坪坝区| 新野县| 资溪县| 木兰县| 孟津县| 江达县| 新晃| 班戈县| 海门市| 上虞市| 南靖县| 洪泽县| 加查县| 江都市| 福安市| 塔河县| 凯里市| 霍山县| 青冈县| 大新县| 阿瓦提县| 密山市| 进贤县| 九龙县|