linux上でodoo構築
16224 ワード
一.Postgresqlデータベースの構成
1.Postgresqlのインストール
2 . postgresqlコピー/var/lib/postgresql/9.4/mainから/optディレクトリへの構成
postgresqlデータベースのデータを/opt/mainディレクトリに格納、/etc/postgresql/9.4/main/postgresqlを変更する.confファイル、以下のように変更します.
次のように変更します.
サービスの再起動
3 .データベースのデータストレージパスを検証postgresユーザーにログイン
データベースへのアクセス
データ格納ディレクトリの表示
二.以下のパッケージのインストール
1 . Odoo OdooはオープンソースのERPシステムであり、企業レベルの管理ソフトウェアである.
1.1最新バージョンのOdooをダウンロードする
ダウンロード先:https://www.odoo.com/zh_CN/thanks/download
1.2 Odooパッケージの依存関係の表示
1.3パッケージ依存のインストール
1.4 Odooのインストール
2 .Pysftpとpipのインストール
pip:pythonのパッケージ管理ソフトウェア
pysftp:pythonはpysftp暗号化によりftpサーバファイルをアップロード、ダウンロードし、pysftpはpythonのpip管理ソフトウェアによってインストールされます
2.1 pipのインストール
2.2 pysftpのインストール
:zap:Odooの
4 . wkhtmltopdf
wkhtmltopdfは、webkitブラウザでWebページをpdfに生成するオープンソースコンポーネントであり、HTMLドキュメントをPDFドキュメントに変換するツールであり、複数のスクリプト言語と統合してドキュメントを変換することができます.
4.1 wkhtmltopdfのダウンロード
4.2 wkhtmltopdfのインストール
5 . qrtools
qrtoolsはQRコードを生成するツールです.
5.1 qrtoolsのインストール
6 . サービスの開始
7 . OdooとPostgresqlのサービスが開始されたかどうかを確認します
Odooのポート番号8069、プログラム名python、Postgresqlのポート番号5432、プログラム名postgres、下図のように
三.Odooのデータベースの構成
データベースの作成:
サーバ上のデータベースをエクスポートするには、次の手順に従います.
サーバー上のデータベースをローカル・データベースにインポートするには、次の手順に従います.
サービスの再起動:
:zap:このときローカルのodooシステム環境はサーバ上のodooシステム環境と一致する
四.WebページにOdooのデータベースを作成するブラウザのWebアドレスバーに、127.0.0.1:8069と入力し、ページに関連する情報ページのオプションの説明を入力します. です. に記入する必要があります. をロードする必要はありません. ** .
、CreateDatabaseボタンをクリックします.
六.Odooのポート番号の変更
ポート番号は8069から80に変更する、ブラウザにポート番号を入力する必要がなく、IPアドレスを直接入力してWebページ:1にアクセスできるようにする.プロファイルを開く
2 .次のコードをファイルに書き込み、保存します.
3 .システムの再起動
七.モジュールのインストール###モジュール格納ディレクトリ へコードをダウンロードして現在のディレクトリに配置し、作成したモジュールディレクトリを現在のディレクトリにコピーすれば です.サービス再開 設置技術特性4.1 URLはhttp://erp.rd.in.linxadminユーザーにログインして、左のメニューバーのユーザーをクリックして、下図のように:4.2それからAdministratorユーザーをクリックして、ページはジャンプして、下図のように:4.3それから編集をクリックして、技術特性のオプションをチェックして、下図のように:4.4最後にクリックして保存して、それからF 5を押してページをリフレッシュして、ページはジャンプして、下図のように: ローカルモジュールを更新左側メニューの更新モジュールリストオプションをクリックし、次の図に示すように更新をクリックします: .インストールモジュール6.1左メニューのローカルモジュールをクリックし、下図のように:6.2検索欄にインストールするモジュールの名前を入力します.下図のように:6.3インストールする必要があるモジュールは全部で5つあります.下図の5つのモジュールのように、順次インストール: 最後に現れる効果
1.Postgresqlのインストール
root@runner:/home/sg-os# apt-get install postgresql
2 . postgresqlコピー/var/lib/postgresql/9.4/mainから/optディレクトリへの構成
root@runner:/home/sg-os# rsync -aHq /var/lib/postgresql/9.4/main /opt
postgresqlデータベースのデータを/opt/mainディレクトリに格納、/etc/postgresql/9.4/main/postgresqlを変更する.confファイル、以下のように変更します.
data_directory = '/var/lib/postgresql/9.4/main'
次のように変更します.
data_directory = '/opt/main'
サービスの再起動
root@runner:/home/sg-os# /etc/init.d/postgresql restart
3 .データベースのデータストレージパスを検証postgresユーザーにログイン
root@runner:/home/sg-os# su - postgres
データベースへのアクセス
postgres@runner:~$ psql
データ格納ディレクトリの表示
postgres=# show data_directory;
data_directory
\----------------
/opt/main
(1 )
二.以下のパッケージのインストール
1 . Odoo OdooはオープンソースのERPシステムであり、企業レベルの管理ソフトウェアである.
1.1最新バージョンのOdooをダウンロードする
ダウンロード先:https://www.odoo.com/zh_CN/thanks/download
1.2 Odooパッケージの依存関係の表示
root@runner:/home/sg-os# dpkg -I odoo_8.0.0~d666e50_amd64.deb
debian , 2.0。
52940614 : =415637 。
69 , 3 conffiles
1589 , 22 control
1608573 ,14320 md5sums
1173 , 42 * postinst #!/bin/sh
866 , 43 * postrm #!/bin/sh
163 , 7 * prerm #!/bin/sh
Package: odoo
Version: 8.0.0~d666e50
Architecture: amd64
Maintainer: Odoo S.A.
Installed-Size: 320654
Depends: adduser, postgresql-client, python, python-dateutil, python-decorator, python-docutils, python-feedparser, python-imaging, python-jinja2, python-ldap, python-libxslt1, python-lxml, python-mako, python-mock, python-openid, python-passlib, python-psutil, python-psycopg2, python-pybabel, python-pychart, python-pydot, python-pyparsing, python-pypdf, python-reportlab, python-requests, python-simplejson, python-tz, python-unittest2, python-vatnumber, python-vobject, python-werkzeug, python-xlwt, python-yaml
Recommends: antiword, graphviz, ghostscript, postgresql, python-gevent, poppler-utils
Conflicts: openerp, openerp-server, openerp-web, tinyerp-server
Replaces: openerp, openerp-server, openerp-web, tinyerp-server
Section: net
Priority: optional
Homepage: http://www.odoo.com/
Description: Open Source Apps To Grow Your Business
Odoo, formerly known as OpenERP, is a suite of open-source business apps
written in Python and released under the AGPL license. This suite of
applications covers all business needs, from Website/Ecommerce down to
manufacturing, inventory and accounting, all seamlessly integrated. Odoo's
technical features include a distributed server, flexible workflows, an object
database, a dynamic GUI, customizable reports, and an XML-RPC interface. Odoo
is the most installed business software in the world. It is used by 2.000.000
users worldwide ranging from very small companies (1 user) to very large ones
(300 000 users).
1.3パッケージ依存のインストール
root@runner:/home/sg-os# apt-get install `echo "adduser, postgresql-client, python, python-dateutil, python-decorator, python-docutils, python-feedparser, python-imaging, python-jinja2, python-ldap, python-libxslt1, python-lxml, python-mako, python-mock, python-openid, python-passlib, python-psutil, python-psycopg2, python-pybabel, python-pychart, python-pydot, python-pyparsing, python-pypdf, python-reportlab, python-requests, python-simplejson, python-tz, python-unittest2, python-vatnumber, python-vobject, python-werkzeug, python-xlwt, python-yaml, antiword, graphviz, ghostscript, postgresql, python-gevent, poppler-utils" | tr -d , `
1.4 Odooのインストール
root@runner:/home/sg-os# dpkg -i odoo_8.0.0~d666e50_amd64.deb
2 .Pysftpとpipのインストール
pip:pythonのパッケージ管理ソフトウェア
pysftp:pythonはpysftp暗号化によりftpサーバファイルをアップロード、ダウンロードし、pysftpはpythonのpip管理ソフトウェアによってインストールされます
2.1 pipのインストール
root@runner:/home/sg-os# apt-get install python-pip python-dev
2.2 pysftpのインストール
:zap:Odooの
Database Auto-backup
というモジュールでは、外部のSFTPサーバに接続する際にpysftpが使用されていますroot@runner:/home/sg-os# pip install pysftp
4 . wkhtmltopdf
wkhtmltopdfは、webkitブラウザでWebページをpdfに生成するオープンソースコンポーネントであり、HTMLドキュメントをPDFドキュメントに変換するツールであり、複数のスクリプト言語と統合してドキュメントを変換することができます.
4.1 wkhtmltopdfのダウンロード
root@runner:/home/sg-os# wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
4.2 wkhtmltopdfのインストール
root@runner:/home/sg-os# dpkg -i wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
5 . qrtools
qrtoolsはQRコードを生成するツールです.
5.1 qrtoolsのインストール
root@runner:/home/sg-os# apt-get install python-qrtools
6 . サービスの開始
root@runner:/home/sg-os# /etc/init.d/postgresql restart
root@runner:/home/sg-os# /etc/init.d/odoo restart
7 . OdooとPostgresqlのサービスが開始されたかどうかを確認します
Odooのポート番号8069、プログラム名python、Postgresqlのポート番号5432、プログラム名postgres、下図のように
root@ :/home/sg-os# netstat -tnpla
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8069 0.0.0.0:* LISTEN 7410/python
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2775/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 977/cupsd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 5819/postgres
tcp 0 0 127.0.0.1:44677 127.0.0.1:8069 ESTABLISHED 1126/iceweasel
tcp 1 0 172.16.0.148:8069
tcp 0 0 127.0.0.1:8069
三.Odooのデータベースの構成
root@linx:/home/sg-os# vi /etc/postgresql/9.4/main/pg_hba.conf
# USER postgres METHOD trust, peer trust, :
local all postgres trust
#
root@linx:/home/sg-os# /etc/init.d/postgresql restart
データベースの作成:
root@linx:/home/sg-os# su - postgres
postgres@linx:~$ createdb linxerp
postgres@linx:~$ psql
postgres=# alter datebase linxerp owner to odoo;
postgres=# \q
サーバ上のデータベースをエクスポートするには、次の手順に従います.
jjli@Linx:~$ ssh sg-os@erp.rd.in.linx -lroot
root@runner:/home/sg-os# pg_dump -U postgres linxerp >/home/sg-os/linxerp.bak
サーバー上のデータベースをローカル・データベースにインポートするには、次の手順に従います.
# linxerp.bak
root@linx:/home/sg-os# scp -r sg-os@erp.rd.in.linx:~linxerp.bak .
root@linx:/home/sg-os# psql -U postgres -d linxerp < linxerp.bak
サービスの再起動:
root@linx:/home/sg-os# /etc/init.d/odoo restart
:zap:このときローカルのodooシステム環境はサーバ上のodooシステム環境と一致する
四.WebページにOdooのデータベースを作成する
Master password
:デフォルトのadminアカウントのパスワードはadminで、この項目を変更する必要はありません.デフォルトではSelect a database name
:データベースの名前を入力し、Load demonstration data
:demoデータをロードするかどうか、Default language
:必要に応じて言語を選択Choose a password
:**adminアカウントの新しいパスワードConfirm password
:パスワード記入ページの内容を1回繰り返し入力、下図のように六.Odooのポート番号の変更
ポート番号は8069から80に変更する、ブラウザにポート番号を入力する必要がなく、IPアドレスを直接入力してWebページ:1にアクセスできるようにする.プロファイルを開く
root@runner:/home/sg-os# vi /etc/rc.local
2 .次のコードをファイルに書き込み、保存します.
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8069
3 .システムの再起動
root@runner:/home/sg-os# reboot
七.モジュールのインストール
root@runner:/home/sg-os# cd /usr/lib/python2.7/dist-packages/openerp/addons
root@runner:/usr/lib/python2.7/dist-packages/openerp/addons# /etc/init.d/odoo restart