标签 ‘Application’ 归档文章

Install Odoo 8 on CentOS 7

# yum install centos-release-scl
# yum install python27
# source scl_source enable python27
# pip install --upgrade pip 
(If no pip, install it by runnig: # yum install python2-pip)
# easy_install -U setuptools

  • Install Latest PostgreSQL

yum install pidentd

chkconfig –list|grep post

service rh-postgresql95-postgresql restart su – openerp

vi /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf

service rh-postgresql95-postgresql restart

service xinetd start

chkconfig xinetd on

yum install python27

 

  • Copy Odoo Packages or git clone.

vi /etc/init.d/odoo

chkconfig –add odoo

chkconfig odoo on

service odoo start

  • Install all related Modules

# #####

yum install python-werkzeug python-lxml  python-decorator python-dateutil

pip install -U pytz

ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64

pip install lxml

pip install decorator

 

pip install python-dateutil –upgrade

# yum install libpq-dev python-dev

pip install psycopg2

yum install python27-python-psycopg2

pip install pyyaml  pillow unittest2 reportlab mako

pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz

pip install psutil requests greenlet gevent

pip install https://pypi.python.org/packages/66/29/9250c6a11822f56a1c2f703e4031d173c5b3725095d3422c11cafcc5427f/psycogreen-1.0.tar.gz

pip install psycogreen

pip install psutils –upgrade

pip install python-openid

pip install pyPdf

yum install cups

yum install cups-devel

pip install pycups

pip install wrapt

pip install xlwt

pip install tinyurl

pip install flanker

pip install passlib

pip install pyldap

yum install python-ldap

yum install openldap-devel

pip install pyldap

pip install googleads

pip install retry

yum install python27-MySQL-python

pip install MySQL-python

pip install egenix-mxodbc

yum install unixODBC-devel

pip install pyodbc

(如果遇到“gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory”,需要 yum install gcc-c++)

pip install egenix-mx-base egenix-mxodbc-connect-client

echo ok|pip install egenix-pyopenssl

pip install ofxparse

yum install python-lesscpy

yum install nodejs

yum install npm

npm install less -g

npm install -g less-plugin-clean-css

# rpm -ivh /var/tmp/wkhtmltox-0.12.1_linux-centos6-amd64.rpm

# This one line command will download the binary and install to /usr/local, strip the first level wkhtmltox dirname.

# directly install to /usr/local

# cd /usr/local; wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz -O – |xzcat – |tar xvf – –strip 1

解决 Mambo 升级到 4.65 的问题以及 WordPress 不能升级的问题

Mambo 升级到  4.65 后,系统报告

Warning: Invalid argument supplied for foreach() in .../includes/cmtclasses.php on line 713
Warning: Invalid argument supplied for foreach() in ...l/includes/cmtclasses.php on line 653

Google 后发现 http://forum.mambo-foundation.org/showthread.php?t=7205 需要添加一个列到  mos_modules 表中。

mysql> alter table mos_modules  add column groups text not null;

WordPress 是不能自动升级,提示 "您没有足够的权限访问这个页面", Google 后发现 修改 wp_options 中的 一个  wp_user_roles 的 option_value: 


update wp_options set option_value='a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:64:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:24:"NextGEN Gallery overview";b:1;s:19:"NextGEN Use TinyMCE";b:1;s:21:"NextGEN Upload images";b:1;s:22:"NextGEN Manage gallery";b:1;s:19:"NextGEN Manage tags";b:1;s:29:"NextGEN Manage others gallery";b:1;s:18:"NextGEN Edit album";b:1;s:20:"NextGEN Change style";b:1;s:22:"NextGEN Change options";b:1;s:17:"manage_newsletter";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:64:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:24:"NextGEN Gallery overview";b:1;s:19:"NextGEN Use TinyMCE";b:1;s:21:"NextGEN Upload images";b:1;s:22:"NextGEN Manage gallery";b:1;s:19:"NextGEN Manage tags";b:1;s:29:"NextGEN Manage others gallery";b:1;s:18:"NextGEN Edit album";b:1;s:20:"NextGEN Change style";b:1;s:22:"NextGEN Change options";b:1;s:17:"manage_newsletter";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}' 
where option_name="wp_user_roles";


解决 Discuz! 的 .htaccess 问题

Discuz! 移植到 GoDaddy 后,发现原来的 URL 优化在新的服务器上都是 404 错误了。  Google 搜索都说 通过 添加

# Options -Multiviews 或者  # Options +FollowSymLinks 来解决的,在我的环境下,证明这些打开都没有用而是去掉第一个 domain 的信息。

RewriteEngine On
RewriteBase /
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$4&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
~
~

问题随即解决。

原来的控制文件如下:

RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2

Upgrade Gallery 1.5 to Gallery 2

添加国庆节的照片到老的 Gallery 1.5 版本上出错了,终于决定升级系统到 Gallery 2。 有现成的文档可以参考。

虽然不能说不费吹灰之力,但是相对还是比较简单的。

URL 的重写虽然遇到了一点小问题,但是最终还是成功了。

明显的 G2 要比 G1 漂亮多了。 实际上,在研究的时候也发现,G3正式版 已经于 10/5 发布了。 等 G2 稳定一段时间后,再升级到? G3 吧, 或许是明年的春节呢。

Discuz! 7.2 增加“上一主题” “下一主题”按钮

基本上转贴自:? http://bbs.7drc.com/thread-11502-1-1.html

(更多…)

复旦管院新闻聚合

自己创作的一个小程序,一直没有太多的关注,今天惊喜的发现订阅的 Google Reader 里有了来自这个聚合的新闻:

http://www.freelamp.com/html/rss/fudan.xml

有意关注复旦管院的可以订阅以上 RSS 。

安装 WordPress MU 2.8.4a

Category:Wikipedians who use WordPress
Image via Wikipedia

终于把原来的 Lyceum 升级成 WordPress MU 了,安装中费了些周折,根据这个链接的提示,MU 顺利的安家了。 Lyceum 的安全隐忧以及很多 Theme 和 Plugin 不兼容的担心也终于解除了。

Reblog this post [with Zemanta]

GNOME 比 KDE 好的十大理由

这篇文章很好的对比了 KDE 和 GNOME 。全文摘录。

(更多…)

放弃 Adobe

如果您决定要在3月10日打补丁的话,别忘了3月11日给 Adobe Reader 打 Zero Day 补丁。 这个已经发现了一个月的漏洞,Adobe 要到 3月11日才发布补丁,是不是太“及时”了。 🙂

用 Ganglia 监控数据中心的集群服务器

IBM developerWorks 这篇文章,介绍了用 Ganglia 和 Nagios 来监控数据中心服务器的办法。文章详细介绍了安装,配置的过程。

看上去似乎是不错的解决方案,然而端口的特殊性或许制约了这样的方案。

You may have firewalls blocking the ports. gmond runs on port 8649. If gmond is running on a machine you should be able to run the command telnet localhost 8649. And see a bunch of XML output scroll down your screen.

Google+