将 Tomcat 7 默认端口更改为 1024 以下 (Linux)

以 Ubuntu 14.04 LTS / tomcat 7 为例。

1) 安装 authbind

apt-get install authbind

2) 使 80 / 443 端口对 authbind 可用(以 root 权限操作):

touch /etc/authbind/byport/80
touch /etc/authbind/byport/443
chmod 500 /etc/authbind/byport/80
chmod 500 /etc/authbind/byport/443
chown tomcat7 /etc/authbind/byport/80
chown tomcat7 /etc/authbind/byport/443

3) 在 Tomcat 中,置 IPv4 为默认 (authbind 当前不支持 IPv6)

要完成这个操作,须创建 TOMCAT/bin/setenv.sh 文件,并带上以下内容:

CATALINA_OPTS="-Djava.net.preferIPv4Stack=true"

如 setenv.sh 文件已存在且已定义 CATALINA_OPTS ,那可以这么做:

export CATALINA_OPTS="$CATALINA_OPTS -Djava.net.preferIPv4Stack=true"

4) 修改 /usr/share/tomcat7/bin/startup.sh

exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@"
# OLD: exec "$PRGDIR"/"$EXECUTABLE" start "$@"

5) 修改 /etc/default/tomcat7

AUTHBIND=yes
# OLD: AUTHBIND=no

6) 打开 /etc/tomcat7/server.xml

将 8080 更改为 80,8443 更改为 443。

7) 重启 tomcat 服务

service tomcat7 restart

VMware Workstation VM Background 后不能重连解决一例

VMware Workstation VM Background 后不能重连,VNC倒是一直可连接。

看VMs的日志,有如下行:
2014-06-26T18:11:39.534+08:00| vmx| W110: CnxHandleConnection: WSASocket returned error 10022.
2014-06-26T18:11:39.534+08:00| vmx| W110: VMAutomation: Cnx_CompleteAsyncOperation() failed.

搜 VMware Community,是 Socket Provider 有冲突,接下来要做的就是识别出来。
微软有个 Autoruns 工具(http://technet.microsoft.com/en-us/sysinternals/bb963902),可以定位出 Socket Provider。

下载运行之后,到 “Winsock Providers” TAB,发现有VMware、迅雷及Apple的几个Entry,将迅雷相关的行删除并重启计算机后,故障消失。

Nexenta Sample /etc/power.conf (for Home Env.)

device-dependency-property removable-media /dev/fb

autopm enable
autoS3 disable

cpupm enable poll-mode
cpu-threshold 1s

device-thresholds /pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@0,0 10m
device-thresholds /pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@1,0 10m
device-thresholds /pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@2,0 10m
device-thresholds /pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@3,0 10m
device-thresholds /pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@4,0 10m
device-thresholds /pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@5,0 10m

device-thresholds /pci@0,0/pci15ad,1976@10/sd@0,0 10m
device-thresholds /pci@0,0/pci15ad,1976@10/sd@1,0 10m

system-threshold always-on

效率

社会效率现在高了啊

在阿里云全新备案。

从购买阿里云ECS,到备案下来,以前起码得20天,这次3自然日不到就完成。神速!

Apple 开发者公司账户。

从注册全新 ID,到DUNS Number申请,到收到邮件可以付款,以前也起码得20天,这次8个自然日不到完成。神速!

不过在中国,注册个公司开业,仍然是不容易。

Version of Word does not match error when using Microsoft Word and RequisitePro

Problem(Abstract)
This technote explains how to resolve a “Version of Word (None) does not match” error. This can occur when opening Microsoft Word for use with IBM Rational RequisitePro.

Symptom
Starting Microsoft Word fails with this error:
The version of Word (None) does not match the version required by the program (Word 2000, Word 2002, Word 2003). Install the correct version of word. Microsoft Word is not installed or configured properly. Do you want to continue with Word disabled?

Cause
Microsoft Word did not create the registry key that RequisitePro requires, or you do not have sufficient read privileges for that registry key.

Resolving the problem
Verify that this registry key exists. If not, you must add it.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Word]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Word\InstallRoot]
"Path"="C:\\Program Files\\Microsoft Office\\Office10\\"

IMPORTANT: The number 10 refers to Word 2002, 11 is for Word 2003, 12 is for Word 2007 and 14 is for Word 2010.

Starting JIRA Automatically on Linux

官方指南看来已经过时,更新一下。

#!/bin/bash
# Jira startup script
#chkconfig: 2345 80 05
#description: Jira

# JIRA/Confluence Linux service controller script
APP=jira
APP_BIN=/opt/atlassian/jira/bin

start() {
        $APP_BIN/start-jira.sh
}
stop() {
        $APP_BIN/stop-jira.sh
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        service $APP stop
        sleep 8
        service $APP start
        ;;
  *)
        echo "Usage: service $APP {start|stop|restart}"
esac

exit 0

NexentaStor 4.0 – New Beta Coming in January

好消息,终于来一个比较像样的 Beta 版本了。可从 3 升级,有可更新的 apt source etc…
——————–

Dear Nexenta Community,

Happy Holidays from the Nexenta Team. As we prepare for the holidays, Nexenta is also finishing up final testing and release efforts for a newly revamped 4.0 release of NexentaStor.

NexentaStor 4.0.1 (the “.1” has been added to differentiate from earlier versions of the 4.0 beta software) will be released for beta testing the first full week of January. This will be a simultaneous beta release including:

  • Enterprise Users – Selected enterprise customers will be testing under NDA for enterprise edition.
  • Reseller Partners – All of premier and certified reseller partners will have access to enterprise edition for solutions testing.
  • Community Users – All interested community users are invited to download and test the new 4.0.1 community edition beta software.

The software images and beta release notes will be published at the start of the beta period in January. in the interim, there are a few key updates to be aware of for those who have previously tested the earlier beta releases of NexentaStor 4.0 Community Edition (any milestone version):

  1. Seamless Upgrade from 3.1.5 to 4.0.1 – We will be supporting an inline upgrade (rather than a reinstall) to 4.0.1. In order to be able to do a seamless upgrade, systems will have to be upgraded to the latest 3.1.5 release, and community users must be using a standard image without additional binaries installed on their NexentaStor system.
  2. New license keys – In order to support a seamless upgrade from 3.x to 4.0.1, a previous change to the length of the machine ID has been removed. This however, will impact current 4.0 beta users, requiring 4.0.1 to be a reinstall rather than an upgrade.
  3. Improved support for Windows clients – Support for SMB 2.1 has been added (a natural stopping point to SMB 3.0) and will be tested during beta.
  4. Up to date Illumos kernel – The most current changes have been integrated, and Nexenta has begun updating the open source repository in preparation for the full release.

Check the Forums for the most up to date information about the beta, including question to get your feedback about monitoring beta progress.

We thank you for your patience and continued support while the 4.0 release has been reworked for the upcoming release.

Nexenta Product Management

http://nexentastor.org/news/33