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

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.

主站蜘蛛池模板: 庆城县| 固阳县| 华容县| 兴海县| 华池县| 柏乡县| 宣武区| 云林县| 汉中市| 安岳县| 中方县| 从化市| 喜德县| 景泰县| 革吉县| 三亚市| 常宁市| 休宁县| 调兵山市| 宝山区| 察隅县| 株洲市| 襄垣县| 吴川市| 五寨县| 长治县| 深圳市| 循化| 乐亭县| 吉木乃县| 彭阳县| 婺源县| 临夏县| 康平县| 永福县| 江达县| 鄯善县| 高雄市| 宝应县| 郓城县| 桑植县|