instance odoo banner

Hướng dẫn tạo nhiều instance odoo trên server debian

Instance Odoo là gì?

Instance Odoo là một service để bạn có thể chạy được odoo trên server, trên một server các bạn có thể tạo được nhiều instance. Điều đó có nghĩa là trên cùng một server, các bạn có thể chạy được cùng lúc nhiều giả lập môi trường Odoo khác nhau.

Cách cài đặt Odoo trên server debian mình đã hướng dẫn, các bạn có thể xem lại tại đây.

Hướng dẫn tạo nhiều instance Odoo trên server debian.

1. Tạo thư mục chứa file config.

sudo mkdir /etc/openerp

2. Tạo file config.

nano /etc/init.d/tên-file-config.conf

Bạn copy nội dung sau bỏ vào file config:

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = ip-server
db_port = 5432
db_user = user-db-postgresql
db_password = password-db
addons_path = thư mục chứa addon odoo
;Log settings
logfile = thư mục chứa file log
log_level = error
xmlrpc_port = port

Các bạn có thể tham khảo thêm các thuộc tính cho file config tại Odoo documentation.

3. Tạo file service.

nano /etc/init.d/tên-file-service

Bạn copy nội dung sau bỏ vào file service:

#!/bin/sh
### BEGIN INIT INFO
# Provides: openerp-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enterprise Resource Management software
# Description: Open ERP is a complete ERP and CRM software.
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=thư mục chứa addon odoo/openerp-server
NAME=tên-file-config
DESC=tên-file-config
CONFIG=/etc/openerp/tên-file-config.conf
LOGFILE=thư-mục-chứa-file-log/tên-file-config.log
USER=user-trong-server
test -x ${DAEMON} || exit 0
set -e
do_start () {
echo -n "Starting ${DESC}: "
start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid --chuid ${USER} --background --make-pidfile --exec ${DAEMON} -- --config=${CONFIG} --logfile=${LOGFILE}
echo "${NAME}."
}
do_stop () {
echo -n "Stopping ${DESC}: "
start-stop-daemon --stop --quiet --pidfile /var/run/${NAME}.pid --oknodo
echo "${NAME}."
}
case "${1}" in
start)
do_start
;;
stop)
do_stop
;;
restart|force-reload)
echo -n "Restarting ${DESC}: "
do_stop
sleep 1
do_start
;;
*)
N=/etc/init.d/${NAME}
echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

4. Phân quyền file service và file config.

sudo chown user-trong-server: /etc/openerp/tên-file-config.conf

sudo chmod 640 /etc/tên-file-config.conf

chmod 755 /etc/init.d/tên-file-service

chown root: /etc/init.d/tên-file-service

5. Bật, tắt service.

service tên-file-service start/stop/restart/status

Lưu ý:

Khi bạn gặp lỗi : [Errno 98] Address already in use.

Bạn khắc phục theo các bước sau:

Gõ các câu lệnh sau:

ps-ef | grep openerp-server

Tìm dòng có chữ: python ./openerp-server

sudo kill -9 - number-id

Kết luận:

Mình vừa giới thiệu đến các bạn cách cài đặt Odoo trên server Debian. Các bạn có thắc mắc gì có thể để lại comment chia sẽ bên dưới.
Cảm ơn các bạn theo dõi.

 

112 thoughts to “Hướng dẫn tạo nhiều instance odoo trên server debian”

  1. Hey there I am so delighted I found your blog page, I really found you by error, while I was looking on Yahoo for something else, Anyways I am here now and would just like to say cheers for a tremendous post and a all round enjoyable blog (I also love the theme/design), I don’t have time to look over it all at the minute but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the awesome work.|

  2. Hello! This is kind of off topic but I need some guidance from an established blog. Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about making my own but I’m not sure where to begin. Do you have any ideas or suggestions? Appreciate it|

  3. Yesterday, while I was at work, my cousin stole my iphone and tested to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is completely off topic but I had to share it with someone!|

  4. Someone essentially assist to make severely posts I would state. That is the first time I frequented your web page and up to now? I surprised with the analysis you made to create this particular put up amazing. Magnificent job!|

  5. I am really loving the theme/design of your site. Do you ever run into any web browser compatibility problems? A number of my blog readers have complained about my website not operating correctly in Explorer but looks great in Firefox. Do you have any ideas to help fix this issue?|

  6. Magnificent post, very informative. I wonder why the opposite experts of this sector don’t realize this. You must proceed your writing. I am sure, you’ve a great readers’ base already!|What’s Going down i am new to this, I stumbled upon this I’ve found It absolutely useful and it has helped me out loads. I am hoping to contribute & aid different users like its aided me. Good job.

  7. I’ve been exploring for a bit for any high-quality articles or blog posts in this sort of area . Exploring in Yahoo I ultimately stumbled upon this web site. Studying this information So i am happy to exhibit that I have an incredibly excellent uncanny feeling I came upon just what I needed. I such a lot indubitably will make certain to do not overlook this web site and give it a look regularly.|

  8. Good day! This is kind of off topic but I need some advice from an established blog. Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about setting up my own but I’m not sure where to start. Do you have any tips or suggestions? Thanks|

  9. Throughout this great scheme of things you’ll receive a B- with regard to hard work. Exactly where you confused us was on your particulars. You know, they say, the devil is in the details… And it couldn’t be more accurate here. Having said that, allow me inform you precisely what did work. Your text is highly convincing and that is most likely the reason why I am taking an effort to comment. I do not make it a regular habit of doing that. Secondly, even though I can see a leaps in reasoning you come up with, I am not necessarily certain of how you seem to connect the details which help to make the actual conclusion. For now I shall subscribe to your issue however hope in the future you link your dots much better.

  10. Does your site have a contact page? I’m having trouble locating it but, I’d like to shoot you an email. I’ve got some suggestions for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it improve over time.|

  11. Just wish to say your article is as astonishing. The clarity in your put up is just spectacular and i can assume you’re knowledgeable on this subject. Fine along with your permission allow me to seize your RSS feed to stay up to date with impending post. Thanks one million and please carry on the rewarding work.

  12. It’s perfect time to make a few plans for the long run and it’s time to be happy. I have learn this submit and if I could I desire to suggest you few interesting issues or advice. Maybe you can write subsequent articles regarding this article. I want to learn more things approximately it!

  13. Hello just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Ie. I’m not sure if this is a format issue or something to do with internet browser compatibility but I figured I’d post to let you know. The design and style look great though! Hope you get the issue fixed soon. Many thanks|

  14. I believe that avoiding highly processed foods may be the first step to be able to lose weight. They may taste beneficial, but refined foods contain very little nutritional value, making you consume more just to have enough electricity to get with the day. For anyone who is constantly consuming these foods, converting to whole grain products and other complex carbohydrates will help you have more strength while having less. Good blog post.

  15. I was curious if you ever thought of changing the page layout of your website? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or two pictures. Maybe you could space it out better?|

  16. I’m extremely impressed together with your writing abilities as neatly as with the layout in your blog. Is that this a paid topic or did you modify it your self? Anyway keep up the nice quality writing, it’s uncommon to see a great weblog like this one today..|

  17. This is the right web site for anybody who wishes to understand this topic. You realize so much its almost hard to argue with you (not that I actually would want to…HaHa). You certainly put a brand new spin on a topic that has been discussed for a long time. Excellent stuff, just wonderful!|

  18. Unquestionably believe that which you said. Your favorite justification appeared to be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people think about worries that they plainly don’t know about. You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people can take a signal. Will likely be back to get more. Thanks|

  19. I do love the manner in which you have framed this specific challenge and it really does offer us a lot of fodder for consideration. Nevertheless, through just what I have experienced, I just simply trust when the actual opinions pack on that men and women keep on point and in no way get started on a soap box associated with some other news of the day. Still, thank you for this excellent piece and while I do not really concur with this in totality, I value your perspective.

  20. Greetings from Idaho! I’m bored to tears at work so I decided to check out your blog on my iphone during lunch break. I love the information you present here and can’t wait to take a look when I get home. I’m shocked at how fast your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyhow, awesome site!|

  21. I loved as much as you will receive carried out right here.
    The sketch is attractive, your authored subject matter
    stylish. nonetheless, you command get got an impatience over that you
    wish be delivering the following. unwell unquestionably come further formerly
    again as exactly the same nearly very often inside case you shield this hike.

  22. This is the right web site for anybody who wishes to understand this topic. You know a whole lot its almost tough to argue with you (not that I really would want to…HaHa). You certainly put a brand new spin on a topic which has been written about for ages. Wonderful stuff, just great!

  23. Hey there I am so thrilled I found your site, I really found you by accident, while I was looking on Google for something else, Anyways I am here now and would just like to say many thanks for a fantastic post and a all round interesting blog (I also love the theme/design), I don’t have time to go through it all at the minute but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the superb work.|

  24. Have you ever thought about publishing an ebook or guest authoring on other blogs? I have a blog based upon on the same information you discuss and would love to have you share some stories/information. I know my visitors would enjoy your work. If you’re even remotely interested, feel free to send me an e mail.|

Trả lời

Thư điện tử của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

twenty − 2 =