linux
sar -n TCP、-n IPなどでTCP/IPの統計も見たい場合sadcに"-S SNMP"オプション追加が必要man sar With the TCP keyword, statistics about TCPv4 network traffic are reported. Note that TCPv4 statistics depend on sadc option "-S SNMP" to be collected…
このオプションすぐ忘れる oflag=direct $ dd if=/dev/zero of=/tmp/hoge.dat bs=1M count=1000 oflag=direct
ストレージの機能で仮想マシンのイメージをsnapshotでとっていても、 実際にそのvmdkから特定のファイルを復旧する場合は、 そのsnapshotのファイルをコピーしてインベントリに登録、、、などまあまあ面倒。 だったらいっそのことvmdkを直接mountしたらええ…
GMO側がPCI DSS対応でTLS 1.2のみでの接続となってる。で、CentOS6でcurlで接続すると、 rpmでinstallされているcurl/opensslはtls 1.2に対応しているにも関わらずSSL Connect Errorで弾かれる。 (正確にはcurl直叩きではなくてphpから呼び出すcurl)curl-7.1…
http://qiita.com/albatross/items/390bf14db8b57c5a42f4 ずばり探し求めてたの発見。wifiなどでoutboundが80,443だけに制限されている場合、 aws上のサーバなどにsshが出来ない。てっとり早い対応はsshのportを443に変えてしまう。 sshdの設定で鍵認証だけ…
mdadmを使っているためvmware converterが使えなくて、ssh+tarでp2vする場合の注意点。参考: http://hogem.hatenablog.com/entry/2016/02/12/233000 inode size 移行先の仮想マシンで何も考えずにmkfsしてinode sizeが256になっていると、 移行元のgrubのバ…
久々に触ったら突然牛が出てきてうけた。 正確にいうとansibleは何も変わってなくて、サーバにcowsayがinstallされたからだった。 _____________ < PLAY [hoge] > ------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || https://support.ansible.…
久々の更新。 man 5 rsyslog.conf Named pipes This version of rsyslogd(8) has support for logging output to named pipes (fifos). A fifo or named pipe can be used as a destination for log messages by prepending a pipe symbol (’|’) to the name…
opensslでprivate CAを作るとRHELの場合は/etc/pki/CA/ (openssl.cnfは/etc/pki/tls/openssl.cnf)が自動的に指定されるので、rootじゃないと証明書を作成できない。一般ユーザで場所を指定したい場合はどうしたらいい?と思ってopenssl ca help をみると" -c…
/var/log/maillog STARTTLS=client, error: connect failed=-1, SSL_error=1, errno=0, retry=-1 STARTTLS=client: 26136:error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small:s3_clnt.c:3342: ruleset=tls_server, arg1=SOFTWARE,…
/etc/pki/tls/misc/CA -newreq だとパスワードを聞かれるので 内部で実行されている openssl reqを直接実行して、標準入力から読み込むようにする。スクリプトにがっつりパスワードを書いていて無条件に署名するので 本番運用するCAの場合は取り扱い注意。や…
1年ぶりにやったらど忘れしてる。 クライアント証明書発行 事前にプライベートCA作っておくこと 詳細は省略 /etc/pki/tls/misc/CA -newca クライアント証明書用 秘密鍵、CSR作成 /etc/pki/tls/misc/CA -newreq上で作ったファイルがあるディレクトリでCAで署…
AskF5 | Manual Chapter: Configuring Remote SSL OCSP Authentication 参考:hogem.hatenablog.com URLはpoolではなく、直接指定しかできないから、真面目に使うならサーバ間でHAとかしないとダメ? と思ったけどvirtualserverのIP宛でも指定できたので、事…
cacti/cloudforecastってどやって取ってるん?とふと気になって調べた。 cloudforecastのlib/CloudForecast/Data/Disk.pm 見てたらhrStorage* という単語あったので snmpのoid見てたらこの辺だった。 各サーバのsnmpd.conf にdiskの設定追加しなくても良い方…
これあんまりやらんからすぐ忘れちゃう。 mail -S "smtp=smtp://192.0.2.1:25"もしくは~/.mailrc set smtp=smtp://192.0.2.1 ちなみにsendmailコマンドの場合 /etc/mail/submit.mc FEATURE(`msp', `[192.0.2.1]')dnl postfix版のsendmailコマンドは不明
便利ソフトウェアです。incronを知らなかったので、昔はこんなことしてた。 inotifywatchでイベントを監視してコマンド実行する 一時的なコマンドならこれでも良かったけど、ファイルが増えるとさすがに面倒。 incrondはincrontabコマンドでcrontab風に書か…
http://auewe.hatenablog.com/entry/2014/04/14/213319 シェルスクリプトの平文パスワードをセキュアにする方法 これ良いですね。たいていの場合、sshの認証で鍵を作ってるだろうから 余計なファイル作らなくてもできるので手っ取り早いし。 ### encrypt $ o…
# ipmitool -v -I lanplus sol activate -H 192.168.0.1 -U user Running Get PICMG Properties my_addr 0x20, transit 0, target 0x20 Error Response 0xc1 from Get PICMG Properities No PICMG Extenstion discovered Info: SOL payload disabled # ipmit…
dmesg, messages にこれが出てるから仕様だと思って諦めてた。 NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory NFSD: starting 90-second grace period が、redhatに解決法書いてた。 https://access.redhat.com/solutions/428…
https://drbd.linbit.com/users-guide/s-throughput-tuning.html https://www.3ware.co.jp/archives/1655 version: drbd 8.4.6, drbd-utils 8.9.3 きっかけ 10Gbase-SR で接続してc-max-rate, rate で1000M, 300M (MByte/sec) などにしても実際の速度が80MBy…
https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-nfs.html http://nfs.sourceforge.net/nfs-howto/ar01s03.html http://www.turbolinux.co.jp/products/server/11s/user_guide/nfssetup.ht…
http://www.slideshare.net/moriwaka/red-hat-software-collections http://blog.co-mit.com/post/15/RedHat+Software+Collections%E3%81%AF%E7%B4%A0%E6%99%B4%E3%82%89%E3%81%97%E3%81%84 http://www.idcf.jp/blog/cloud/software-collections-for-centos-…
すぐ忘れる。ほんと忘れる。 https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Using_Yum_Variables.html /etc/yum/vars/ 以下にファイル作る。 ファイル名が変数名、中身が値 おまけ: rpmbuild のデフ…
http://qiita.com/takeshinoda@github/items/2dec7a72930ec1f658af http://stedolan.github.io/jq/download/ JSON 出力を食わせれば項目ごとに改行されて良い感じに表示したり、 grepのように特定の項目のみ表示したりできる。素敵。
http://supervisord.org/configuration.html daemontoolsみたいなもの?ざっと見たメモ supervisord が常駐 子プロセスとしてコマンドを実行/管理 コマンドはフォアグラウンドで実行 子プロセスが終了したら再度実行する 実行ユーザの指定、環境変数の設定等…
Linuxでネットワークの監視を行えるモニタリングコマンド20選 http://orebibou.com/2014/09/linux%E3%81%A7%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E3%81%AE%E7%9B%A3%E8%A6%96%E3%82%92%E8%A1%8C%E3%81%88%E3%82%8B%E3%83%A2%E3%83%8B%E3%…
参考 https://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP#Chrooted_SFTP-only_Accounts 設定があまり複雑でなくて、色々な落としどころ求めたらこうなった。利用するのはopenssh。 opensshのMatch User(Group)とChrootDirectoryを使えばいいけど、 openss…
https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/xfsquota.html uquota / ユーザquota gquota / グループquota pquota / プロジェクトquotalinuxの通常のquotaではディレクトリ単位の制限がで…
linuxのquotaってuid/gid 単位だからディレクトリ単位は無理じゃね?と思って調べた。 ddで空ファイルを作って、loopでmountする quotaを使用しないディレクトリ単位の容量制限 - とあるネットワーク管理者の苦悩d.hatena.ne.jpこれ簡単で楽チンですね。ddで…
Roundcube - Free and Open Source Webmail Software phpで動く mysql / pgsql / sqlite imap 対応 web上で動くimap対応clientなので、サーバ側は別途設定しとく必要あり(postfix/dovecotなど) メニューも日本語対応しててオープンソースの割になかなかよさ…