7.Solaris8のパッチとアプリケーションのインストール

最終更新2007年02月07日

 OS(SunOS)の各種設定を行えばとりあえずは使用することが出来ますが、
OSに付属のアプリケーションは古かったり、不具合(セキュリティホール)が有ったり
使えるものではありません。
当然OS自体にも不具合があったりします。
それらを解消するするために、patchを当てたり、アプリケーションをインストールします。
 

 まずは、OSにパッチを当ててセキュリティホールやバグを解消します。
http://jp.sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access
から、推奨Solarisパッチクラスタ(Recommended Patch)をダウンロードします。
使用しているOSのRecommended Patchを(今回の場合は[8 x86])を選択します。
これを当てることで、最新の状態になります。
インストール手順はドキュメントに書いてあります。

続いて、gnu系のツール類やアプリケーションをインストールします。
http://sunsite.tus.ac.jp/・・・残念ながら閉鎖になりました。
http://sunfreeware.com/
ftp://ftp.ring.gr.jp/pub/GNU/
などから、パッケージもしくはソースでダウンロードしてきてインストールします。
 
インストールしたもの、、、
 

gcc
make
gzip
glib
gtk+
cvs
m4
freetype
m4
libtool
X11R6
・上記サイトよりパッケージファイルをダウンロードしてきます。
 (xxx-sol8-intel-local.gz など)
・$ gzip -d xxx-sol8-intel-local.gzを実行します。
 (tarが掛かっている場合もあります)
・# pkgadd -d ./xxx-sol8-intel-localとrootで実行します。
次のパッケージを利用できます:
  1  XXX            xxxx
                   (intel) x.x

パッケージ (複数可) を選択してください (すべてのパッケージを
処理するには 'all' を入力してください)。 (default: all) [?,??,q]: 
・allと入力するか、そのままリターンキーを押せば自動でインストールが完了します。

 gccなど、makeが複雑なもなどはパッケージの方が楽です。
 makeの方法などが分からない場合は素直にpkgaddでインストールしましょう(笑)
 pkgaddは非常に簡単です。インストールのオプションは指定できませんが、configureやmakeの手間はないので、
 installの方法が分からなかったり、面倒な場合には最適です(笑)  

tcsh
http://www2.wbs.ne.jp/~znc/tcsh/
ftp://ftp.astron.com/pub/tcsh/
http://www.tcsh.org/
 
以前はpatchを当ててからconfigure -> make を行っていましたが、現在は必要ないようです。
 
tar
patch
libIDL
インストールは簡単です。
 
$ ./configure
$ make
# make install
 
これでインストール完了です。以外と、インストールも楽!?
 
less
http://www.greenwoodsoftware.com/less/
http://www.io.com/~kazushi/less/
 
$ zgip -d ./less-358-iso254.patch.gz
$ tar xzvf ./less-358.tar.gz
$ cd less-358
$ patch -p1 < ../less-358-iso254.patch.gz
$ configure
この後、Makefileを編集します。
LIBS = -lintl -lgen -lcurses -R/usr/lib
Makefile内の18行目を上記のように編集します。
その後、makeとinstallを行います。
% make
# make install
 
tcl
$ tar zxvf tcl8.3.2.tar.gz
$ cd tcl8.3.2/unix/
$ ./configure --enable-gcc --enable-64bit --enable-threads
% make
# make install
# ln /usr/local/bin/tclsh8.3 /usr/local/bin/tclsh
 
tk
$ tar zxvf tk8.3.2.tar.gz
$ cd tk8.3.2/unix
$ ./configure --enable-gcc --enable-threads --with-tcl=/usr/local/lib --enable-64bit --with-x
% make
# make install
# ln /usr/local/bin/wish8.3 /usr/local/bin/wish
 
top
http://www.groupsys.com/topinfo/
ftp://ftp.groupsys.com/pub/top/
 
$ tar zxvf top-3.5beta11.tar.gz
$ cd top-3.5beta11
$ ./Configure
 
この後は、質問方式でインストールが進んでいきます。
 
emacs
http://home.catv.ne.jp/pp/ginoue/software/emacs-xim/
http://www.ring.gr.jp/pub/GNU/emacs/
 
emacs本体とATOKをemacsで使用するためのpatchを入手します。
・emacs-20.7.tar.gz < emacs本体
・emacs20-xim-20000713.diff < xim-patchその1
・emacs20-xim-20000713.sol.diff < solaris追加patch
 
$ tar zxvf emacs-20.7.tar.gz
$ cd emacs-20.7
$ patch -p1 < ../emacs20-xim-20000713.diff
$ patch -p1 < ../emacs20-xim-20000713.sol.diff
$ ./configure --with-xim(ログ消失・・・オプション忘れました・・・)
% make
# make install
 
 
Acrobat Reader
ftp://ftp-pac.adobe.com/pub/adobe/acrobatreader/unix/4.x/
ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/4.x/
 
Acrobat Reader本体と日本語フォントを入手します。
・sunx86-ar-405.tar.gz < Acrobat Reader本体
・jpnfont.tar.gz < そ日本語フォント
 
インストールは指示に従うだけですので、省略・・・  
 
fly
 
http://p4room.mda.or.jp/fly/ja/
http://martin.gleeson.com/fly/installation.html
http://sunsite.tus.ac.jp/
ftp://ftp.uu.net/graphics/jpeg/
http://www.boutell.com/gd/http/
 
flyは直に画像を出力するツールです。CGIなどで画像を出力する際に便利です。
動作には、libpng、libtool、jpeg-6b、freetype、gdが必要です。
面倒なので、libtool、freetypeはパッケージでインストールしました。
・fly-2.0.0.tar.gz < fly本体
・libpng-1.2.5.tar.gz < libpng
・jpegsrc.v6b.tar.gz < jpeg-6b
・gd-2.0.22.tar.gz < gd
 
$ tar zxvf libpng-1.2.5.tar.gz
$ cd libpng-1.2.5
$ ln -s scripts/makefile.solaris Makefile
$ make
$ make test
# make install
 
$ tar zxvf jpegsrc.v6b.tar.gz
$ cd jpeg-6b/
$ ./configure --enable-shared
$ make test
# make install
 
$ tar zxvf gd-2.0.22.tar.gz
$ cd gd-2.0.22
$ ./configure
$ vi gdft.c(FT_ENCODING_MS_SYMBOL 関係の行を削除)
$ make
# make install
 
$ tar zxvf fly-2.0.0.tar.gz
$ cd fly-2.0.0
$ gcc -O -pedantic -Wall -I/usr/local -I/usr/local/include -L/usr/local -L/usr/local/lib -o fly fly.o -lgd -lm -lz -lttf -lpng -ljpeg
# cp fly /usr/local/bin
 
 
lha
http://www2m.biglobe.ne.jp/~dolphin/lha/prog/
 
・lha-114i.tar.gz < lha本体
 
$ tar zxvf lha-114i.tar.gz
$ cd lha-114i/
$ make
# cp src/lha /usr/local/bin
 
 
lha
http://www2m.biglobe.ne.jp/~dolphin/lha/prog/
 
・lha-114i.tar.gz < lha本体
 
$ tar zxvf lha-114i.tar.gz
$ cd lha-114i/
$ make
# cp src/lha /usr/local/bin
 
 
mozilla関連
http://www.mozilla-japan.org/
http://www.macromedia.com/downloads/
 
私は、FirefoxとThunderbirdを常用しています。
パッケージでダウンロードして使用します。
また、Flash-pluginもインストールしました。

しかし、使用していると標準出力に、エラーやワーニングが出て非常に目障りです。ビルト環境と使用環境が異なるために発生しているようです。
対策として、起動時に
$ /usr/local/firefox/firefox >& /dev/null
とします。  
 
TCP wrapper
http://sunfreeware.com/
 
上記サイトから tcp_wrappers_7.6-ipv6.1.tar.gz をダウンロードします。
 
$ tar zxvf tcp_wrappers_7.6-ipv6.1.tar.gz
$ cd tcp_wrappers_7.6-ipv6.1
$ make CC=gcc REAL_DAEMON_DIR=/usr/sbin sunos5 IPV6=-DHAVE_IPV6
# /usr/ucb/install -c -o root -g root -m 755 ./tcpd /usr/sbin/tcpd
# /usr/sbin/install -c /usr/local/bin -u root -g root -m 755 safe_finger
# /usr/sbin/install -c /usr/local/bin -u root -g root -m 755 tcpdchk
# /usr/sbin/install -c /usr/local/bin -u root -g root -m 755 tcpdmatch
# /usr/sbin/install -c /usr/local/bin -u root -g root -m 755 try-from
# /usr/sbin/install -c /usr/local/man/man3 -u bin -g bin -m 444 hosts_access.3
# /usr/sbin/install -c /usr/local/man/man5 -u bin -g bin -m 444 hosts_access.5
# /usr/sbin/install -c /usr/local/man/man5 -u bin -g bin -m 444 hosts_options.5
# /usr/sbin/install -c /usr/local/man/man8 -u bin -g bin -m 444 tcpd.8
# /usr/sbin/install -c /usr/local/man/man8 -u bin -g bin -m 444 tcpdchk.8
# /usr/sbin/install -c /usr/local/man/man8 -u bin -g bin -m 444 tcpdmatch.8
 
 インストールは上記のように手動で行います。
この後、/etc/inetd.conf を次のように変更します。
ftp stream tcp6 nowait root /usr/sbin/tcpd in.ftpd -ld
telnet stream tcp6 nowait root /usr/sbin/tcpd in.telnetd
なお、ここにはftpとtelnetの記述を記載しましたが、それ以外にも適用可能です。
inetd.confを変更後は、inetdの再起動をお忘れなく。
 
また、許可・拒否するホストを記述するファイルを、/etcの下に置きます。
拒否ホストファイルは、
ALL : ALL
とだけ書きます。これで、許可ホストファイルに書いてないホストは全て拒否となります、
許可ホストファイルは、
in.ftpd : .domain.or.jp
in.telnetd : .isp.ne.jp
ALL : 192.168.0.0/255.255.255.0
ALL : 127.0.0.1
とサービスごとに設定できます。
ローカルは全て許可したいので、ALLと書きます。
 

サーバートップへ
ホームページトップへ