2017年8月14日 星期一

Oracle PatchSet

Oracle补丁集的命名规则,那就是:

p<patch number>_<release number>_<os>.zip

oracle 9208 patch:

p4547809_92080_AIX64-5L.zip
p4547809_92080_AXP.zip
p4547809_92080_HP64.zip
p4547809_92080_HPUX-IA64.zip
p4547809_92080_LINUX-S390.zip
p4547809_92080_LINUX.zip
p4547809_92080_Linux-IA64.zip
p4547809_92080_Linux-x86-64.zip
p4547809_92080_MVS.zip
p4547809_92080_SOLARIS.zip
p4547809_92080_SOLARIS64.zip
p4547809_92080_TRU64.zip
p4547809_92080_WINNT.zip
p4547809_92080_WINNT64.zip

oracle 10.2.0.4 patch:

p6810189_10204_AIX5L.zip
p6810189_10204_HPUX-IA64.zip
p6810189_10204_HPUX-64.zip
p6810189_10204_Solaris-64.zip
p6810189_10204_Linux-x86-64.zip
p6810189_10204_Linux-x86.zip
p6810189_10204_Win32.zip
p6810189_10204_MSWIN-x86-64.zip

oracle 10.2.0.3 patch:

p5337014_10203_AIX64-5L.zip
p5337014_10203_HP64.zip
p5337014_10203_IBMPower.zip
p5337014_10203_LINUX.zip
p5337014_10203_Linux-IA64.zip
p5337014_10203_Linux-x86-64.zip
p5337014_10203_MSWIN-x86-64.zip
p5337014_10203_MVS.zip
p5337014_10203_SOLARIS64.zip
p5337014_10203_WINNT.zip
p5337014_10203_WINNT64.zip






Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (32-bit)

10201_database_win32.zip
10201_client_win32.zip
10201_clusterware_win32.zip
10201_gateways_win32.zip

oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (x64)

102010_win64_x64_database.zip
102010_win64_x64_client.zip
102010_win64_x64_clusterware.zip

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Linux x86

10201_database_linux32.zip
10201_client_linux32.zip
10201_gateways_linux32.zip

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for linux x86-64

10201_database_linux_x86_64.cpio.gz
10201_client_linux_x86_64.cpio.gz
10201_clusterware_linux_x86_64.cpio.gz
10201_gateways_linux_x86_64.cpio.gz

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for AIX5L

10gr2_aix5l64_database.cpio.gz
10gr2_aix5l64_client.cpio.gz
10gr2_aix5l64_cluster.cpio.gz
10gr2_aix5l64_gateways.cpio.gz

Oracle Database 10g Release 2 (10.2.0.2) Enterprise/Standard Edition for Solaris Operating System (x86)

10202_database_solx86.zip
10202_client_solx86.zip
10202_clusterware_solx86.zip

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Solaris Operating System (x86-64)

10201_database_solx86_64.zip
10201_client_solx86_64.zip
10201_clusterware_solx86_64.zip


Oracle9i Database Release 2 Enterprise/Standard/Personal Edition for Windows NT/2000/XP

92010NT_Disk1.zip
92010NT_Disk2.zip
92010NT_Disk3.zip

Oracle9i Database Release 2 Enterprise/Standard/Personal/Client Edition for Windows XP 2003/Windows Server 2003 (64-bit)

92021Win64_Disk1.zip
92021Win64_Disk2.zip

Oracle9i Database Release 2 Enterprise/Standard Edition for Intel Linux

ship_9204_linux_disk1.cpio.gz
ship_9204_linux_disk2.cpio.gz
ship_9204_linux_disk3.cpio.gz

Oracle9i Database Release 2 (9.2.0.4) Enterprise/Standard Edition for Linux x86-64

amd64_db_9204_Disk1.cpio.gz
amd64_db_9204_Disk2.cpio.gz
amd64_db_9204_Disk3.cpio.gz

Oracle9i Database Release 2 Enterprise/Standard Edition for AIX - Based 4.3.3 Systems (64-bit)

server_9201_AIX64_Disk1.cpio.gz
server_9201_AIX64_Disk2.cpio.gz
server_9201_AIX64_Disk3.cpio.gz
server_9201_AIX64_Disk4.cpio.gz

Oracle9i Database Release 2 Enterprise/Standard Edition for AIX- Based 5L Systems

A99331-01.zip
A99331-02.zip
A99331-03.zip
A99331-04.zip

Oracle9i Database Release 2 Enterprise/Standard Edition for Sun SPARC Solaris (32-bit)

92010Sol_Disk1.cpio.gz
92010Sol_Disk2.cpio.gz
92010Sol_Disk3.cpio.gz

Oracle9i Database Release 2 Enterprise/Standard Edition for Sun SPARC Solaris (64-bit)

solaris64_9.2.0.1.0.Disk1.cpio.gz
solaris64_9.2.0.1.0.Disk2.cpio.gz
solaris64_9.2.0.1.0.Disk3.cpio.gz


史上最全Oracle PSU,SPU(CPU),Bundle Patches 和 Patchsets 补丁号码快速参考
本文来自:itpux技术网
                                                Patchsets               
l12.1.0.2 (12.1.0.2.0                 PATCH SET FOR ORACLE DATABASE SERVER)
17694377
11.2.0.4 (11.2.0.4.0                 PATCH SET FOR ORACLE DATABASE SERVER)
13390677
11.2.0.3 (11.2.0.3.0                 PATCH SET FOR ORACLE DATABASE SERVER)
10404530
11.2.0.2 (11.2.0.2.0                 PATCH SET FOR ORACLE DATABASE SERVER)
10098816
11.1.0.7 (11.1.0.7.0                 PATCH SET FOR ORACLE DATABASE SERVER)
6890831
10.2.0.5 (10.2.0.5                 PATCH SET FOR ORACLE DATABASE SERVER)
8202632
d10.2.0.4 (10.2.0.4.0                 PATCH SET FOR ORACLE DATABASE SERVER)
6810189
e10.2.0.3 (10.2.0.3                 PATCH SET FOR ORACLE DATABASE SERVER)
5337014
10.2.0.2 (10.2.0.2                 PATCH SET FOR ORACLE DATABASE SERVER)
4547817
10.1.0.5 (10.1.0.5                 PATCH SET FOR ORACLE DATABASE SERVER)
4505133
10.1.0.4 (10.1.0.4                 PATCH SET FOR ORACLE DATABASE SERVER)
4163362
10.1.0.3 (10.1.0.3                 PATCH SET FOR ORACLE DATABASE SERVER)
3761843
                 9.2.0.8 (9.2.0.8 PATCH SET FOR ORACLE DATABASE SERVER)
4547809
                 9.2.0.7 (9.2.0.7 PATCH SET FOR ORACLE DATABASE SERVER)
4163445
                 9.2.0.6 (9.2.0.6 PATCH SET FOR ORACLE DATABASE SERVER)
3948480
                 9.2.0.5 (ORACLE 9I DATABASE SERVER RELEASE 2 – PATCH SET 4                 VERSION 9.2.0.5.0)
3501955
                 9.2.0.4 (9.2.0.4 PATCH SET FOR ORACLE DATABASE SERVER)
3095277
                 9.2.0.3 (9.2.0.3 PATCH SET FOR ORACLE DATABASE SERVER)
2761332
                 9.2.0.2 (9.2.0.2 PATCH SET FOR ORACLE DATABASE SERVER)
2632931
                 9.0.1.5 (9.0.1.5 PATCHSET)
3301544
                 9.0.1.4 (9.0.1.4 PATCH SET FOR ORACLE DATABASE SERVER)
2517300
                 9.0.1.3 (9.0.1.3. PATCH SET FOR ORACLE DATA SERVER)
2271678
                 8.1.7.4 (8.1.7.4 PATCH SET FOR ORACLE DATA SERVER)
2376472
                 8.1.7.3 (8.1.7.3 PATCH SET FOR ORACLE DATA SERVER)
2189751
                 8.1.7.2 (8.1.7.2.1 PATCH SET FOR ORACLE DATA SERVER)
1909158

2017年8月11日 星期五

apache httpd + SSL

引自 https://letsencrypt.tw/




最後更新日期:2017-03-16。

介紹

Let's Encrypt 是由許多大公司以及各大非營利團體為了推廣 HTTPS 而贊助的一家免費發佈 SSL certificate 的 Certiciate Authority。
這篇文章主要是介紹怎麼使用 Let's Encrypt 所提供的服務,會需要知道如何操作 command line interface。

限制

Let's Encrypt 目前已經正式開放,但有發行數量限制,一般人可能會遇到的:
  • Names/Certificate:單一 certificate 限制 100 個 hostname。
  • Certificates/Domain:每個 domain 每個禮拜最多 20 個 certificate,但 renew 不計算在 quota 內 (需要憑證內的 hostname 與之前完全一樣)。
  • Certificates/FQDNset:相同 hostname 的憑證每個禮拜最多發出五個。。
最新的資訊以及完整的細節請參考「Rate Limits - Let's Encrypt - Free SSL/TLS Certificates」這邊的說明。

安裝過程

我們用到的程式需要 curl,所以先安裝 curl:
# echo "for Debian/Ubuntu"
# apt-get install curl
# echo "for CentOS/RedHat"
# yum install curl
下載最新 release 的 dehydrated 並且解開,目前是 0.4.0:
$ # refer: https://github.com/lukas2511/dehydrated/releases
$ curl -LO https://github.com/lukas2511/dehydrated/archive/v0.4.0.tar.gz
$ tar -zxv -f v0.4.0.tar.gz
$ cd dehydrated-0.4.0/
或是透過 Git 下載最新版本:
$ cd ~; git clone https://github.com/lukas2511/dehydrated.git
$ cd dehydrated/
除了用 Git 下載外,也可以直接只抓執行檔:
$ curl -LO https://raw.githubusercontent.com/lukas2511/dehydrated/master/dehydrated
把程式安裝到 /etc/dehydrated/ 下:
# mkdir /etc/dehydrated/
# cp ~/dehydrated/dehydrated /etc/dehydrated/
# chmod a+x /etc/dehydrated/dehydrated
建立 SSL certificate 證驗證過程時所需要的目錄:
# mkdir -p /var/www/dehydrated/
設定 Apache 或是 nginx,在要認證的 virtual host 裡加上:
# for Apache
Alias /.well-known/acme-challenge/ /var/www/dehydrated/
# for nginx
location /.well-known/acme-challenge/ {
    alias /var/www/dehydrated/;
}
第一次需要先同意 Let's Encrypt 的條款:
# /etc/dehydrated/dehydrated --register --accept-terms
第一次產生 SSL certificate,黃色的部份請代換成網域名稱:
# /etc/dehydrated/dehydrated -c -d letsencrypt.tw
成功的話會有類似的輸出:
# INFO: Using main config file /etc/dehydrated/config
Processing letsencrypt.tw
 + Signing domains...
 + Generating private key...
 + Generating signing request...
 + Requesting challenge for letsencrypt.tw...
 + Responding to challenge for letsencrypt.tw...
 + Challenge is valid!
 + Requesting certificate...
 + Checking certificate...
 + Done!
 + Creating fullchain.pem...
 + Done!
成功後產生的檔案都在 /etc/dehydrated/certs/letsencrypt.tw/ 裡:
drwx------ 2 root root 4096 Feb 24 02:25 .
drwx------ 3 root root 4096 Feb 24 02:23 ..
-rw------- 1 root root 1651 Feb 24 02:25 cert-1456280700.csr
-rw------- 1 root root 2143 Feb 24 02:25 cert-1456280700.pem
lrwxrwxrwx 1 root root   19 Feb 24 02:25 cert.csr -> cert-1456280700.csr
lrwxrwxrwx 1 root root   19 Feb 24 02:25 cert.pem -> cert-1456280700.pem
-rw------- 1 root root 1675 Feb 24 02:25 chain-1456280700.pem
lrwxrwxrwx 1 root root   20 Feb 24 02:25 chain.pem -> chain-1456280700.pem
-rw------- 1 root root 3818 Feb 24 02:25 fullchain-1456280700.pem
lrwxrwxrwx 1 root root   24 Feb 24 02:25 fullchain.pem -> fullchain-1456280700.pem
-rw------- 1 root root 3243 Feb 24 02:25 privkey-1456280700.pem
lrwxrwxrwx 1 root root   22 Feb 24 02:25 privkey.pem -> privkey-1456280700.pem
接著就可以修改 Apache 或是 nginx 的 SSL 設定:
# for Apache
SSLCertificateFile /etc/dehydrated/certs/letsencrypt.tw/cert.pem
SSLCertificateChainFile /etc/dehydrated/certs/letsencrypt.tw/chain.pem
SSLCertificateKeyFile /etc/dehydrated/certs/letsencrypt.tw/privkey.pem
# for nginx
ssl_certificate /etc/dehydrated/certs/letsencrypt.tw/fullchain.pem;
ssl_certificate_key /etc/dehydrated/certs/letsencrypt.tw/privkey.pem;
然後重新載入 Apache 或是 nginx 的設定檔 (或是直接重新啟動):
# echo "for Apache"
# service apache2 reload
# echo "for nginx"
# service nginx reload
接下來設定 /etc/cron.d/dehydrated-letsencrypt_tw (因為 /etc/cron.d/ 裡面的檔名不能有 . 這個符號,用 _ 取代),讓 cron 每天自動檢查並更新:
# for Apache
0 0 * * * root sleep $(expr $(printf "\%d" "0x$(hostname | md5sum | cut -c 1-8)") \% 86400); ( /etc/dehydrated/dehydrated -c -d letsencrypt.tw; /usr/sbin/service apache2 reload ) > /tmp/dehydrated-letsencrypt.tw.log 2>&1
# for nginx
0 0 * * * root sleep $(expr $(printf "\%d" "0x$(hostname | md5sum | cut -c 1-8)") \% 86400); ( /etc/dehydrated/dehydrated -c -d letsencrypt.tw; /usr/sbin/service nginx reload ) > /tmp/dehydrated-letsencrypt.tw.log 2>&1

規劃

這段在說明上面為什麼這樣規劃,對於自動化 (像是 Puppet、Chef) 會很有幫助:
  • 選用 dehydrated 而非官方的 certbot 是因為 dehydrated 的需求相當低,只需要有 curl 與 openssl 就可以執行,相較於官方版本需要 Python 會比較簡單。
  • 放到 /etc/dehydrated/ 下的目的是避免之後各作業系統有提供 dehydrated 的套件而衝突到 (套件通常都會把可執行檔放到 /usr/bin 或是 /usr/sbin 下),另外一方面 dehydrated 會吃同一個目錄下的 config,這對於設定上可以少一些功夫。
  • 在 cron job 裡面每天執行是因為 dehydrated 會自己檢查憑證有效期限,如果還有一個月以上的時間有效就不會 renew,所以不需要擔心每天執行會造成 Let's Encrypt 的伺服器產生負擔。
  • 在 cron job 中的 sleep $(expr $(printf "\%d" "0x$(hostname | md5sum | cut -c 1-8)") \% 86400) 設計是利用機器名稱產生出十六進位 hash 值,抓一部分轉成十進位後除以一天的秒數,得到餘數後先停這個秒數再跑 dehydrated,這樣可以避免同時間有太多機器到 Let's Encrypt 的伺服器,造成類似 DDoS 的攻擊。

參考資料

Copyright

CC0 
To the extent possible under law, Gea-Suan Lin has waived all copyright and related or neighboring rights tohttps://creativecommons.org/choose/zero/waiver. This work is published from: 台灣.
 



JK部分引自





最需要注意的是JkWorkersFile與JkMount,JkWorkersFile是workers.properties的路徑,而JkMount是負責設定URL的對應。以我的例子而言,在Tomcat Server上我有LearningEnglish與LogoutArmyCD兩個應用程式,因此我針對LearningEnglish與LogoutArmyCD兩個名稱做filter,當然你也可以針對附檔名去處理。這兩個AP分別對應到le與lacd,這標記是記錄在workers.properties中。


JkWorkersFile conf/workers.properties
JkLogFile  /var/log/jk.log
JkShmFile  /var/log/jk-runtime-status
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
 
JkMount /LearningEnglish le
JkMount /LearningEnglish/* le
 
JkMount /LogoutArmyCD lacd
JkMount /LogoutArmyCD/* lacd

ssl.conf的部分只需要加入Filter對應即可。當User透過https訪問到LearningEnglish或LogoutArmyCD時,會自動導向至le與lacd所設定的Tomcat Server上。
<VirtualHost *:443>
...
JkMount /LearningEnglish le
JkMount /LearningEnglish/* le
 
JkMount /LogoutArmyCD lacd
JkMount /LogoutArmyCD/* lacd
</VirtualHost>


轉成 tomcat 用的 keystone

You do need to add the privkey.pem to the JKS, but I couldn't do so directly with keytool or Portecle and used a workaround instead.
With the help of openSSL you can create a PKCS12 keystore with both your certificate and the private key like so (no password for privkey.pem required):
openssl pkcs12 -export -in cert.pem -inkey privkey.pem -out cert_and_key.p12 -name tomcat -CAfile chain.pem -caname root
I than converted this PKCS12 to a JKS:
keytool -importkeystore -deststorepass <changeit> -destkeypass <changeit> -destkeystore MyDSKeyStore.jks -srckeystore cert_and_key.p12 -srcstoretype PKCS12 -srcstorepass <thePasswordUsedInTheCommandAbove> -alias tomcat
After that I added the chain.pem (although this might have been avoided with the use of -chain in the openSSL command, I guess):
keytool -import -trustcacerts -alias root -file chain.pem -keystore MyDSKeyStore.jks
The resulting JKS can be used in a Tomcat Connector configuration like so:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/path/to/MyDSKeyStore.jks" keystorePass="<changeit>"
keyAlias="tomcat" keyPass="<changeit>"/>
So this allows you to use your LE certificate with Tomcat =)
Hope this helps.

2017年8月4日 星期五

用 ActiveX 從 browser 開新視窗

-----------------------------
<script type="text/javascript" language="javascript">

        function RunFile() {

        WshShell = new ActiveXObject("WScript.Shell");

        WshShell.Run("c:/windows/explorer.exe ftp://support.localdomain.au/isd-bbs", 1, false);

        }

    </script>


<p><IMG SRC="image-sign.gif" HEIGHT=30 WIDTH=30 ALIGN=ABSCENTER><b><font face="Verdana, Arial, Helvetica"><font size=-1><a href="input type="button" value="Run File Explorer" onclick="RunFile();" onMouseOver = "window.status='For any downloading problem contact Kiran on 55231 or Call Call-Centre 58877    !!'; return true;" onMouseOut = "window.status=' '; return true;"> Win10-Download </a></font></font></b></p>
The ActiveX control has to be enabled. It will prompt for ActiveX control. I have disabled it with the following switches in Internet Options ==> Security ==>Local Intranet ==> Custom Level
i. Automatic prompting for ActriveX controls - disable
ii. Initialize and script ActiveX controls not marked as safe for scripting - enable

----------------------------
以下的方式未確認是否OK

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTftp]
Source Filter={E436EBB6-524F-11CE-9F53-0020AF0BA770}
ShellFolder={63da6ec0-2e98-11cf-8d82-444553540000}
@=URLFile Transfer Protocol
AppUserModelID=Microsoft.InternetExplorer.Default
EditFlags=dword00000002
URL Protocol=
FriendlyTypeName=@CWindowsSystem32ieframe.dll,-905
[HKEY_CLASSES_ROOTftpDefaultIcon]
@=CWindowsSystem32url.dll,0
[HKEY_CLASSES_ROOTftpshell]
[HKEY_CLASSES_ROOTftpshellopen]
[HKEY_CLASSES_ROOTftpshellopencommand]
@=CProgram Files (x86)Internet Exploreriexplore.exe %1
[HKEY_CLASSES_ROOTftpshellopenddeexec]
@=hex(2)22,00,25,00,31,00,22,00,2c,00,2c,00,2d,00,31,00,2c,00,30,00,2c,00,2c,
00,2c,00,2c,00,00,00
NoActivateHandler=
[HKEY_CLASSES_ROOTftpshellopenddeexecApplication]
@=IExplore
[HKEY_CLASSES_ROOTftpshellopenddeexecIfExec]
@=
[HKEY_CLASSES_ROOTftpshellopenddeexecTopic]
@=WWW_OpenURL