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

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

AIX上使用Nagios監控軟體接收SNMP的訊息,以IBM TS3100為例

AIX上使用Nag...

  • 2011 年 4 月 15 日2021 年 3 月 19 日
  • by cjt74392

1.在AIX編譯 SNMP 5.5 或是去找rpm安裝
./configure –disable-embedded-perl –without-kmem-usage

2.安裝SNMP (snmpd snmptrapd)
(1).安裝後設定設定檔 ./snmpconf -i
(2).IBM TS3100磁帶館預設snmp community是 public (initial),

3.安裝snmptt 以處理Trap後的Log
(1).snmptrapd.conf要加權限,並讓snmptt的Stand along和Daemon mod都能處理snmptrap的訊息
authCommunity log,execute,net public
traphandle default /usr/sbin/snmptthandler
traphandle default /usr/sbin/snmptt
重啟snmpd及snmptrapd
(2).snmptt 導入要監控的mib檔
./snmpttconvertmib –in=/usr/share/snmp/mibs/powernet361.mib –out=/etc/snmp/snmptt.ibm.conf
(3).vi snmptt.ini 將 snmptt.ibm.conf 加入
(4).要送訊息的部份加入submit_check_result HOSTNAME SERVICENAME CODE MESSAGE,範例如下
EVENT eventDoorOpen .1.3.6.1.4.1.2.6.210.4.2 “Status Events” INFORMATIONAL
FORMAT Library Door Opened: The library $1 (Serial Number $2) door has been opened.
EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result AS400-B0000 TS3100 1 “The library $1 (Serial Number $2) door has been opened”
SDESC
The library door has been opened.
Variables:
EDESC
(5).重啟snmptt服務,查log是否正確
(6).開TS 3100的Door或是Login/Logout Web帳號做測試.

Debug
1.有問的的話改snmpd.conf snmptrapd.conf snmptt.ini(debug=2),輸出log
2.AIX 開IIP trace,看該設備有沒有訊息到AIX
/usr/bin/startsrc -s iptrace -a “-a -b -d x.x.x.x -i en0 /var/log/snmptt/iptrace.cap” >/dev/null 2>&1
/usr/bin/stopsrc -s iptrace >/dev/null 2>&1
看trace log
ipreport -srn /var/log/snmptt/iptrace.cap

Samba on AIX 5.3

Samba on ...

  • 2011 年 1 月 14 日
  • by cjt74392

Here are instructions on how to get the pware Samba running on AIX 5.3.

1. Install these packages from the AIX installation CD:
ldap.client.rte
ldap.client.adt

2. Download these packages:

mkdir pware-samba
cd pware-samba
xargs wget -nd << EOF
http://pware.hvcc.edu/download/aix53-64/pware53-64.samba.3.4.2.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.base.5.3.0.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.cyrus-sasl.2.1.22.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.gettext.0.17.0.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.krb5.1.6.3.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.libiconv.1.13.1.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.ncurses.5.7.0.1.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.openldap.2.4.19.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.openssl.0.9.8.11.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.popt.1.10.4.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.bdb.4.7.25.4.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.rsync.3.0.6.0.bff.gz
http://pware.hvcc.edu/download/aix53-64/pware53-64.zlib.1.2.3.0.bff.gz
EOF
server:root>for i in *.gz; do gunzip $i; done
From: http://pware.hvcc.edu/download/aix53-64/

3. Install the packages.

The installed files go under /opt/pware64

Samba configuration file is /opt/pware64/lib/smb.conf

4. Extremely simple Samba configuration file:

[global]
workgroup = MYGROUP
log file = /var/log/%m.log
max log size = 500

[myshare]
comment = Sample share
path = /tmp/myshare
public = yes
writable = yes
browseable = yes
5. Enable POSIX Asynchronous IO if needed:

server:root>mkdev -l posix_aio0
posix_aio0 Available
server:root>lsdev -Cc posix_aio
posix_aio0 Available Posix Asynchronous I/O
The posix_aio device is needed, otherwise all binaries will complain somewhat like this:

exec(): 0509-036 Cannot load program ./smbclient because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libc.a[posix_aio_64.o] because:
0509-136 Symbol _posix_kaio_rdwr64 (number 2) is not exported from
dependent module /unix.
0509-136 Symbol _posix_listio64 (number 3) is not exported from
dependent module /unix.
0509-136 Symbol _posix_acancel64 (number 4) is not exported from
dependent module /unix.
0509-136 Symbol _posix_iosuspend64 (number 5) is not exported from
dependent module /unix.
0509-136 Symbol _posix_aio_nwait (number 6) is not exported from
dependent module /unix.
0509-136 Symbol _posix_aio_nwait64 (number 7) is not exported from
dependent module /unix.
0509-136 Symbol _posix_aio_nwait_timeout (number is not exported from
dependent module /unix.
0509-136 Symbol _posix_aio_nwait_timeout64 (number 9) is not exported from
dependent module /unix.
0509-136 Symbol _posix_iofsync64 (number 10) is not exported from
dependent module /unix.
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
‘dump -Tv’ command.
So if you run into this error message, create the POSIX AIO device.

6. Run samba

server:root>/opt/pware64/sbin/smbd
server:root>/opt/pware64/sbin/nmbd
7. Add to inittab for automatic start at boot time

server:root>mkitab nmbd:2:once:/opt/pware64/sbin/nmbd
server:root>mkitab smbd:2:once:/opt/pware64/sbin/smbd

Mounting Windows filesystems from AIX 5.3

Mounting ...

  • 2011 年 1 月 14 日
  • by cjt74392

First, you must install fileset bos.cifs_fs.rte, and optionally bos.cifs_fs.smit for the Smitty interface, from the installation DVD.

To invoke the Smitty interface, run:

root# smitty cifs_fs
The Smitty interface will enable you to do almost anything you need with the CIFS filesystem.

For people aligned the command line way, mounting a share is a two-phase process. First, credentials must be added to the /etc/cifs_fs/cifscred file. After that, you can mount a remote CIFS file system using the credentials specified. You could do the whole thing from the command line, but this is the preferred method in my opinion.

SMBFS can store server/user/password credentials in the /etc/cifs_fs/cifscred file to allow automatic retrieval of passwords when mounting SMBFS. Credentials can be added, changed, and removed from this file with the mkcifscred, chcifscred, and rmcifscred commands.

To add a credential:

root# mkcifscred -h -u -p Use the mkcifsmnt, chcifsmnt, rmcifsmnt, and lscifsmnt commands to add, change, remove, and list, respectively, cifs stanzas in /etc/filesystems.

To mount a file system:

root# mkdir -p /mount/point
root# mkcifsmnt -f /mount/point -h -d -c -w
That will add a new stanza to /etc/filesystems:

/mount/point:
dev =
vfs = cifs
nodename = /&lt:user>
mount = false
options = wrkgrp=
account = false
Automatical mounting during startup can be specified with the -A option to mkcifsmnt. You can give your mounted share a different set of permissions and owners with the -u , -g and the -x options.

近期文章

  • 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