大约於十月中开始,我公司的防火墙设备运作不稳定,连接外网经常断线,影响员工的上网,可是重启防火墙後便回复正常。以前每个月需要重启防火墙一至二次,现时每天也有机会需要重启,这可能是因为防火墙设备老化所至,而搜索过大部份网上论坛的评语,发现我使用的 Zyxel 防火墙设备的质素和评价差劲,一般只能正常运作三年,而我的 Zyxel 防火墙亦已使用了三年多,所以是时间更换了。
奉劝各位,不要贪平选用 Zyxel 防火墙呀!
Best practice to manage Information Technology System in Factory and Manufacturing Environment
大约於十月中开始,我公司的防火墙设备运作不稳定,连接外网经常断线,影响员工的上网,可是重启防火墙後便回复正常。以前每个月需要重启防火墙一至二次,现时每天也有机会需要重启,这可能是因为防火墙设备老化所至,而搜索过大部份网上论坛的评语,发现我使用的 Zyxel 防火墙设备的质素和评价差劲,一般只能正常运作三年,而我的 Zyxel 防火墙亦已使用了三年多,所以是时间更换了。
奉劝各位,不要贪平选用 Zyxel 防火墙呀!
What is Odoo?
Odoo – Previously known as OpenERP is a powerful, opensource product built in Python and released under the AGPL license, with hundreds of free apps to help in building and customizing our own ERP in very short span of time. It has a very simple and interactive UI that makes it popular among the users. It comes up with many useful and comprehensive apps like CRM, Accounting, E-Commerce, WMS(Warehouse Management System), KMS(Knowledge Management System), IM(Instant Messaging), Purchase, POS, Fleet Management, Payroll, HR, Business Intelligence etc.. and users can choose and install apps as per their requirements to boost their business.Even users can add/edit fields on any page simply by turning on the “Developer Mode” – which makes it easy to customize from front end.
For online demo of Odoo apps, you can sign up here and take a free tour: https://accounts.odoo.com/web/signup
Odoo v8 setup:
Odoo has released its latest stable version i.e., V8 on 18th September 2014 with some new features and bug fixes.
Odoo can be set up in Windows, Ubuntu, CentOS, but for better performance & safety it recommends Ubuntu.
Odoo uses Postgresql database server and switching the Db server involves rewriting the entire ORM – which is a very big task.
Following are the steps to install Odoo v8 on ubuntu 14.04 LTS:
Step:1
Make sure you have freshly installed Ubuntu 14.04 LTS with everything up-to-date
sudo apt-get update && upgrade -y
Step:2
Now let’s install all the necessary Python libraries.
sudo apt-get install python-dateutil python-decorator python-docutils python-feedparser \ python-gdata python-gevent 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 wkhtmltopdf
Step:3
Create the Odoo user that will run the application
sudo useradd openerp -m -s /bin/bash
Step:4
Install and configure the Postgresql DB server
sudo apt-get install postgresql sudo su - postgres createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp Enter password for new role: ******** Enter it again: ******** exit
Step:5
Install the Odoo server. (Install git in case you don’t have it)
sudo apt-get install git
Switch to Openerp user and check out Odoo source repository where you want
sudo mkdir /home/openerp
sudo chown -R openerp:openerp openerp
sudo chmod -R 750 openerp
cd /home/openerp/
sudo su - openerp -s /bin/bash
git clone -b 8.0 https://github.com/odoo/odoo.git
Step:6
The default configuration file of the server is: /home/openerp/odoo/debian/openerp-server.conf
We’ll copy this config file and put it inside /etc/
sudo cp /home/openerp/odoo/debian/openerp-server.conf /etc/ sudo chown openerp:openerp /etc/openerp-server.conf sudo chmod 640 /etc/openerp-server.conf
Now we need to edit this config file as shown below:
db_password = False
addons_path = /home/openerp/odoo/addons
logfile = /var/log/openerp-server.log
If you are developing a custom module for openerp and its source code is present in a different location, suppose I’m developing a module named import_export which is present in /var/www/projects/ then, in order to load this module along with the other addons of openerp, we have to include this in the addons list of the above config file as :
addons_path = /home/openerp/odoo/addons, /var/www/projects/
Once the config file is edited and saved, then we can execute the following commands to check the server actually runs.
sudo su openerp -s /bin/bash /home/openerp/odoo/openerp-server
If we end up with end up with a few lines eventually saying OpenERP is running and waiting for connections then we are all set. Now just hitCTRL+C stop the server and exit to leave openerp user account.
Step:7
Default ports for Odoo are:
Odoo without IM module(i.e., without psycopg2) : 8069
Odoo with IM module enabled (i.e., with psycopg2) : 8072
Postgresql DB server for Odoo : 5432
Note: IM module is Instant Messaging. To enable this module in Openerp we need to run the server using openerp-gevent which requires the python-psycopg2 library. In this case Openerp server will be run on 8072 port.
But if we don’t want this IM module, then we can run openerp-server instead of openerp-gevent and in that case Openerp server will be run on 8069 port.
We can now run Odoo server in different ways.
1. From supervisorctl:
If you don’t have supervisor process manager, you can install it by:
apt-get install supervisor
Once supervisor is all set, then we need to edit the supervisor.conf file (/etc/supervisor/supervisord.conf) to add Openerp as a program.
[program:openerp] command=python /home/openerp/odoo/openerp-gevent -c /etc/openerp-server.conf numprocs=1 directory=/home/openerp/odoo/ stdout_logfile=/var/log/openerp-server.log autostart=true autorestart=true user=openerp stopsignal=KILL
If you are developing any custom module and want to keep on updating it each time we restart the server, to reflect your changes, then you need to append -u <your module name> at the end of the command shown above i.e., suppose my module name is import_export then:
command= python /home/openerp/odoo/openerp-gevent -c /etc/openerp-server.conf -u import_export
The -c is followed by the config file of openerp and -u for updating modules.-u all stands for updating all modules
The command line options for Openerp are available here:
https://doc.odoo.com/6.0/developer/1_1_Introduction/4_command_line/
Now once the supervisorconf is set, then we have to update it first to read the changes and restart the server:
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl restart openerp
Then on the browser we have to type the following url and reload:
If we are using openerp-gevent (which is for IM module) then url will be :[hostname]:8072
For example: localhost:8072
Otherwise if we are running it with openerp-server (without IM module) then it will use port 8069:
For example: localhost:8069
2. As a service:
To run Odoo as service we have to do the following:
sudo cp /home/openerp/odoo/debian/init /etc/init.d/openerp sudo vim /etc/init.d/openerp
change DAEMON=/usr/bin/openerp-server
to DAEMON=/home/openerp/odoo/openerp-server
save the file and exit
Now put Odoo as a service:
sudo update-rc.d -f openerp start 20 2 3 4 5
And start your Odoo/Openerp service as:
sudo service openerp start
*** Enjoy Openerp V8 ***
近日的佔中進展,學聯安排上京面聖,可是,這绝對是挑釁的動作,徹回普選框架的奇蹟不會出現的,請願人士或會被禁入境、或會被監禁,而這只會激發香港佔中人士,令事件更難收科。所有讚成學生上京做烈士的人,居心叵測,絕非出於善意。希望學生不要做蠢事吧!
另外,梁特首在這件事情上,完全表演出其我臥臥底身份的超卓能力,例如:
第一,他從來沒有一個正確的決定或行為是平息佔中事件,只有激化,令香港越亂越好;
第二,搗亂香港對習近平不利,正是江派的原意,是身為江派臥底的首要工作;
第三,搗亂香港亦可討好外國勢力,也是其臥臥底的工作,應有可觀的報酬。
Recently, I searched an open source ERP software system for our factory use. Luckily, I found an OpenERP software application system (previous name as TinyERP, now name as Odoo). It is programmed by using Python, a very popular programming tools nowadays. After my preliminary test, I had very width functionality with acceptable performance and easy-to-use. It should be a good software application for SME, and I have to study it in-deep. Read More
在國內,雖然中央電視偏袒地報道佔中的不對,但是很多國內的同事會從網上留意到香港佔中事件的實際情況,很同情和尊敬佔中人士,亦很擔心六四情景重現,希望不會吧!
於2014/10/04,有消息說暴力清場很大機會發生,各介人士緊急呼籲佔中人士撒退,而有勢力人士最後良心發現,出手叫停香港政府,(可能是習總吧);香港政府終於讓步,同意對話,就是同意這樣簡單的要求,便防止了暴力場面。
現時佔中人士是一盤散沙,無權威的領導人,而學聯跟政府的劉江華開預備會議,很大機會被這老奸巨惑玩弄和拖延,很難有進展的。學聯的能力有限,事件越是拖延下去,社會及佔領地區的市民只會越來越反感,最後把佔中人士由”自由鬥士”看成”阻街爛仔”,”光榮功業”變成”下流行徑”,可惜!可惜!現時佔領的地域不是談判的籌碼,而是計時炸彈,小心!小心!
我仍然呼籲佔中人士光榮撒退!把佔領地域縮小來預備長期抗爭吧!香港人努力!
於2014/10/03,”愛港力量” 和 “黑社會” 出擊,加上疑似香港警方的暗中協助,仍未能趕走旺角的佔中人士,香港政府和中聯辦的部署又失敗了,奸計未能得逞;但是,亦代示旺角的戰線仍會繼續,希望不要發生嚴重的傷亡吧!亦盼望佔中人士懂得集中力量,退回金鐘,減少對其它地區市民做成的反感,爭取大眾支持!
我在新浪網看到一篇大陸的新聞報道 (參考連結–> http://news.sina.com.cn/c/2014-10-04/183530948728.shtml ),發現幾段敏感的文字如下: “..占中的重点诉求包括要香港特首梁振英下台,已有推翻政权意味 … 也侧面反映英美有意促使’占中’变成一场’革命’…” ,另一段是 “…让外界吃惊、让置身其中的民众苦不堪言…” ,大陸政府的歪曲報道,認真嚇人。不知實情的非香港人肯定會被誤道,其實,現時的香港仍然很安定,只是參與佔中和反對佔中人士互相爭鬥,不參加或不走到示威的區域仍然很安全。大部份香港人完全明白政治是黑暗的,做出什麼卑鄙的手段也是正常,而佔中人士只是嘗試表達和爭取民主的普選方案,絕對無意與 ‘革命’ 拉上關係,請不要相信妄加的罪名。
另外,此新聞亦報道一段「香港北角居民反對 ‘占中’ 慰問街區警署」的短片,我看後覺得可笑和可恥,香港警方已經變了質,本應政治中立的香港警方也成了政治宣傳工具,認真可憐可悲!
算吧!今後,不要對香港寄予厚望;無期望,便毋失望,可能有意外收獲呢!
祝香港好運!
參考圖片–> https://infotechmanagefactory.com/occupy-central-hong-kong%E4%BD%94%E9%A0%98%E4%B8%AD%E7%92%B0/?wppa-occur=1&wppa-cover=0&wppa-album=37
今天香港中區的空氣特別清新,我完全感受到自由的可貴,由其是看到靜坐的學生和市民,令我感到身為香港人而驕傲。學生的自律、忍耐和組織力,亦令我佩服和恩惠。現時片地開花的情況,完全是當權者(香港政府、中聯辦和警方高層)的好大喜功,以為暴力可以控制到香港人之結果,希望他們吸取教訓改過,為香港做些好事吧!
以後事件發展下去會怎樣收場呢?拖延多久?誰會先讓步?會否暴力收場?願主保佑香港!
以下連結是我今天到中區和旺角所拍的照片,完全是和平和理性的狀況,表現出爭取民主的美好景象:
OccupyCentral-2014/10
若想知道香港人為什麼佔中?由梁啟智先生解釋結你吧,請參考以下文章連結:
今天我雖然沒有參加罷工和示威,但是整天心情也很沉重,沒心情工作,亦等於罷工了。
昨天的香港學生運動,反對普選方案,發展至提前佔中,警察施放催淚彈,而梁震震政府的無能,以及大陸政府的強硬姿態,真令人失望。本以為國慶假期可以休息玩樂,但是現在我會安排去遊行了,都是梁震震和大陸政府所害。我這樣的沉默人也出來遊行的時候,真的到了危急關頭了,我記得上一次參加遊行是因為六四事件,希望今次不要引發傷亡吧!
願香港人人平安!