
参考URL:http://centossrv.com/postfix-targrey.shtmlこれは防備録の為の記入です。サーバーは仮であり、本運用はしていませんし、本運用で別のサーバーが動いているので、スパムのチェックが出来ておりません。現在は運用中です
yumdownloaderがあるyum-utilsをインストール
# yum -y install yum-utils
インストールされていた。
次はpostfixのソースのダウンロード
# yumdownloader --source postfix
ありゃりゃ、ソースは無いって。じゃあどこにある? 下記にあった
# wget http://vault.centos.org/6.2/os/Source/SPackages/postfix-2.6.6-2.2.el6_1.src.rpm
上記はXOOPSが勝手にリンクを張り途中から文字色が変わっている、本来は全部緑。
この後もwgetの後ろの色が変化しているのは同じ理由。
前はなかったが、今は6.5にもある。但し、標準でインストールされるバージョンは 2.6.6-6.el6_5だがソースは少し古い 2.6.6-2.2.el6_1 です
今では2.6.6-6のsrc.rpmもある。場所:http://vault.centos.org/6.6/os/Source/SPackages/postfix-2.6.6-6.el6_5.src.rpm
但し、どちらのバージョンもソースRPMをインストール後、作成される物は postfix-2.6.6.tar.gzと同じでサイズやタイムスタンプも同じですので、どちらのソースでもお好きな方を使って下さい。
# wget http://vault.centos.org/6.5/os/Source/SPackages/postfix-2.6.6-2.2.el6_1.src.rpm
ソースをインストール
# rpm -ivh postfix-2.6.6-2.2.el6_1.src.rpm
警告: グループ mockbuild は存在しません - root を使用します
と警告が出るが無視
ソースの展開先へ移動
# cd rpmbuild/SOURCES/ (VER 6.4 はrpm/SOURCES)
tar.gzの展開とDIRの移動
# tar zxvf postfix-2.6.6.tar.gz
# cd postfix-2.6.6
スリープパッチをダウンロード
# wget http://k2net.hakuba.jp/pub/postfix-2.3.3-sleep.patch
以前見たWEBにcentosのpostfixはパッチが当たっていて、標準のpostfixとは違っていると書いてたので、ダウンロードしたパッチと比較してたら、やはりパッチを当てる位置が違っていたので、/root/rpmbuild/SOURCES/postfix-2.6.6/postfix-2.3.3-sleep.patchの修正。(VER 6.4 はrpmbuildではなく rpm )
--- postfix-2.6.6/src/smtpd/smtpd_check.c 2006-11-07 15:29:24.000000000 +0900 ←最初の2行を修正
+++ postfix-2.6.6.new/src/smtpd/smtpd_check.c 2012-10-06 15:25:52.000000000 +0900
@@ -203,6 +203,7 @@ ←11行目 @@ -204,6 +204,7 @@から修正
@@ -3543,6 +3544,7 @@ ←11行目 @@ -3428,6 +3429,7 @@から修正
@@ -3638,8 +3640,35 @@ ←19行目 @@ -3523,8 +3525,35 @@から修正
(修正済のパッチのダウンロードはここをクリック)
パッチを当てて、DIRの移動
# patch -p1 < postfix-2.3.3-sleep.patch
# cd ..
Postfixソース再アーカイブ
# rm -f postfix-2.6.6.tar.gz && tar czvf postfix-2.6.6.tar.gz postfix-2.6.6
DIRの削除
# rm -rf postfix-2.6.6/
DIRを移り、rpm作成
# cd
本当はrpmbuildはrootでやってはいけないのが常識のようだが(理由はここを参照)、少し面倒なのでrootで慎重に作業をする。
# rpmbuild -bb --clean --define "dist .`echo postfix-*.src.rpm |awk -F. '{print $(NF-2)}'`" /root/rpmbuild/SPECS/postfix.spec
ありゃいっぱい足りない (VER 6.4 はrpmbuildではなく rpm )
db4-devel, zlib-devel, openldap-devel, cyrus-sasl-devel pcre-devel, mysql-devel, openssl-devel なのでこれらをyumでインストールする
# yum install db4-devel zlib-devel openldap-devel cyrus-sasl-devel pcre-devel mysql-devel openssl-devel
再度挑戦
# rpmbuild -bb --clean --define "dist .`echo postfix-*.src.rpm |awk -F. '{print $(NF-2)}'`" /root/rpmbuild//SPECS/postfix.spec
出来たpostfixをインストール
# rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/postfix-2.6.6-2.2.el6_1.x86_64.rpm (VER 6.4 はrpmbuildではなく rpm ) 2013/2/23 訂正
後始末
# rm -f rpmbuild/RPMS/x86_64/postfix-* (VER 6.4 はrpmbuildではなく rpm )
# rpmbuild --rmsource --rmspec /root/rpmbuild/SPECS/postfix.spec (VER 6.4 で最後の所は /root/rpm/SPECS/postfix.spec )
# rm -f postfix-2.6.6-2.2.el6_1.src.rpm
Postgreyインストール
# wget http://pkgs.repoforge.org/postgrey/postgrey-1.34-1.rf.src.rpm
SRPMの展開
# rpm -ivh --nomd5 postgrey-1.34-1.rf.src.rpm
警告: グループ dag は存在しません - root を使用します
警告は無視し、DIRを移動 これ以降VER6.4ではrpmbuild の所は rpmに読み替えてください
# cd rpmbuild/SOURCES/
Postgreyソース展開し、DIRを移動
# tar zxvf postgrey-1.34.tar.gz
# cd postgrey-1.34
targreyパッチダウンロード
# wget http://k2net.hakuba.jp/pub/targrey-0.31-postgrey-1.34.patch
パッチを当て、DIRの移動
# patch -p0 < targrey-0.31-postgrey-1.34.patch
# cd ..
Postgreyソース再アーカイブ
# rm -f postgrey-1.34.tar.gz && tar czvf postgrey-1.34.tar.gz postgrey-1.34
パッチを当てたので、ソースに使ったDIRを消し、DIRを移動し、RPMを作る
# rm -rf postgrey-1.34
# cd
# rpmbuild -bb --clean --define "dist .`echo postgrey-*.src.rpm |awk -F. '{print $(NF-2)}'`" /root/rpmbuild/SPECS/postgrey.spec
Postgrey依存パッケージインストール
# yum -y install postgrey && rpm -e postgrey
postgreyのインストール
# rpm -Uvh rpmbuild/RPMS/noarch/postgrey-1.34-1.rf.noarch.rpm
エラー: 依存性の欠如: perl(Parse::Syslog) は postgrey-1.34-1.rf.noarch に必要とされています
とエラーが出た。Parse::Syslogのインストールは
# wget apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/perl-Parse-Syslog-1.10-1.el6.rf.noarch.rpm
# rpm -ivh perl-Parse-Syslog-1.10-1.el6.rf.noarch.rpm
警告: perl-Parse-Syslog-1.10-1.el6.rf.noarch.rpm: ヘッダ V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
と警告は出るがインストールされる。
別のホストでやったら、依存性の欠如もっと出た
perl(BerkeleyDB) は postgrey-1.34-1.rf.noarch に必要とされています
perl(IO::Multiplex) は postgrey-1.34-1.rf.noarch に必要とされています
perl(Net::DNS) は postgrey-1.34-1.rf.noarch に必要とされています
perl(Net::Server) は postgrey-1.34-1.rf.noarch に必要とされています
perl(Net::Server::Daemonize) は postgrey-1.34-1.rf.noarch に必要とされています
perl(Net::Server::Multiplex) は postgrey-1.34-1.rf.noarch に必要とされています
perl(Parse::Syslog) は postgrey-1.34-1.rf.noarch に必要とされています
再度postgreyのインストール
# rpm -Uvh rpmbuild/RPMS/noarch/postgrey-1.34-1.rf.noarch.rpm
後始末
# rm -rf rpmbuild/SOURCES/*
# rm -f rpmbuild/RPMS/noarch/*
# rm -f postgrey-1.34-1.rf.src.rpm
# rm -f perl-Parse-Syslog-1.10-1.el6.rf.noarch.rpm
/etc/postfix/main.cfの設定
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
−−追加(ここから)−−
check_recipient_access hash:$config_directory/whitelist_recipient
check_client_access hash:$config_directory/whitelist_client
check_client_access regexp:$config_directory/permit_client_nots25r
check_policy_service inet:60000
permit
smtpd_data_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
check_recipient_access hash:$config_directory/whitelist_recipient
check_client_access hash:$config_directory/whitelist_client
check_client_access regexp:$config_directory/permit_client_nots25r
check_policy_service inet:60000
permit
−−追加(ここまで)−−
taRgrey用Postfix設定ファイルダウンロード
# wget http://k2net.hakuba.jp/spam/postfix.conf.2.tar.gz
解凍
# tar zxvf postfix.conf.2.tar.gz
各ファイルをコピー
# cp postfix.conf.2/whitelist_recipient /etc/postfix/
# cp postfix.conf.2/whitelist_client /etc/postfix/
# cp postfix.conf.2/permit_client_nots25r /etc/postfix/
# rm -fr postfix.conf.2/
# rm -f postfix.conf.2.tar.gz
whitelist_recipientのDB化
# postmap /etc/postfix/whitelist_recipient
whitelist_clientのDB化
# postmap /etc/postfix/whitelist_client
/etc/rc.d/init.d/postgreyの設定
#OPTIONS="--unix=$SOCKET" ←コメントアウト
OPTIONS="--dbdir=$DBPATH --inet=127.0.0.1:60000 --tarpit=125 --targrey --retry-count=2 --delay=3600" ←追記
postgreyの起動、postfix再起動など
# service postgrey start
# chkconfig postgrey on
# service postfix restart
その後メールのテストをする
postfixにパッチを当てているため、自動アップデートを無効にする。
# yum -y install yum-versionlock
# sed -i 's/enabled = 0/enabled = 1/g' /etc/yum/pluginconf.d/versionlock.conf
# touch /etc/yum/pluginconf.d/versionlock.list
# rpm -q postfix >> /etc/yum/pluginconf.d/versionlock.list
# rpm -q postgrey >> /etc/yum/pluginconf.d/versionlock.list
/etc/cron.daily/yum-check-updateの作成
#!/bin/bash
# versionlockパッケージアップデートチェックスクリプト
YUMTMP=$(mktemp)
for pkg in `cat /etc/yum/pluginconf.d/versionlock.list`
do
chkname="$chkname `rpm -qi $pkg|grep Name|awk '{print $3}'`"
done
yum --noplugins check-update $chkname > $YUMTMP
[ $? -eq 100 ] && cat $YUMTMP
rm -f $YUMTMP
# chmod +x /etc/cron.daily/yum-check-update
アップデート検知時はroot宛にメール通知されるので、最新版で再インストールする

ここはhttp://centossrv.com/postfix-clamav-spamassassin.shtmlを参考にして設定した
amavisd.confの場所は /etc/amavisd/amavisd.conf に移動していた。
また、$QUARANTINEDIRなど、一部の設定の右辺が変更になっていたが、コメントアウトするから関係ない。
今日事情があってインストールし直したら、amavisd.confの場所は /etc/amavisd.conf に戻っていた。現在のバージョンは 2.6.32-358.2.1.el6.x86_64 でこれは多分 version 6.4 だと思うけど、そのせいかなー。今となっては不明。又、/usr/lib/perl5/vendor_perl/5.8.8/Archive/Tar.pm の場所は /usr/share/perl5/Archive/Tar.pm に変更になっていた。

参考URL:http://centossrv.com/postfix-virtualdomain.shtml
バーチャルドメインとして172club.net を追加する。
/etc/postfix/virtual の最初に下記を追記
172club.net anything
@172club.net @kinryokai.net
Postfixバーチャルドメイン設定反映
# postmap /etc/postfix/virtual
/etc/postfix/main.cf の設定変更、下記を最後に追記
virtual_maps = hash:/etc/postfix/virtual
Postfix再起動
# service postfix restart
このサブホストの親ホストで簡易DNSとしてdnsmasqが動いているので、親ホストの /etc/hostsに172club.netを追記
192.168.xxx.xxx mail.kinryokai.net mail.172club.net mail
親ホストでdnsmasqを再起動
# service dnsmasq restart
メールソフトでバーチャルドメインのメールをテスト。この状態ではメイルサーバーが動いているlinuxのユーザーが両ドメインに属することになる。(例:test@kinryokai.netとtest@172club.netは同じユーザーである)
gnomeのディスクトップの下にあるパネル(windowで言うタスクバー)を間違って消してまった。最初はこの事をgnomeでは何と言うか解からず、やっとパネルと呼ぶことが解かった。そう下に表示されているパネルを間違って削除してしまっていた.と言うことでその追加方法。
1:上のパネルの空いている所で、右クリックし、新しいパネル(N)を選ぶ。下にパネルが追加されたが、その他の場所ならドラッグして移せる。
2:出来たパネルの空きスペースで右クリック後、パネルへ追加(A)...を選び、必要な物を選んでいく。
A:デフォルトで一番左に表示されるディスクトップ表示は、"ディスクトップの表示"
B:その右は、"ウィンドウ一覧"
C:一番右は、"ごみ箱"
D:その左は、"ワークスペース切替器"
位置をずらしたい時は、そこを右クリックで移動を選び、マウスを動かし、左クリックするとその場所で固定される。
このホストはxenでバーチャルホストを組んでいるが、ドメイン0のネットワークが再起動後、使えなくなった。サブドメインにはwebサーバーがあるが、こちらは問題無く外部からアクセス出来る。dom0のみ問題がある。
gatewayにpingをIPアドレスで打つがunreachableになる。早速原因を考える。
1:ネットワークケーブルに問題がある → サブドメインは継っているので、ケーブルはOK
2:IPアドレスがあるか? → 固定IPの設定だし、ifconfigで見てもIPアドレスは設定されている
3:ルーターに問題がある → これもサブドメインはOKだから問題ない
4:DNSに問題がある → IPを指定してpingを打っているので、DNS関連では無い
5:GATEWAYが設定されていない → routeで調べて問題が無い(今回調べているときにdefault gatewayの表示が出るのがかなり遅かった。どこに書いてあったか失念したが、geatewayのホスト名を登録すると早くなるそうな。早速 /etc/hosts に gatewayであるルーターに名前を付けた(192.168.xx.xx Router))
6:firewallで拒否されている → 調べたが問題ない
問題ないじゃん!でも継らない!!
ログ(/var/log/messages)を見ると、received packet with own address as source address と大量に記録されていた。そのヒントが
http://www.asahi-net.or.jp/~aa4t-nngk/xen.htmlのdom0環境の確認にあった。
早速、設定ファイル(/etc/sysconfig/network-scripts/ifcfg-eth0)に
MACADDR=00:24:8C:xx:xx:xx
と追記し、(HWADDRでないことに注意)
# service network restart
とするとOKになった.後で判ったが、ifconfigでeth0のMACアドレスが 本来のネットワークICの物で無いといけないのにFE:FF:FF:FF:FF:FFになっていた。
dmesgで調べていたら
eth0: RTL8168b/8111b at 0xffffc2000003a000, fe:ff:ff:ff:ff:ff, XID 18000000 IRQ 254
が有った。これが原因でMACがおかしかったみたい。又,RTL8168bがNICのICでMACの指定が fe:ff:....。でも何で fe:...になるかは不明。

参考URL:http://www.server-world.info/query?os=CentOS_6&p=mail&f=4
SSLの証明書をhttp://www.server-world.info/query?os=CentOS_6&p=sslを参考にして設定をします。
/etc/postfix/main.cfの変更、最後に下記を追記
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/server.crt 注:最後のcrtの"t"が抜けていました。2013/3/23
smtpd_tls_key_file = /etc/pki/tls/certs/server.key
smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache
/etc/postfix/master.cf の設定。下記の3行のコメントを解除
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
私はlinuxにアカウントを持っている人はその同じパスワードをメールのパスワードにするため一番下の -o smtpd sasl_auth... のコメントを外しています。
/etc/dovecot/conf.d/10-ssl.confの変更
ssl = yes →コメントの解除
ssl_cert = </etc/pki/tls/certs/server.crt →右辺の変更
ssl_key = </etc/pki/tls/certs/server.key →右辺の変更
psostfix,dovecot の再起動
# service postfix restart
# service dovecot restart
私はメールプログラムとして、thunderbird を使っていますが、その設定で少し迷ったので、その設定値を記入しておく。
サーバー設定の受信はIMAPを使用し、ポートは993、セキュリティ設定の接続の保護は"SSL/TLS"、認証方式は"通常のパスワード認証”
SMTPサーバはポート:465、接続の保護は"SSL/TLS"、認証方式は"通常のパスワード認証”、ユーザ名はOSにログイン出来るユーザ名
とした。

2012年10月2日全面的に書き直し。参考URL
postfix:http://www.server-world.info/query?os=CentOS_6&p=mail&f=1
dovecot:http://www.server-world.info/query?os=CentOS_6&p=mail&f=2
方針はとりあえずOSのユーザをメアドにし、パスワードはOSと同じ、SMTP Authにする。
postfixはインストールされているので、まずは /etc/postfix/main.cfの設定から
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.kinryokai.net
mydomain = kinryokai.net
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
header_checks = regexp:/etc/postfix/header_checks
smtpd_banner = $myhostname ESMTP unknown
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
# size=50MB
message_size_limit = 52428800
# mailbox=1GB
mailbox_size_limit = 1073741824
私は最後のmailbox_size_limitの設定を指定しなかったのでエラーに悩ませれた。これは指定をしないと5120000になっておりmessage_size_limitより小さいのでエラーになっていた。postfixの設定値を調べるには
# postconf →全ての設定値の表示
# postconf -n →デフォルトより変更したもの
エラーが出たらログを調べるという鉄則を忘れ、悩みつづけた自分がいやになった。ちゃんと /var/log/maillog に fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit と書いてある。
2013/02/23追記:今日 mailbox_size_limit = 10737418240 つまり10GBにしたら、Logにfatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limitと出た。何で?? 多分postfix自体が何かの制限をかけていて10GBのmailboxを受けてけていないと思う。後日調べて見よう。9GBまではOK
mynetworksは設定しなくてもpostconfで調べるとこのサーバーのネットワークレンジが設定してあった。多分postfix自信が調べてくれているのだろう。
/etc/postfix/header_checksの最初に下記を追記。これはアドレスなしのメールを拒否する設定。
/^From:.*<#.*@.*>/ REJECT
/^Return-Path:.*<#.*@.*>/ REJECT
SMTP-Auth設定
# service saslauthd start
# chkconfig saslauthd on
postfixの再スタート (centos 6 はデフォルトでposifixが走っている)
# /etc/rc.d/init.d/postfix restart
dovecotのインストールと設定
# yum -y install dovecot
/etc/dovecot/dovecot.confは変更しないので、/etc/dovecot/conf.d/10-auth.conf の設定
disable_plaintext_auth = no →コメントを外しnoに変更:プレーンテキストも受ける
auth_mechanisms = plain login →loginを追記
/etc/dovecot/conf.d/10-mail.conf の設定
mail_location = maildir:~/Maildir →コメントを外し、右辺を追記
/etc/dovecot/conf.d/10-master.confの設定
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth { →コメントを外す
mode = 0666 →コメントを外す
user = postfix →追記
group = postfix →追記
}
dovecotのスタート
# /etc/rc.d/init.d/dovecot start
# chkconfig dovecot on
fierewallの設定を変更して使用するポートを開ける。
私は SMTP:25, SMTPS:465, POP3:110, POP3S:995, IMAP:143, IMAPS:993を開けることにした。
ここでメールソフトthunderbirdでサーバーの設定をしてテスト。thunderbirdの設定は
受信にはpop3でなく、IMAPを使う設定
受信サーバー名:設定したサーバー名
port: 143
ユーザ名: OSに登録しているユーザー名(ドメインは入れない事)
パスワード:OSに登録しているユーザーのパスワード
接続の保護:なし
認証方式:平文
送信(SMTP)サーバー
受信サーバー名:設定したサーバー名
port:25
接続の保護:なし
認証方式:平文
ユーザ名: OSに登録しているユーザー名(ドメインは入れない事)
このサーバーはkvmでサブホストを作っている。親ホストでdnsmasqが簡易DNSサーバーとして動いているので、その親OS上にthunderbirdを使用してメールソフトを設定し、親ホストの /etc/hosts にメールサーバーの設定を書き(192.168.xxx.xx mail.kinryokai.net mail)dnsmasqをリスタートしてthunderbirdがある親ホストでmial.kinryokai.netでメールサーバーが走っているホストを参照出きるようにした。物理的に別のサーバー(仮想化ソフトはXEN)があり、現在、使用中のメールサーバーがあるので、外部とのテストは出来ない。どなたかテストするいいアイデアがあれば教えて下さい。

VSFTPの設定
ここは先生であるhttp://centossrv.com/vsftpd.shtmllに従い設置をします。特に違う所はありません。次にポートを開けます。/root/iptable.shを
# 外部からのTCP21番ポート(FTP)へのアクセスを日本からのみ許可
# ※FTPサーバーを公開する場合のみ
iptables -A INPUT -p tcp --dport 21 -j ACCEPT_COUNTRY
# sh iptables.sh
で変更を有効にしますが、時間が掛かります。
又、前にも触れましたが、phpからmysqlを操作する為に php-mysql が必要ですので、yumからインストールします。次にデフォルトのphpではアップロード出来るファイルが小さすぎますので、/etc/php.ini を
post_max_size = 50M
upload_max_filesize = 50M
date.timezone = Asia/Tokyo
にして50Mバイトまで出来るようにしました。(ついでにtime zoneの設定も入れて置いた.)
そしてFTPかNFSで現用のホスト(XENのdomU)からデーターをコピーしてきます。
WEBのデーター、cgiのDIR、iconもDIR、mysqlのデーターDIR等は前に触れたように全部デフォルトからは変更し、コピーがやり易くなっています。
その際、FTP等に必用なユーザーの設定がこのテスト用のサブホストに無い可能性があり、その場合はユーザーを作るなり、DIRのパーミッションを変更し、つじつまを合わせて下さい。
折角ですからXOOPSのバージョンを上げます。現在は 2.0.16a を使っていますが、2.2系は移行が大変ですので、JPEX系(http://www.xoops-ri.jp/modules/download/)から持ってきます。
ダウンロード後、解凍し出来たDIRのreadme.txtに従って作業すれば問題ありません。私は一度テーマをデフォルトに変更し、アップグレード後に使用しているテーマに戻しました。XOOPSのWEBがvirtualhostで4つ動いていますが、一つのみで、全てのモジュールのアップデート時に”メインメニューファイルへの書き込みに失敗しました”とエラーが出ていましたが、そのまま進み、後日、再度アップデートを試みるとエラーは出ませんでした。
私の場合はmysqlのデーターがutf8で入っており、utf8への変換も面倒なので、各XOOPSのincludeの下に ini_settings.php という名前で
<?php
/**
;Example: If your database character is EUC-JP, it should be utf8.
;Example: If your database character is UTF-8, it should be utf8.
;charcode=utf8
*/
charcode=utf8
?>
保存します。これで各WEBにアクセスすればOKな筈。

新しいページを作りましたのでここを参照してください

mysqlサーバーをインストールします。
# yum -y install mysql-server
mysqlの設定をしますが ( /etc/my.cnf )、私の場合はWEBサーバーのデーターをmysqlにしまってありますが、その移行をスムーズにする為に、デフォルトとは違うdatadirを指定します
[mysqld]
datadir=/webdata/mysql ← 右辺を変更
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
サーバーを起動し、再起動後も有効に
# service mysqld start
# chkconfig mysqld on
私の場合はmysqlのデーターを、現在アクティブなWEBからコピーしたので、パスワードの設定等は既に入っていますが、デフォルトではその設定が必要です。
http://centossrv.com/mysql.shtmlを参考に進めて下さい。
あと、XOOPSで必要になるphp-mysqlもインストールする。
# yum install php-mysql