ナビゲーション
FrontPage
FreeBSD
Linux
Citrix XenServer
VMware ESXi
Unixコマンド
MySQL
PostgreSQL
Windows
CMS/CRM
クラウド
用語
PHPスクリプト
Bashシェルスクリプト
Rubyスクリプト
開発日記
検索
ツールボックス
新しいページの作成
バックアップの表示
外部のリンク元
最近更新したページ
全ページ
ヘルプ
凍結
アップロード
ページ名の変更
最新の40件
2016-08-17
Linux/NagiosQL
Linux/CentOSチューニング
2016-02-23
Linux/ソフトウェアRAID復旧手順
2016-02-18
FreeBSD/DHCP
FreeBSD/squid
2016-02-15
Unixコマンド/file
2016-02-05
FreeBSD/DynaBook
FreeBSD/Linux compatibility
2016-01-21
PHPスクリプト/PEAR DBインストールできない
PHPスクリプト/PEAR DB
2016-01-20
PHP/フレームワーク/Zend Framework
PHP/フレームワーク
FreeBSD/Postfix+amavisd+clamav
2016-01-15
FreeBSD/sl
2015-12-04
Unixコマンド/dig
Unixコマンド/nslookup
Unixコマンド/traceroute
Linux/rsync
FreeBSD/rsync
Unixコマンド/vipw
2015-11-25
Linux/Postfix+MySQL+Postfix AdminによるバーチャルSMTPサーバの構築
Linux/Postfix + postgrey
2015-11-24
Linux/Postfix + amavisd + clamav
2015-05-25
Unixコマンド/ifconfig
2015-05-23
Unixコマンド/netstat
Unixコマンド/route
Unixコマンド/lsof
Unixコマンド/disown
Unixコマンド/time
Unixコマンド/crontab
2015-05-22
Unixコマンド/nohup
Unixコマンド/fgとbg
Unixコマンド/nice
Unixコマンド/kill
Unixコマンド/jobs
Unixコマンド/restor
Unixコマンド/dump
Unixコマンド/uncompress
Unixコマンド/compress
Unixコマンド/zcat
total:
1810
today:
1
yesterday:
1
now:
1
本文
ノート
?
編集
差分
一覧
Linux/net-snmp+PHP の編集
*net-snmpとPHP [#r8607717] **バージョン [#od38ebdd] -PHP 5.2.6 -net-snmp 5.1.4 net-snmpのバージョンを最新の5.4.2.1をインストールすると、 下記のエラーでPHPのコンフィグが通らない configure: error: SNMP sanity check failed. Please check config.log for more information. **net-snmp [#u71388d3] http://www.net-snmp.org/ ここからソースをダウンロード # tar zxvf net-snmp-5.1.4.2.tar.gz # cd net-snmp-5.1.4.2 #./configure \ --with-mib-modules=ucd-"snmp/diskio ucd_snmp" \ --enable-shared --enable-ucd-snmp-compatibility \ --with-openssl=/usr/local/ssl --sysconfdir=/etc # make # make install # mkdir /etc/snmp # cp EXAMPLE.conf /etc/snmp/snmpd.conf **snmpd起動スクリプト [#scd43f30] # vi /etc/init.d/snmpd #!/bin/bash # ucd-snmp init file for snmpd # # chkconfig: 345 50 50 # description: Simple Network Management Protocol (SNMP) Daemon # # processname: /usr/local/sbin/snmpd # config: /usr/local/share/snmp/snmpd.conf # pidfile: /var/run/snmpd # securlevel: 10 # source function library . /etc/rc.d/init.d/functions OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a" RETVAL=0 prog="snmpd" start() { echo -n $"Starting $prog: " daemon /usr/local/sbin/snmpd $OPTIONS RETVAL=$? echo touch /var/lock/subsys/snmpd return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc /usr/local/sbin/snmpd RETVAL=$? echo rm -f /var/lock/subsys/snmpd return $RETVAL } reload(){ stop start } restart(){ stop start } condrestart(){ [ -e /var/lock/subsys/snmpd ] && restart return 0 } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; condrestart) condrestart ;; status) status snmpd ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" RETVAL=1 esac exit $RETVAL **PHP [#t3ee6ac2] ./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=/usr/local/mysql \ --enable-cli \ --enable-pear \ --with-tsrm-pth \ --with-gd --with-zlib \ --with-freetype-dir=/usr/local \ --with-jpeg-dir=/usr/local \ --with-png-dir=/usr/local \ --enable-force-cgi-redirect \ --enable-mbstring \ --enable-mbstr-enc-trans \ --enable-trans-sid \ --enable-versioning \ --enable-gd-native-ttf \ --enable-gd-jis-conv \ --enable-sockets \ --with-snmp=/usr/local
タイムスタンプを変更しない
*net-snmpとPHP [#r8607717] **バージョン [#od38ebdd] -PHP 5.2.6 -net-snmp 5.1.4 net-snmpのバージョンを最新の5.4.2.1をインストールすると、 下記のエラーでPHPのコンフィグが通らない configure: error: SNMP sanity check failed. Please check config.log for more information. **net-snmp [#u71388d3] http://www.net-snmp.org/ ここからソースをダウンロード # tar zxvf net-snmp-5.1.4.2.tar.gz # cd net-snmp-5.1.4.2 #./configure \ --with-mib-modules=ucd-"snmp/diskio ucd_snmp" \ --enable-shared --enable-ucd-snmp-compatibility \ --with-openssl=/usr/local/ssl --sysconfdir=/etc # make # make install # mkdir /etc/snmp # cp EXAMPLE.conf /etc/snmp/snmpd.conf **snmpd起動スクリプト [#scd43f30] # vi /etc/init.d/snmpd #!/bin/bash # ucd-snmp init file for snmpd # # chkconfig: 345 50 50 # description: Simple Network Management Protocol (SNMP) Daemon # # processname: /usr/local/sbin/snmpd # config: /usr/local/share/snmp/snmpd.conf # pidfile: /var/run/snmpd # securlevel: 10 # source function library . /etc/rc.d/init.d/functions OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a" RETVAL=0 prog="snmpd" start() { echo -n $"Starting $prog: " daemon /usr/local/sbin/snmpd $OPTIONS RETVAL=$? echo touch /var/lock/subsys/snmpd return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc /usr/local/sbin/snmpd RETVAL=$? echo rm -f /var/lock/subsys/snmpd return $RETVAL } reload(){ stop start } restart(){ stop start } condrestart(){ [ -e /var/lock/subsys/snmpd ] && restart return 0 } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; condrestart) condrestart ;; status) status snmpd ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" RETVAL=1 esac exit $RETVAL **PHP [#t3ee6ac2] ./configure --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=/usr/local/mysql \ --enable-cli \ --enable-pear \ --with-tsrm-pth \ --with-gd --with-zlib \ --with-freetype-dir=/usr/local \ --with-jpeg-dir=/usr/local \ --with-png-dir=/usr/local \ --enable-force-cgi-redirect \ --enable-mbstring \ --enable-mbstr-enc-trans \ --enable-trans-sid \ --enable-versioning \ --enable-gd-native-ttf \ --enable-gd-jis-conv \ --enable-sockets \ --with-snmp=/usr/local
テキスト整形のルールを表示する
ログインまたはアカウント作成