Skip to content
ShaoPin Cheng
  • 首頁
  • 贊助協作
  • 足球賽事表
  • 帳號資訊
    • 登入
    • 註冊
    • 帳號資訊
      • 訂單
      • 數位產品下載
      • 地址
      • 購物車
    • 登出
    • 遺失密碼
  • Blog

Blog

個人未分類

XRDP 中文支援...

  • 2025 年 6 月 6 日2025 年 6 月 6 日
  • by cjt74392

1. Xorg啟用, 取代xvnc

xvnc存在多種相容問題, 改用xorg

# vim /etc/xrdp/xrdp.ini

[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20

2. 中文copy and paste支援

# vim /etc/xrdp/sesman.ini

RestrictOutboundClipboard=true
RestrictInboundClipboard=true
  • 讓Xsession支援Unicode
#vim /etc/xrdp/startwm.sh
  # el
  if [ -r /etc/X11/xinit/Xsession ]; then
    pre_start
    xfce4-session
    . /etc/X11/xinit/Xsession
    # cust
    xrdp-chansrv &
    # end cust
    post_start
    exit 0
  fi
  • Fedora and RHEL 安裝chrome需要ibus支援gtk4
    不然chrome無法輸入或貼上中文,
    而問題判斷就是command mode及console登入可以輸入中文, chrome無法輸入中文
# yum install ibus-gtk4

keyboard鍵盤配置 (Option)

  • xrdp-genkeymap km-00000804.ini
  • sudo mv km-00000804.ini /etc/xrdp
  • chown root:root /etc/xrdp/km-00000804.ini

附註:
權限相關需注意的事
# vim /home/USERNAME/.xsession

#xfce4-session
gnome-session
個人未分類

如何陪伴小一新鮮人...

  • 2016 年 9 月 26 日2021 年 3 月 19 日
  • by cjt74392

一杯咖啡的時間,一輩子的回憶

今年8月29日,也是全國小一新生入學的日子,應邀於我的母校天母國小,以過來人的身分,與新生家長分享如何陪伴小一新鮮人,快樂學習健康成長,並以親子陪伴孩子閱讀與運動為主軸,除揭示運動對孩子的重要性外,也分享他陪伴孩子每日睡前讀床邊故事的經驗,也藉此機會拋磚引玉,期待父母能每日花一點點時間,如喝一杯咖啡的時間,為孩子讀床邊故事,日積月累長此以往,卻是孩子一輩子的甜蜜的回憶。

如何陪伴小一新鮮人,快樂學習健康成長
(口白部分僅當天家長聆聽)

延伸閱讀連結

個人未分類

(三國)我今天的手...

  • 2014 年 11 月 23 日2021 年 3 月 19 日
  • by cjt74392
孔明
雲長
其實我也不曉得我會畫, 自己今天才發現.
AIX 7.1 + Apache 2.4 + PHP libphp5.so with PDO AIX

AIX 7.1 +...

  • 2013 年 2 月 21 日2021 年 3 月 17 日
  • by cjt74392

The following experience, it took me a lot of time …..may help you.

1.Download PHP 5.2.14 (Other version NOT successed)

2.AIX 7.1 need  vi /include/gd_io.h , typedef struct gdIOCtx add void *data;  

3.Edit PHP Makefile add this
   PHP_CLI_OBJS = sapi/cli/php_cli.lo sapi/cli/php_http_parser.lo sapi/cli/php_cli_server.lo $(PHP_BINARY_OBJS)
PHP_CGI_OBJS = sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo main/internal_functions.lo

4.Edit PHP sapi/apache2handler/php_functions.c (becouse we use Apache 2.4  NOT 2.2)
   –       AP_DECLARE_DATA extern unixd_config_rec unixd_config;
   +       AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
   –       snprintf(tmp, sizeof(tmp), “%s(%d)/%d”, unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
   +       snprintf(tmp, sizeof(tmp), “%s(%d)/%d”, ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);

5.Link some file ….

   ls -s /opt/freeware/bin/pg_config /usr/bin/pg_config
   ls -s /opt/freeware/bin/mysql_config /usr/bin/mysql_config
   ln -s /opt/freeware/lib/libcrypto.so.0.9.8 /opt/freeware/lib/libcrypto.so    (OpenSSL ver cant greater than 0.9.8)

6.Configure PHP 5.2.14 with

./configure –prefix=/opt/freeware –with-apxs2=/opt/freeware/bin/apxs –with-zlib –with-zlib-dir=/opt/freeware –with-gd=/opt/freeware –with-freetype-dir=/opt/freeware –with-png-dir=/opt/freeware –with-mysql=/usr/local/mysql –with-mcrypt=/opt/freeware –enable-mbstring –with-gettext=/opt/freeware –with-libxml-dir=/opt/freeware/lib –enable-sockets –with-pcre-dir=/opt/freeware –with-snmp=/opt/freeware –with-openssl=/opt/freeware –with-bz2=/opt/freeware –with-jpeg-dir=/opt/freeware –enable-bcmath –enable-calendar –enable-maintainer-zts –disable-static –enable-shared –enable-ftp –with-curl=/opt/freeware –with-pdo-mysql=/usr/local/mysql –with-t1lib=/opt/freeware –with-libmbfl –with-iconv=/opt/freeware –with-iconv-dir=/opt/freeware –with-xpm-dir=/opt/freeware –enable-json –with-mysqli=/usr/local/mysql/bin/mysql_config –with-pgsql=/opt/freeware/bin/pg_config –with-pdo-pgsql=/opt/freeware/bin/pg_config

7.Make and Copy module
make
cp .libs/libphp5.so /xxx/xxx/apache/modules/  (xxx depend on your apache config)

Other note — Upgrading to 2.4 from 2.2
http://httpd.apache.org/docs/2.4/upgrading.html

Nagios

Highchart...

  • 2012 年 10 月 19 日2021 年 3 月 17 日
  • by cjt74392

Highcharts for Nagios is  Shao Pin, Cheng為Nagios 開發的開源plugin

What is Highcharts?

Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application. Highcharts currently supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange and polar chart types.

簡而言之Highchart就是開源的 畫漂亮圖表軟體
為了讓Nagios享有這種傑出的軟體功能,所以我寫了這個插件. (一種創意)
它能動態放大及自動調整圖片Y軸高度,及動態自訂線條顯示.
當一堆線畫在同一張圖時就會明白好用之處.
範例:

Highchart for Nagios – Download

如何 Install :
Ver 1.2
1.您必需先安裝pnp4nagios
2.解壓縮Highcharts4nagios.tar到httpd下您指定的目錄, 如:  /highcharts/
3.修改Nagios (service).cfg服務的設定檔,把action_url或是notes_url加上 /highcharts/highcharts.html?host=$HOSTNAME$&srv=$SERVICEDESC$  (黃字視您安裝的路徑修改)
4.reload nagios讓config生效後就完成了.

ps:Highchart的gray.js themes第一條線的顏色非常醜,您可以修改js/themes/gray.js 內的first colors: #9172EC“,……….  或換成你喜歡的顏色.

進階的參數就請看我前一篇文章
Highcharts for Nagios Timeranges

Nagios

Highchart...

  • 2012 年 10 月 18 日2021 年 3 月 17 日
  • by cjt74392

Highcharts4 Nagios Update

Ver 1.24 — Update 2013.05.14 
—————————- 
* Interface update

Ver 1.21 — Update 2012.11.01 
—————————- 
*Add custom time range select. 
*Add different domain support. 
*All in one. 

Install Notes

1.You must installed pnp4nagios above 0.6.x, NOT work with 0.4.x 
2.Download highcharts4nagios.rar, unrar to ex:/usr/local/highcharts/ 
3.Modify httpd.conf. 
4.Add Nagios service config with action_url or notes_url to ex: 
notes_url /highcharts/highcharts.html?host=$HOSTNAME$&srv=$SERVICEDESC$ 
4.Restart httpd and nagios.
  (Below this line …. is optional, Not necessary !) 
5.If  highcharts-IP & pnp4nagios-IPchange not in the same server, 
   change  highcharts.html  LocHost=’Your pnp4nagios IP’ values
6.If client in different Domain, you need edit 
   pnp4nagios/share/application/controllers/xport.php 
   add bellow line …
header(“Access-Control-Allow-Origin: *”);  //Allowed *(your IP) Access-Control-Allow-Origin
7.If you are ruining Apache with SSL (https), modify line 150 of highcharts.html from http to https and you can see the graph.


Timeranges

Additionally you can influence the timeranges via the URL. This can be useful to automatically create PDF documents. The ranges can be defined using the options “start” and “end”.
Example:
 highcharts/graph?host=&srv=&start=-1week
The graph will start one week prior to the current date and time. It will end at the current timestamp.
start end view result
all views ending at current timestamp
x all views starting at defined date
x all views ending at defined date
x x one view between the two dates
x one view ending at current timestamp
x x one view starting at defined date
x x one view ending at defined date
Examples of different specifications
format description
2009W04 4. week of 2009
1.5.2009 May, 1st 2009
-1 day one day back
-3 weeks 3 weeks back
-1 year one year back
yesterday yesterday

Customize

Highcharts theme:
1.Highcharts line color:
   Edit js/themes/gray.js or dark-blue.js, dark-green.js, grid.js.
2.Highcharts theme:
   Edit highcharts.html, find gray.js change to {dark-blue.js or dark-green.js or grid.js or skies.js}
3.Theme line color:
   Modify the js/themes/gray.js the first colors: # 9172EC “, ………. or with your favorite color
Calendar theme:
1.Calendar LANG:
   Edit highcharts.html, find en.js change to {cn.js(Tradition Chinese), ca.js, cn.js, cz.js, de.js, en.js, es.js, fr.js, hr.js, it.js, jp.js, nl.js, pl.js, pt.js, ro.js, ru.js, sk.js, sv.js}
2.Calendar theme:
   Edit highcharts.html, find gold.css change to {steel.css, matrix.css, win2k.css, gold.css, steel.css}

Nagios plugin to monitor IBM System i (AS/400) Nagios

Nagios pl...

  • 2012 年 9 月 19 日2021 年 3 月 17 日
  • by cjt74392

Nagios plugin to monitor IBM System i (AS/400)

Nagios Exchange – check_as400   This is one of my works.
Check_as400 Version: 1.1.1 : <2013> 
* check number of jobs in JOBQ 

Check_as400 Version: 1.0.1 : 
* check CPU load. 
* check ASP usage. 
* check Pool DB/Non-DB Fault 
* check number of active jobs in system. 
* check to see if job is in the system.
* DB utilization. (Not available after V6R1)
* check DISK Status.
* check if login completes.
* check for any unanswered messages on msg queue.
* check outq files, writer and status.
* check if the subsystem is running.
* check MIMIX Data Group Unprocessed Entry Count. 

IT資產管理 GLPI version 0.84 繁體中文化完成 (台灣) GLPI

IT資產管理 GL...

  • 2012 年 9 月 10 日2021 年 3 月 19 日
  • by cjt74392

IT資產管理 GLPI version 0.84 繁體中文化 (台灣) 於今日終於全部完成


因GLPI語系轉換工作自年初該開發團隊移至新的翻譯網站進行管理開發,
舊的繁體中文翻譯已經100%完成,但GLPI團隊自稱竭盡全力,仍無法完整將舊資料轉換到新網站,(僅53%的繁體中文翻譯正常轉換),
所以又耗用我相當多的時間才用重新翻譯完成.

新的翻譯介面可以讓大家一同來參與翻譯的工作,如果我有翻的不好或是不順暢的地方,
大家都可以來進行修訂.
https://www.transifex.com/projects/p/GLPI/language/zh_TW/
為i5/OS配置sshd PHP MySQL AS400

為i5/OS配置s...

  • 2012 年 8 月 17 日2021 年 3 月 19 日
  • by cjt74392
為IBM i配置ssh連線
1.iOS需安裝5733SC1…等等
詳見 IBM i Requirements
2.進qsh or call qp2term產生sshd的服務密鑰
  • ssh-keygen -t rsa1 -f /QOpenSys/QIBM/ProdData/SC1/OpenSSH/openssh-3.8.1p1/etc/ssh_host_key -N “”
  • ssh-keygen -t rsa1 -f /QOpenSys/QIBM/ProdData/SC1/OpenSSH/openssh-3.8.1p1/etc/ssh_host_rsa_key -N “”
  • ssh-keygen -t dsa1 -f /QOpenSys/QIBM/ProdData/SC1/OpenSSH/openssh-3.8.1p1/etc/ ssh_host_dsa_key -N “”
開啟sshd
/QOpenSys/usr/sbin/sshd

3.因為我個人喜好用bash,所以有許多步驟要執行,如下(不用bash的請略過)
ssh連線至IBM i PASE安裝RPM及gmake套件以安裝bash等…..RPM
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/rpm.rte
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/make

mkdir -P /QOpenSys/compiler
cd /QOpenSys/compiler
安裝RPM
restore -xqf rpm.rte
mv /QOpenSys/compiler/usr/opt/freeware /opt
cd /opt/freeware/lib

cp librpmbuild.so.0.0.0 librpmbuild.so
cp libpopt.so.0.0.0 libpopt.so
cp librpm.so.0.0.0 librpm.so
ln -s /opt/freeware/bin/rpm /usr/bin/rpm
安裝gmake
rpm --ignoreos --ignorearch --noodeps -ivh make-xxxx.ppc.rpm
安裝bash rpm
rpm --ignoreos --ignorearch --noodeps -ivh bash-xx.ppc.rpm

安裝PHP (Zend Core for i5/OS)
download Zend Server for IBM i (PHP 5.3)解壓後點選setup安裝
http://www.zend.com/en/products/server/downloads
安裝會以batch執行,以wrkactjob 確認該安裝已完成後執行
go zendsvr/zcmenu
安裝MySQL(Option,可用DB400),變更密碼後,將所有服務都start
為了安全記得變更MySQL root密碼,變更後才能用PhpMyAdmin
ps:PhpMyAdmin內建已安裝,對SQL不熟悉的人可以用此web管理DB

進Zend Server管理網頁確認PHP狀態
http://172.16.0.100:10088/ZendServer
在網頁上變更time zone ,Server Setup->Directives->date (也可以直接改php.ini)
date.timezone台灣改 Etc/GMT-8


其它後記:

使用Zend 5250 Emulator and Zend 5250 Bridge Object Oriented API發生的問題WRKACTJOB JOB(QQF*)查Webfacing的log發現有error,QQFTEMP 不存在
crtlib QQFTEMPQUSER *ALLCHGOBJOWN OBJ(QQFTEMP) OBJTYPE(*LIB) NEWOWN(QSYS)WebFacing Troubleshooting Tipshttp://www-01.ibm.com/support/docview.wss?uid=swg27005905

Oracle JInitiator 1.3.1.21 在 Win7 IE9  EBS異常關閉的處理方式 Win 7

Oracle JI...

  • 2012 年 6 月 27 日
  • by cjt74392

因JInitiator的版本是程式宣告控制的,我沒權限動它,
問題既然出在JVM,那就從JVM版本下手

1.請將這個jvm.dll替換下面路徑內的
C:Program FilesOracleJInitiator 1.3.1.21binhotspot
2.Win7會跳出

「色彩配置已變更為Windows 7 Basic」訊息,

請點選永遠忽略,再開一次就會正常。

3.一定要重開機才能完全正常使用。

ps:IE8登入OK但是使用時也會有類似的問題,也可用此方式解決.
根本解決之道還是請EBS系統負責人把JInitiator提升吧.

文章分頁

1 2 3

近期文章

  • XRDP 中文支援相關設定
  • 如何陪伴小一新鮮人,快樂學習健康成長
  • (三國)我今天的手稿創作 Paper painting.
  • AIX 7.1 + Apache 2.4 + PHP libphp5.so with PDO
  • Highcharts for Nagios

近期留言

  • 「Unknown」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「David Yu」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「紹斌」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「Henrik」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「Unknown」於〈考取CISA的經驗〉發佈留言

彙整

  • 2025 年 6 月
  • 2016 年 9 月
  • 2014 年 11 月
  • 2013 年 2 月
  • 2012 年 10 月
  • 2012 年 9 月
  • 2012 年 8 月
  • 2012 年 6 月
  • 2012 年 5 月
  • 2011 年 11 月
  • 2011 年 10 月
  • 2011 年 8 月
  • 2011 年 4 月
  • 2011 年 3 月
  • 2011 年 2 月
  • 2011 年 1 月
  • 2010 年 10 月

分類

  • AIX
  • AS400
  • CISA
  • GLPI
  • Nagios
  • RHCE
  • Win 7
  • 個人未分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
Theme by Colorlib Powered by WordPress