2010-04-20 Tue

milter-greylist を SPF を有効でビルドする はてぶ

CentOS 5.4 上で.

SPF の判定をしたいので,libspf2 をインストールし,
libspf2 を有効にしてビルド.

$ wegt http://www.city-fan.org/ftp/contrib/libraries/libspf2-1.2.9-2.rhel5.x86_64.rpm http://www.city-fan.org/ftp/contrib/libraries/libspf2-devel-1.2.9-2.rhel5.x86_64.rpm
$ sudo rpm -Uvh libspf2-1.2.9-2.rhel5.x86_64.rpm libspf2-devel-1.2.9-2.rhel5.x86_64.rpm
$ wget -nd ftp://ftp.espci.fr/pub/milter-greylist/milter-greylist-4.3.7.tgz
$ rpm -ti milter-greylist-4.3.7.tgz
$ rpmbuild -tp milter-greylist-4.3.7.tgz
$ vim /path/to/SPECS/milter-greylist.spec    # spf を有効にする
$ rpmbuild -ba /path/to/SPECS/milter-greylist.spec


spec file は以下の %define 行の 0 を 1 に変更.

%define libspf2 0
%{?build_libspf2:%define libspf2 1}


2010-04-19 Mon

CentOS に daemontools をインストールしてみた はてぶ

とりあえず,以下のような感じで.

$  wget -nd http://www.qmailtoaster.com/download/stable/daemontools-toaster-0.76-1.3.6.src.rpm
$ rpmbuild --rebuild daemontools-toaster-0.76-1.3.6.src.rpm
$ rpm -Uvh daemontools-toaster-0.76-1.3.6.x86_64.rpm
$ wget -nd http://www.emaillab.org/djb/daemontools/svscan
$ sudo mv svscan /etc/init.d/
$ sudo chmod +x /etc/init.d/svscan
$ sudo /sbin/chkconfig --add svscan
$ sudo /sbin/chkconfig svscan on


管理対象は /service 以下.
- /service/service名/run: service の起動 script
- /service/service名/log/run: service の log 設定 script

- http://cr.yp.to/daemontools.html
- daemontools HOW-TO (α版)
  http://www.emaillab.org/djb/daemontools/daemontools-howto.html

2010-03-24 Wed

LVM - 既存の VG に新規 PV を追加する はてぶ

VMware で作ってる環境の HDD が足りなくなってきたので追加.

今回は仮想 HDD を追加して PV(物理ボリューム) を作り,
それを既存の VG(ボリュームグループ)に追加する.

まず,VMware 側で HDD の追加.
VM を起動して,追加した HDD を確認.

以下,VM 上での操作(一応,シングルユーザモードで).

1. パーティションの作成

今回追加するデバイスは /dev/sdb なので,

fdisk /dev/sdb


で /dev/sdb1 をパーティション ID 8e (Linux LVM) で作成.

2. PV(物理ボリューム)の作成

pvcreate /dev/sdb1


3. 作成した PV を既存の VG に追加

vgextend vg_name /dev/sdb1


VG の名前は vgdisplay で確認できる.
また,PV が追加されたかは vgdisplay で Free PE / Size あたりを確認

4. リサイズ

LV(論理ボリューム)とファイルシステムのリサイズ.
今回は 40GB (39.99GB) の追加.

lvresize -L+39.99GB /dev/vg_name/lv_root
resize2fs /dev/vg_name/lv_root


今回,ファイルシステムは ext4 なので,resize2fs でオンラインリサイズ.
resize2fs はサイズを指定しなければ,パーティションサイズにリサイズ.

2010-03-21 Sun

64bit な Linux の Firefox で Flash Player を使う はてぶ

メモし忘れてた.

$ wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
$ tar zxvf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
$ mkdir -p ~/.mozilla/plugins
$ mv libflashplayer.so ~/.mozilla/plugins


- Adobe Labs - Downloads: Flash Player 10 for 64-bit Linux
  http://labs.adobe.com/downloads/flashplayer10_64bit.html

2010-02-10 Wed

synergy を Linux で使う はてぶ

デスクトップを Windows から Linux に移行中ということで,
Linux に synergy の設定.

Linux 側を synergy server として使うので,
synergys コマンドを使う.

synergys -c ConfigFile


のように設定をコマンドに渡せるので,
~/.synergys というファイルを以下の内容で用意.

section: screens
synergy-server:
synergy-client:
end

section: links
synergy-server:
	left = synergy-client
synergy-client:
	right = synergy-server
end


で,設定確認."-f" オプションをつけて foreground で実行.

synergys -c ~/.synergys -f


あと,synergy は port:24800 を使うので,ファイアウォールの設定を変更する必要がある.

Referrer (Inside):
[2010-04-19-1] QSynergy

2009-12-07 Mon

ciopsfs - case insensitive on purpose file system はてぶ

知らなかったのでメモ.

ciopfs is a stackable or overlay linux userspace file system (implemented with fuse) which mounts a normal directory on a regular file system in case insensitive fashion.

ciopfs || case insensitive on purpose file system


via: Linux でファイル名の大文字小文字を同一視する - 酒日記 はてな支店
     http://d.hatena.ne.jp/sfujiwara/20091204/1259913024

2009-11-13 Fri

Go を CentOS にインストールしてみた はてぶ

Google からプログラミング言語『Go』がリリースされたので,
インストールしてみました.

基本的に,
新プログラミング言語「Go」をCentOSにインストールしてみた « zaru blog
に記載されている通りです.

違いは以下.
- bison のインストール
- Mercurial を rpmforge からインストール
- GOARCH を amd64 に
- go-mode の設定(Emacs)

[ Read More... ]

Referrer (Inside):
[2009-11-21-1] go-mode

2009-11-05 Thu

Cent0S 5.4 にアップデート はてぶ

CentOS 5.4 が出てしばらくたったので,
自宅の CentOS 5.3 を 5.4 にアップデートしました.

といっても,
http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.4
に書かれているように

yum clean all
yum update glibc\*
yum update yum\* rpm\* python\*
yum clean all
yum update
shutdown -r now


しただけ.

- CentOS 5.2 から 5.3 へアップデート [2009-04-05-6]

2009-10-16 Fri

monit で MyDNS を監視 はてぶ

とりあえず,以下のような感じで監視は可能

/etc/monit.d/mydns.conf

check process mydns with pidfile /var/run/mydns.pid
    start program = "/etc/init.d/mydns start"
    stop program = "/etc/init.d/mydns stop"
    if failed port 53 type udp then restart
    if 5 restarts within 5 cycles then timeout


port を監視しているだけなので,port は開いているけど,
反応が返ってこないという場合が考えられるので,いまいち.

調べたら,monit は DNS のプロトコルを理解できるようなので,
以下のように,protocol を指定.

check process mydns with pidfile /var/run/mydns.pid
    start program = "/etc/init.d/mydns start"
    stop program = "/etc/init.d/mydns stop"
    if failed port 53 use type udp protocol dns then restart
    if 5 restarts within 5 cycles then timeout


これだと,

[JST Oct 16 16:54:35] error    : 'mydns' failed protocol test [DNS] at INET[localhost:53] via UDP


という風に,エラーが出る.

DNS protocol test は BIND 以外だめらしい.

- Monit
  http://mmonit.com/monit/
- monit を使ってみた [2009-10-16-1]

2009-10-16 Fri

monit を使ってみた はてぶ

メモしていなかった…….
ちょっと試してみただけなので,たいした内容でもないけど.

monit は daemon の死活を監視して,死んでいた場合には再起動してくれる daemon です.

rpmforge に rpm があるので,それを利用してインストールします.

とりあえず,動かすには
/etc/monit.conf

set daemon 120                  # 監視間隔
set logfile /var/log/monit.log  # ログの出力先.syslog も可能.
set mailserver mx.ftnk.jp       # alert の通知に使うメールサーバ
include /etc/monit.d/*.conf


くらいを設定して,/etc/monit.d/ 以下に監視対象ごとの設定ファイルを置きます.

/etc/monit.d/httpd.conf(httpd の監視)

check process httpd with pidfile /var/run/httpd.pid
   start program = "/etc/init.d/httpd start" with timeout 60 seconds
   stop program  = "/etc/init.d/httpd stop"
   if failed host www.ftnk.jp port 80 protocol http and request "/" then restart


/etc/monit.d/postfix.conf(postfix の監視)

check process postfix with pidfile /var/spool/postfix/pid/master.pid
   start program = "/etc/init.d/postfix start"
   stop  program = "/etc/init.d/postfix stop"
   if failed port 25 protocol smtp then restart


monit が理解できる protocol は man に書かれている.

APACHE-STATUS
DNS
DWP
FTP
HTTP
IMAP
CLAMAV
LDAP2
LDAP3
LMTP
MYSQL
NNTP
NTP3
POP
POSTFIX-POLICY
RDATE
RSYNC
SIP
SMTP
SSH
TNS
PGSQL


ssl のサポートを付けてコンパイルすると,以下のプロトコルにも対応.

HTTPS
FTPS
POPS
IMAPS


- Monit
  http://mmonit.com/monit/

Referrer (Inside):
[2009-10-16-2] monit で MyDNS を監視

2009-08-07 Fri

Momonga Linux 6 を CentOS 5.3 上のXen 環境にインストール はてぶ

しました.

Emacs 23 になって,今まで使っていた ~/.emacs.el だと,
C-x C-f が使えなくなってしまった.

~/.emacs.el の設定を削ったら,C-x C-f が使えたけど,
どの設定が原因かまでは追っていない.

設定はしてあるけど,使っていないものとかあるので,
その辺を整理しつつ原因を特定する方向で.

あと,家の Linux は Puppet で管理していないので,
必要なパッケージのインストールや設定がちょっと面倒臭かった.

あと,自分で作った rpm は yum リポジトリを作っておかないと.

Referrer (Inside):
[2009-09-20-4] Emacs 23 で hilight-completion が使えない

2009-08-05 Wed

Momonga Project のアカウントできた はてぶ

ということで,Momonga Project の皆さん,よろしくお願いいたします.

これで milter manager を Momonga Linux に入れられる.

2009-07-27 Mon

Momonga Linux 6 リリース はてぶ

ベータをインストールする間もなく,
Momonga Linux 6 がリリースされました.

とりあえず,VMware にインストールしてみた.

特にパッケージを選択しないと,いろいろと入りすぎてしまうので,
パッケージを絞ってインストールしなおしてみる.

2009-07-16 Thu

cobbler はてぶ

知らなかったのでメモ.

- cobbler - Trac
  https://fedorahosted.org/cobbler/

Linux のネットワークインストールを簡単にしてくれるそう.
PXE boot,tftp,dhcp,kickstart 等の管理.

某所のサーバは仮想化環境に移行して,
ベースとなる仮想環境をコピー → Puppet という方向で進めているので,
使うことはなさそう.

via: 【第2回】サーバスペックの向上を実現するために~paperboy&co. 宮下 剛輔~:企画特集 - CNET Japan
     http://japan.cnet.com/extra/paperboy_0907/story/0,3800098768,20394957,00.htm

関連
- Cobbler - mizzy.org - Trac
  http://trac.mizzy.org/public/wiki/Cobbler

2009-07-13 Mon

Momonga Linux 6 beta1 リリース はてぶ

- [Momonga-devel.ja:03856] Momonga Linux 6 beta1 リリース
  http://www.momonga-linux.org/archive/Momonga-devel.ja/msg03855.html

とりあえず,週末にはインストールする方向で.

ref.
- Momonga Linux 5 リリース[2008-10-10-1]

2009-07-10 Fri

Pound いじり はてぶ

http://www.apsis.ch/pound/

reverse proxy 兼 laod balancer の Pound をいじってみたのでメモ.
(読みはポンド?パウンド?)

WHAT POUND IS:
1. a reverse-proxy: it passes requests from client browsers to one or more back-end servers.
2. a load balancer: it will distribute the requests from the client browsers among several back-end servers, while keeping session information.
3. an SSL wrapper: Pound will decrypt HTTPS requests from client browsers and pass them as plain HTTP to the back-end servers.
4. an HTTP/HTTPS sanitizer: Pound will verify requests for correctness and accept only well-formed ones.
5. a fail over-server: should a back-end server fail, Pound will take note of the fact and stop passing requests to it until it recovers.
6. a request redirector: requests may be distributed among servers according to the requested URL.

install

yum --enablerepo=rpmforge install pound


単純な設定(/etc/pound.cfg)

User        "nobody"
Group       "nobody"
Alive       60

## Main listening ports
ListenHTTP
    Address 192.168.74.101
    Port    10080
    Client  20
End

# 振分け設定
Service
    BackEnd
        Address 192.168.74.101
        Port    80
        Priority 5
    End
    BackEnd
        Address 192.168.74.102
        Port    80
        Priority 5
    End
    Session
        Type    Cookie            # Cookie でセッション管理
        ID      "session_id"      # session_id の値をみる
        TTL     300
    End
End


待受 IP アドレス・ポートの組み合わせで振分け先を変更するには
ListenHTTP 内に Service を定義する.
ListenHTTP は複数指定可能.

ListenHTTP
    Address 192.168.74.101
    Port    10080
    Client  20

    Service
        BackEnd
            Address 192.168.74.101
            Port    80
            Priority 5
        End
    End
End


セッション管理は
クライアント IP アドレス

    Session
        Type    IP
        TTL     300
    End


Cookie

    Session
        Type    Cookie
        ID      "session_id"
        TTL     300
    End


URL parameter (http://example.com/?id=xxxx)

    Session
        Type    URL
        ID      "id"
        TTL     300
    End


HTTP parameter (http://example.com/:parameter)

    Session
        Type    PARM
        TTL     300
    End


などでセッション管理が可能.

設定は簡単だし,扱いやすいかもしれない.

- Apsis Gmbh
  http://www.apsis.ch/pound/

2009-07-04 Sat

Momonga Project への参加が承認されました はてぶ

Momonga Linux を開発している Momonga Project への参加が承認されました.
登録手続きはまだですが,よろしくお願いいたします.

- Momonga Linux
  http://www.momonga-linux.org/

Referrer (Inside):
[2009-07-04-2] milter manager 1.1.1

2009-06-25 Thu

Xen の Domain-U がゾンビに はてぶ

Xen 上で動かしている Momonga を再起動しようとしたところ,
なかなか再起動しない.

xm list して確認すると Zombie-Momonga という Domain-U が.

何これ?ってことでググってみると,以下のサイトに対処がのっていた.

- Domain-U のゾンビ - BitWalker
  http://d.hatena.ne.jp/bitwalker/20090509/1244887179

で,以下のようにして復帰.

/etc/init.d/xendomains stop
rm /var/lib/xen/save/Zombie-Momonga
/etc/init.d/xendomains start


2009-05-26 Tue

CentOS に drbd をインストールする はてぶ

とりあえず,インストールだけ.

kernel のバージョンに合ったパッケージがなかったので,ソースからビルド.
make で rpm を作ってくれるので,それを利用.

wget -nd http://oss.linbit.com/drbd/8.3/drbd-8.3.1.tar.gz
tar jxvf drbd-8.3.1.tar.gz
cd drbd-8.3.1
make rpm
sudo rpm -Uvh dist/RPMS/i386/drbd*


- DRBD:What is DRBD
  http://www.drbd.org/

2009-05-22 Fri

古い procmail の扱える最大ファイルサイズは 2 GB はてぶ

某メールサーバの Mailer Daemon からのメールが多いと思ったら,
/var/spool/mail/bar のサイズが 2GB になっていた.

- レッドハット | オープンソース・カンパニー
  http://www.jp.redhat.com/support/errata/RHBA/RHBA-2007-0706J.html
によると

procmailが、32ビットアーキテクチャ上で、2 GBを超えるサイズのメールボックスにメールを配信できませんでした。
とある.

問題のあった環境は,

# cat /etc/issue
Red Hat Enterprise Linux ES release 3 (Taroon)
Kernel \r on an \m

# rpm -q procmail
procmail-3.22-9


RHEL で eratta がでたのが 2007 年.
procmail-3.22-9 は 2003 年のもの.

ChangeLog 最新ページ / カテゴリ最新ページ / 前ページ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 / page 2 (16)