アーカイブ

‘Solaris’ カテゴリーのアーカイブ

sendmail から postfix へ

2009 年 6 月 23 日

実は、wordpressに投稿すると管理者当てに、投稿がありましたよメールが届くはずなのですが、なぜか通知が来ておりません。そこで、

Solaris 10のSendmailを削除し、postfixに移行始めました。

Global zone でsendmail を pkgrmした後、postfixを gmake ; gmake install しました。

まずは、Global zoneで。

# pkgadd -d pkg-get.pkg
# vi /opt/csw/etc/pkg-get.conf
url=ftp://ftp.math.purdue.edu/mirrors/opencsw.org/unstable
# pkg-get -U
# pkg-get -i pcre

# gmake makefiles CC=gcc
# gmake

# groupadd postfix
# groupadd postdrop
# useradd -g postfix postfix

# gmake install

# vi /etc/postfix/main.cf
# vi /etc/init.d/postfix

—– /etc/init.d/postfix —–
#!/sbin/sh

PID=`/usr/bin/ps -aef | /usr/bin/grep postfix | /usr/bin/grep master | /usr/bin/grep -v grep | /usr/bin/awk ‘{print $2}’`

case “$1″ in
’start’)
if [ -f /usr/sbin/postfix ]; then
if [ $PID ]; then
echo “Postfix has started”
else
/usr/sbin/postfix start
echo “Running: Postfix”
fi
fi
;;

’stop’)
if [ $PID ]; then
/usr/sbin/postfix stop
echo “Stopping: Postfix”
else
echo “Postfix has stopped”
fi
;;

‘reload’)
/usr/sbin/postfix reload
;;

‘abort’)
/usr/sbin/postfix abort
;;

‘flush’)
/usr/sbin/postfix flush
;;

’status’)
if [ $PID ]; then
echo “Postfix starts”
else
echo “Postfix stopped”
fi
;;

*)
echo “Usage: $0 {start|stop|reload|abort|flush|status}”
exit 1
;;

esac
exit 0
—– /etc/init.d/postfix —–

# /etc/init.d/postfix start

これで送信してくれるだろうか?

ん〜 どこが悪いんだろう、まだ投稿ありましたメールが届きません。

困った・・・

taizho Solaris, Via-Logs

若狭 と webserver7 + php5.2.9

2009 年 5 月 26 日

四苦八苦しました・・・(汗

かなりの大汗です。

Sun純正のphppackがphp5.2.0というものですが、バージョンは良いとして gdが入ってないので、困り果ててました。

dsc_1170

ちゃんとUPできるし、サムネイルも作ってくれました。

結局、webserver を入れ直して php5をmakeしました。

やはり先人のmhitさんはすごいっす!

1人で1から構築なんて絶対無理です。

とはいえ、この2週間ほどでSolarisの癖が掴めてきたような気がしてます。

さて、ここからが本題

表題の「若狭」の件です。

先週 日曜日 子達を海に連れて行きたかったので行ってきました。

場所は下の地図のとおりですが、僕が行きたかった場所になかなかたどり着けませんでした。というのも、行きたかったという場所は、僕が小学生の頃に行った海です。ものすごく頼りない記憶を再生しながら なんとかたどり着けました。自宅を出たのは、午前11時前後 到着したのが午後3時くらい・・・延々とドライブしてたわけですが、久しぶりのドライブですっかりお疲れモードでした。

写真を撮る気力も萎えてしまって 結局 載せられそうなのは2枚くらい・・・惨敗です。

dsc_1187

最後は簡単に設定方法を記録しておく。

webserver7のインストール

すべてデフォルトで。高速インストール。

php5 configure

まずphp5をmakeする前に、cswに入れておくもの。freetype , gd , libexif あと autoconf , automake あたりかな?

./configure –prefix=/opt/php5 –enable-force-cgi-redirect –with-gettext –with-zlib –with-gd=/opt/csw –with-mysql=/opt/mysql5.0 –enable-zend-multibyte –with-nsapi=/opt/webserver7 –enable-mbstring –enable-exif –with-freetype-dir=/opt/csw –with-jpeg-dir=/opt/csw –with-png-dir=/opt/csw –with-zlib-dir=/opt/csw –with-xpm-dir=/opt/csw –enable-ftp

php5のgmake;gmake test;gmake install

php5のインストール後、

webserver7/https-xxxx/config/mine.types

type=magnus-internal/x-httpd-php                 exts=php

webserver7/https-www/config/magnus.conf

Init fn=”load-modules” shlib=”/opt/webserver7/bin/libphp5.so” funcs=”php5_init,php5_close,php5_execute”
Init fn=”php5_init” errorString=”PHP Totally Blew Up!”

webserver7/https-www/config/xxxx-obj.conf

PathCheck fn=”find-index” index-names=”index.html,home.html,index.jsp,index.php”
ObjectType fn=”type-j2ee”
ObjectType fn=”type-by-extension”
ObjectType fn=”force-type” type=”text/plain”
ObjectType fn=”force-type” type=”magnus-internal/x-httpd-php”
Service method=”(GET|HEAD)” type=”magnus-internal/directory” fn=”index-common”
Service method=”(GET|HEAD|POST)” type=”*~magnus-internal/*” fn=”send-file”
Service method=”TRACE” fn=”service-trace”
Service fn=”php5_execute” type=”magnus-internal/x-httpd-php”
Error fn=”error-j2ee”

こんな感じで。

webserver をリスタート。phpinfoの確認後、インスタンスを適用し、再起動する。

taizho Photo, Solaris, Via-Logs, 日記とか

webserver 7 update5

2009 年 5 月 23 日

www zoneを作成後、webserver 7 update5をインストールしてみる。

単純にインストール先を、

/opt/webserver7

としてインストール。

https://server:8989/で管理画面

taizho Solaris

保護中: via – opends

2009 年 5 月 23 日
コメントを読むにはパスワードを入力してください

この投稿はパスワードで保護されています。表示するにはパスワードを入力してください:


taizho Solaris

solaris 10 update7 その2

2009 年 5 月 16 日

今日の昼 注文していたメモリが到着したので、早速 RAIDBOXに取付、動作確認を行った。

全く問題なく、1024MB認識してくれた。

これで、Raidboxを設置してのテスト&設定が可能になりました。

さて、新VIA鯖を落とすわけですが、

# touch /reconfigure
# init 6

で落とします。

すべてのACケーブルを抜き、RAIDBOXを新VIA鯖に接続します。

さて電源ONにし、BIOSでRAIDBOXが認識されていることを確認して、login: まで出ました。

ブラウザを起動し、server:6789にアクセス。

しかしデバイスが見えません。

どうしたことでしょう。

さっぱり原因がわかりません。dmesgでみると、なんとmptが無いんですねー。

PCI-E SCSI HBAなわけで、LSI Logic LSI20320IEというやつです。

仕方なく、ドライバをgetしてインストールしてみます。

# wget http://www.lsi.com/DistributionSystem/AssetDocument/itmpt_x86_5.07.04.zip
# unzip itmpt_x86_5.07.04.zip
# uncompress itmpt-x86-XXX.tar.Z
# tar -xvf itmpt-x86-XXX.tar
# cd install
# pkgadd -d .
# touch /reconfigure
# init 6

でドライバをインストールして、再起動しました。dmesg mpt1として認識しているのを確認できたので、server:6789でzfsに追加しようとしたが、まだデバイスが出てこないんです。

# format

でみるとちゃんとc5t1d0であるんですよ。ますます訳がわからない。

このままではどうしようもないので、

# zpool create raidbox c5t1d0

で作成し、zfs adminで確認すると今度はちゃんとraidboxというzpoolが見えました。

現在はzpool-raidboxがちゃんと利用できるので問題ありませんが、接続後にzfs-adminから見えないのが解せませんね。が深く追求はしません。そのうちpatchがでる?

さて、ここまで来れば、zone用のzfs filesystemを作成し、この時点でzfs-adminを使うのが面倒になってきましたw

# zfs create raidbox/zones/via

たったこのコマンドを発行するのに、わざわざブラウザを立ち上げるのもなんですなー・・・
でも、しばらくしたら忘れちゃうんです :sad:

zoneを配置するfilesystemができあがったので、via-zoneをサクッと作成し、nfs export と auto_homeの設定です。 auto_masterは今回とくに変更する箇所はありません。

nfs server側

# share
# zfs get sharenfs rpool/export/home/
# zfs set sharenfs=on rpool/export/home
# zfs get sharenfs rpool/export/home/
# share
-               /export/home/user   rw   “”
-               /export/home   rw   “”

nfs client

# cat /etc/auto_home
+auto_home
user nfs-serer:/export/home/user

今日はここまで。本環境にするかまだ迷ってますが、現在のところまずまずの進捗具合です。

taizho Solaris