*Install Log [#sa1956de] #contents ---- **Fedora Core 1 [#h054688f] -[[./FedoraCore1のインストール]] 参考リンク: -[[FrontPage - Fedora JP wiki:http://fedora.jp/wiki/]] -- Fedora JP Project -[[しだれざくらのLinuxざんまい:http://www.shidarezakura.com/]] -- Fedora Core Biginners MLもあり、ユーザが集まっている -[[FaqDistributionFedora - 2ch-Linux-Beginners:http://linux2ch.bbzone.net/index.php?FaqDistributionFedora]] -- 2ch Linux Beginners -[[FreeML ML情報ページ (VMware日本語メーリングリスト):http://www.freeml.com/ctrl/html/MLInfoForm/vmware-j@freeml.com]] -- VMwareのユーザによる日本語での情報交換 -[[Fedoraで自宅サーバー構築:http://fallenangels.zive.net/fedora/]] -- FC1/2でのサーバ構築情報 -[[@IT:Linux Tips Index:http://www.atmarkit.co.jp/flinux/rensai/linuxtips/tipsindex.html]] -- Linux関係のTips集 -http://ml.postgresql.jp/pipermail/pgsql-jp/2004-May/008177.html -- Postgre SQL での注意点(pgsql-jp ML) -[[(PHP-users 21049)Re phpのリコンパイル:http://ns1.php.gr.jp/pipermail/php-users/2004-March/021573.html]] -- PHPでの注意点(?)(PHP-users ML) -[[Berry Linux - Bootable CD Linux <Yui's Laboratory>:http://yui.mine.nu/linux/berry.html]] -- Fedora ベースの 1 CD Linux -[[PukiWiki - Fedora奮戦記:http://www.bjlug.org/pukiwiki/pukiwiki.php?%5B%5BFedora%CA%B3%C0%EF%B5%AD%5D%5D]] -- bjlugサイト内の情報 #urlbookmark(nodate,notitle) **RedHatでapt [#h3491390] RedHat Linuxでaptを利用した、パッケージの管理をするためのメモ。 [[→詳細>./RedHatでapt]] ***まえがき [#x9b02ec7] [[こちら:http://www.redhat.co.jp/software/old_products/]]によると、RedHatが7.2-8.0までを2003年末で、9.0を2004年3月末でサポート終了するため、 学内のRedHat Linuxのサーバのメンテをどうするか検討中。 ひとまず、RHNへのguest登録も期限が切れているので、aptによるパッケージの管理を導入し、テストすることにする。 APT(Advanced Package Tool)はDebianやVineではメジャーなパッケージ管理ツールなので、使い勝手もよい。 ***aptの入手とインストール [#p591f4ef] FRESH RPMS( http://freshrpms.net/apt/ )にアクセス。 RedHat LinuxのバージョンにあわせたRPMファイルをダウンロードする。 # wget http://ftp.freshrpms.net/pub/freshrpms/redhat/7.2/apt/apt-0.3.19cnc55-fr7.i386.rpm --16:22:41-- http://ftp.freshrpms.net/pub/freshrpms/redhat/7.2/apt/apt-0.3.19cnc55-fr7.i386.rpm => `apt-0.3.19cnc55-fr7.i386.rpm' ftp.freshrpms.net をDNSに問いあわせています... 完了しました。 ftp.freshrpms.net[193.1.219.82]:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 780,987 [audio/x-pn-realaudio-plugin] 100%[====================================>] 780,987 25.12K/s ETA 00:00 16:23:12 (25.12 KB/s) - `apt-0.3.19cnc55-fr7.i386.rpm' を保存しました [780987/780987] ダウンロードできたら、インストール。 # rpm -ivh apt-0.3.19cnc55-fr7.i386.rpm Preparing... ########################################### [100%] 1:apt ########################################### [100%] ***aptの設定 [#g312602f] 設定ファイルは/etc/apt/apt.confと/etc/apt/sources.listの2つだが、とくに変更しなくてもよい。 -apt.conf --aptの動作を設定 -sources.list --aptが利用するリポジトリの設定 aptを利用するには、パッケージの依存関係などを管理しているデータベースを入手・更新する必要がある。 入手したデータベースは、/var/state/apt/listsに保存される。 # apt-get update Get:1 http://apt.freshrpms.net redhat/7.2/en/i386/base/pkglist.os [1037kB] Get:2 http://apt.freshrpms.net redhat/7.2/en/i386 release.os [144B] Get:3 http://apt.freshrpms.net redhat/7.2/en/i386/base/pkglist.updates [616kB] Get:4 http://apt.freshrpms.net redhat/7.2/en/i386 release.updates [157B] Get:5 http://apt.freshrpms.net redhat/7.2/en/i386/base/pkglist.freshrpms [90.2kB] Get:6 http://apt.freshrpms.net redhat/7.2/en/i386 release.freshrpms [161B] Get:7 http://apt.freshrpms.net redhat/7.2/en/i386/base/srclist.os [141kB] Get:8 http://apt.freshrpms.net redhat/7.2/en/i386 release.os [144B] Get:9 http://apt.freshrpms.net redhat/7.2/en/i386/base/srclist.updates [50.6kB] Get:10 http://apt.freshrpms.net redhat/7.2/en/i386 release.updates [157B] Get:11 http://apt.freshrpms.net redhat/7.2/en/i386/base/srclist.freshrpms [23.2kB] Get:12 http://apt.freshrpms.net redhat/7.2/en/i386 release.freshrpms [161B] Ign http://apt.freshrpms.net redhat/7.2/en/i386/base/mirrors Ign http://apt.freshrpms.net redhat/7.2/en/i386/base/mirrors Fetched 1958kB in 1m50s (17.8kB/s) Processing File Dependencies... Done Reading Package Lists... Done Building Dependency Tree... Done ***aptの利用 [#p4976ee6] :パッケージのインストール| パッケージ名(apacheなど)を指定すれば、該当するパッケージとそれに依存するほかのパッケージを、リポジトリからダウンロードして、インストールする。 ダウンロードしたパッケージは、/var/cache/apt/archives/に保存される。 # apt-get install パッケージ名 :パッケージの削除| パッケージ名を指定して、削除する。設定ファイルも削除する場合は、「--purge」オプションをつける。 # apt-get remove パッケージ名 # apt-get --purge remove パッケージ名 :パッケージの検索| パッケージ名を検索すると、パッケージ名や説明文にキーワードを含むパッケージが検索できる。パッケージ名のみの検索の場合は、「--names-only」オプションをつける。 # apt-cache search パッケージ名 # apt-cache search --names-only パッケージ名 :パッケージの詳細情報| # apt-cache show apache :パッケージのアップデート| バグやセキュリティホールが修正されたパッケージにアップデートする。ただし、最新のデータベースが必要になるので、「# apt-get update」コマンドとセットで実行する。インストールは行なわずに、アップデートされるパッケージ名をチェックするには、「-s」オプションをつける。 # apt-get update # apt-get -s upgrade # apt-get upgrade :システムのアップデート| システム全体の依存関係を含めたアップデートをする。 # apt-get update # apt-get dist-upgrade :カーネルパッケージのアップデート| まず、カーネルパッケージの一覧をチェックする。 # apt-get install kernel Package kernel is a virtual package provided by: kernel#2.4.18-26.7.x 2.4.18-26.7.x kernel#2.4.18-26.7.x 2.4.18-26.7.x kernel#2.4.18-26.7.x 2.4.18-26.7.x kernel#2.4.18-19.7.x 2.4.18-19.7.x kernel#2.4.18-19.7.x 2.4.18-19.7.x kernel#2.4.18-19.7.x 2.4.18-19.7.x kernel#2.4.18-17.7.x 2.4.18-17.7.x kernel#2.4.18-17.7.x 2.4.18-17.7.x kernel#2.4.18-17.7.x 2.4.18-17.7.x kernel#2.4.9-34 2.4.9-34 kernel#2.4.9-34 2.4.9-34 kernel#2.4.9-34 2.4.9-34 kernel-smp#2.4.20-20.7 2.4.20-20.7 kernel-enterprise#2.4.9-34 2.4.9-34 kernel-debug 2.4.18-27.7.x kernel-bigmem 2.4.20-20.7 kernel-BOOT 2.4.20-20.7 kernel#2.4.20-20.7 2.4.20-20.7 kernel#2.4.20-20.7 2.4.20-20.7 kernel#2.4.20-20.7 2.4.20-20.7 kernel-smp#2.4.7-10 2.4.7-10 kernel-enterprise#2.4.7-10 2.4.7-10 kernel#2.4.7-10 2.4.7-10 kernel#2.4.7-10 2.4.7-10 kernel#2.4.7-10 2.4.7-10 You should explicitly select one to install. 一覧から、アップデートするカーネルパッケージを選び、インストールする。 ブートローダがliloの場合は、liloの設定が必要。 # apt-get install <カーネルパッケージ名> :パッケージのソースコードのダウンロード| root権限で、「-- download-only」オプションを付けずに実行すると、ソースコードが「/usr/src/redhat」ディレクトリに展開される。 # apt-get --download-only source パッケージ名 # apt-get source パッケージ名 ***参考リンク [#j7eb0da0] -freshrpms.net --http://apt.freshrpms.net/ -@IT:Red Hat LinuxでAPTを使うには --http://www.atmarkit.co.jp/flinux/rensai/linuxtips/446useapt.html -RPM/APTによるパッケージ管理(Vine Linux) --http://vinelinux.org/manuals/using_rpm.html -RedHat Linuxでaptコマンドを使おう --http://whzat.minidns.net/shoko2/apt/ -apt --http://www2h.biglobe.ne.jp/~hnakamur/technolab/linux/other/apt/apt.htm -redhatでaptを使おう --http://www.nurs.or.jp/~sugi/redhat-apt.htm **htaccess [#w5734dd3] インストールネタではないですが。。。 メモを[[こちら>./htaccess]]に。 **Debian GNU/Linux (woody) [#lf4daacd] -ややこしいので[[こちら>./Debian]]へ -VMware4.0にインストール中。メモは[[こちら>./Debian_on_VMware]]へ。 **PHP Acceralator (2003-10-09) [#c134a939] ***配布元 [#t659e4ea] -http://www.ioncube.jp/accelerator/(無料ユーザ登録が必要) -http://www.php-accelerator.co.uk/ ***作業&設定 [#w0f4e73e] [[こちら:http://netpro.hyperdyne.co.jp/html/modules/wfsection/article.php?articleid=20]]や [[こちら:http://www.dream-seed.com/linux/phpa.html]]や [[こちら:http://www.php-j.com/tutorial/php/phpA.php]]を参考に。 **Apache+openssl RedHat Linux 7.2 (2003-04-24) [#zf63b3e9] ***配布元 [#we748991] -[[RedHat:http://www.redhat.co.jp/]] -[[オフィシャルのカスタマイズガイド:http://www.jp.redhat.com/manual/Doc72/RH-DOCS/rhl-cg-ja-7.2/index.html]]を参照 ***設定 [#e0dc2c6e] >RedHat Linuxをインストール済みのサーバに、Private CAをたてて、証明書を発行 -鍵の作成 >インストール時の鍵と証明書を削除 # cd /etc/httpd/conf # rm ssl.key/server.key # rm ssl.crt/server.crt >一般的には次のようにして鍵を作成するが # make genkey >今回は、起動時にpass phraseを入力しなくてもいいようにするため、次のようにする # /usr/bin/openssl genrsa 1024 > /etc/httpd/conf/ssl.key/server.key # chmod go-rwx /etc/httpd/conf/ssl.key/server.key >ssl.key/server.keyが作成される -自己署名証明書の作成 >次を実行して、pass phraseを入力し、自己署名証明書を作成 # make testcert >途中の情報は、次のように入力 You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Hyogo Locality Name (eg, city) []:Kakogawa Organization Name (eg, company) [Internet Widgits Pty Ltd]:Hyogo University Organizational Unit Name (eg, section) []:ISC Common Name (eg, your name or your server's hostname) []:hoge.hoge.hyogo-dai.ac.jp Email Address []:isc@hyogo-dai.ac.jp >最後に、httpdを再起動 # /sbin/service httpd restart **Python [#i6245005] ***配布元 [#m146df62] -[[Python Language Website:http://www.python.org/]] -[[Python Japan User's Group:http://python.jp/Zope]] ***Python 2.2.2のインストール (2003-04-16) [#re7a7d1e] # tar zxf Python-2.2.2.tgz # cd Python-2.2.2 # sh ./configure --withoute-gcc # make # make test # make install ***Python 2.3.4のインストール (2004-06-14) [#c2a06758] gccでコンパイルできなかったので、Tru64のccでコンパイル # tar zxf Python-2.3.4.tgz # cd Python-2.3.4 # ./configure -with-dec-threads # make # make test # make install **Mailman [#j5fd6c21] メーリングリスト管理・運営パッケージ。 ***配布元 [#d1b30f82] -[[Mailman, the GNU Mailing List Manager:http://www.list.org/]] -[[Mailman, Japanese Home Page:http://mm.tkikuchi.net/]] ***Mailman 2.1.1+JP patch (2003-04-16) [#r4fe662a] -インストール準備 ***インストール記録 [#v2cbbf0c] -[[Mailman 2.1.1+JP patch>./Mailman2.1.1]] (2003-04-16) -[[Mailman 2.1.5+Mailman-2.1.5用修正パッチ>./Mailman2.1.5]] (2004-06-14) # groupadd -g 197 mailman # useradd -g 197 -d /usr/local/mailman -m -u 197 mailman # chmod a+rx,g+ws /usr/local/mailman -インストール # su mailman % tar zxf mailman-2.1.1.tgz % cd mailman-2.1.1 % patch -p0 < ../mailman-2.1.1+patch.20030214 % ./configure --with-mail-gid=nogroup --with-cgi-gid=nogroup --with-gcc=no % cd /usr/local/mailman % ./bin/check_perms % ./bin/check_perms -f (エラーが出なくなるまで) # cd mailman-2.1.1 # cp misc/mailman.jpg misc/PythonPowered.png misc/gnu-head-tiny.jpg /usr/local/apache/icons -Webサーバの設定 >/usr/local/apache/conf/http.confに追加して、Apacheをリスタート ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/" <Directory "/usr/local/mailman/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> Alias /pipermail/ "/usr/local/mailman/archives/public/" <Directory "/usr/local/mailman/archives/public"> Options Indexes FollowSymlinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> -Mailmanの設定 >~mailman/Mailman/mm_cfg.py に追加 IMAGE_LOGOS = '/images/' DEFAULT_SERVER_LANGUAGE = 'ja' -cronの設定 % cd ~mailman/cron % crontab crontab.in -サイト全体のメーリングリストを作成 % bin/newlist mailman >表示された内容にしたがって、/var/adm/sendmail/aliasesの設定をし、newaliasesを実行 ***カスタマイズ [#bebe92b5] -パスワードの設定 % ~mailman/bin/mmsitepass <your-site-password> -テスト用のメーリングリストの作成 % bin/newlist test-ml >できあがったら、aliasの登録をして、ブラウザで確認 ***Mailman 2.1.5+Mailman-2.1.5用修正パッチ (2004-06-14) [#r4fe662a] Mailmanを、 2.1.2から2.1.5へアップグレード。 -インストール準備 --http://www.list.org/からmailman-2.1.5.tar.gzをダウンロード --http://mm.tkikuchi.net/から修正パッチ(mailman-2.1.5+patch.20040516.gz)をダウンロードし、解凍 --起動しているプロセスを停止 # /sbin/rc3.d/S99mailman stop -インストール # su mailman % tar zxf mailman-2.1.5.tar.gz % cd mailman-2.1.5 % patch -p0 < ../mailman-2.1.5+patch.20040516 % ./configure --with-mail-gid=nogroup --with-cgi-gid=nogroup --with-gcc=no % make install 「make install」の最後に、現在のリストの書庫(データベース)を更新します。 % cd /usr/local/mailman % ./bin/check_perms % ./bin/check_perms -f (エラーが出なくなるまで) # cd mailman-2.1.5 # cp misc/mailman.jpg misc/PythonPowered.png misc/gnu-head-tiny.jpg /usr/local/apache/icons -サービス開始 # /sbin/rc3.d/S99mailman start **Squid [#v1f976f5] ***配布元 [#n58fd3ce] -[[Squid Web Proxy Cache:http://www.squid-cache.org/]] ***squid-2.5.STABLE5 (2004-06-21) [#a5f94fb0] ちょっと古いですが、2.4.STABLE6からのアップデート。 アップデートするときの注意点(というよりハマったところ)は、次のとおり。 -squidの実行ファイルが、'''PREFIX/bin'''から'''PREFIX/sbin'''になってる -ログファイルの作成先が、'''PREFIX/logs'''から'''PREFIX/var/logs'''になっている -設定ファイル'''squid.conf'''が、ちょこっと、変更されている(ややこしい。。。) -インストール % tar zxf squid-2.5.STABLE5.tar.gz % cd squid-2.5.STABLE5 % ./configure --prefix=/configure --prefix=/usr/local/squid --enable-snmp --enable-cachemgr-hostname --enable-default-err-language=Japanese % make all # make install # cp contrib/squid.rc /sbin/rc3.d/S99squid -設定ファイル(squid.conf) http_port 3128 icp_port 3130 cache_peer 親サーバ(not Squid) parent 8080 7 no-query cache_peer_domain 親サーバ(not Squid) !(親サーバを経由しないドメイン) acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY cache_mem 128 MB maximum_object_size 8192 KB cache_dir ufs /var/squid/cache 1600 16 256 cache_access_log /usr/local/squid/var/logs/access.log cache_log /usr/local/squid/var/logs/cache.log cache_store_log /usr/local/squid/var/logs/store.log pid_filename /usr/local/squid/logs/squid.pid # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS # ----------------------------------------------------------------------------- ftp_user ftpuser@hyogo-dai.ac.jp # OPTIONS FOR TUNING THE CACHE # ----------------------------------------------------------------------------- refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 # TIMEOUTS # ----------------------------------------------------------------------------- connect_timeout 6 minutes request_timeout 2 minutes client_lifetime 180 minutes # ACCESS CONTROLS # ----------------------------------------------------------------------------- acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl SSL_ports port 443 563 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 563 # https, snews acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT # 学内用のacl(省略) http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports # 学内用のaclへのアクセス許可(省略) http_access deny all http_reply_access allow all icp_access allow all cache_mgr hoge@hoge.hogehoge.jp cache_effective_user nobody cache_effective_group nobody visible_hostname hoge.hogehoge.jp logfile_rotate 1 append_domain .hyogo-dai.ac.jp icp_hit_stale on acl hoge-servers dstdomain .(親サーバを経由しないドメイン) acl all src 0.0.0.0/0.0.0.0 always_direct allow hoge-servers never_direct allow all coredump_dir /usr/local/squid/var/cache ie_refresh on |