Windows2000でcoLinux(fedora5)を動かす(2) ネットワーク設定〜環境設定

まずは何より日本語キーボード設定に

  /etc/sysconfig/keyboard

KEYBOARDTYPE="pc"
KEYTABLE="jp106"

  ※ 変更後、coLinux再起動

時刻設定

  デフォルトでは日本時間の設定ではないようで、date コマンドで修正しても再起動後にはまた変わって(戻って)しまう。その対応。

# cp /usr/share/zoneinfo/Japan /etc/localtime

ネットワーク設定

IPアドレス設定

  /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
#BOOTPROTO=dhcp
IPADDR=192.168.0.2
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
GATEWAY=192.168.0.1

  ※ 変更後、/etc/init.d/nework restart で変更反映

hosts設定

  /etc/hosts

127.0.0.1    localhost localhost.localdomain localhost
192.168.0.2   coLinux
192.168.0.1   win2k

Windows2000でcoLinux(fedora5)を動かす(3) ssh、samba、apacheインストール

sshサーバ インストール … Putty、WinSCP3 を使用するため

インストール

# yum -y install openssh-server

設定ファイル (/etc/ssh/ssd_config)

PermitRootLogin no  # rootログインを不可に

アクセス制限(ホストである Windows機とlocalhostのみ許可)

  /etc/hosts.deny

ALL:ALL

  /etc/hosts.allow

sshd:192.168.0.1
ALL:127.0.0.1

サービス起動 & 自動起動

# /etc/init.d/ssh start
# chkconfig ssh on

Puttyログインエラー対応

  Puttyによるログイン時に以下のエラーが出る件の対応

Server refused to allocate pty

  /etc/udev/makedev.d/50-udev.nodes に以下を追記

tty0
ptmx

  ※ 変更後、coLinux再起動
  ※ 参考:http://silver-arrow.g.hatena.ne.jp/silver_arrow/20060828/1156757218

sambaインストール

 参照:http://d.hatena.ne.jp/ragtarou/20070227

apache(httpd)インストール

インストール

# yum -y install httpd

設定ファイル (アクセス制限、CGI有効)

  /etc/httpd/conf/httpd.conf

ServerTokens ProductOnly  # レスポンスヘッダの情報隠蔽
ServerSignature Off       # エラーページ表示時の情報隠蔽
ServerName 192.168.0.2

  Options Includes ExecCGI FollowSymLinks   # SSI,CGIを有効、Index表示無効
  Order deny,allow
  Deny from All
  Allow from localhost 127.0.0.1 192.168.0.2 192.168.0.1


  Options MultiViews   # Index表示無効
  AllowOverride None
  Order deny,allow
  Deny from all
  Allow from localhost 127.0.0.1 192.168.0.1


  AllowOverride None
  Options None
  Order deny,allow
  Deny from all
  Allow from localhost 127.0.0.1 192.168.0.1


  AllowOverride None
  Options IncludesNoExec
  AddOutputFilter Includes html
  AddHandler type-map var
  Order deny,allow
  Deny from all
  Allow from localhost 127.0.0.1 192.168.0.1
  LanguagePriority jp en es de fr
  ForceLanguagePriority Prefer Fallback

AddHandler cgi-script .cgi .pl

サービス起動 & 自動起動

# /etc/init.d/httpd start
# chkconfig httpd on

その他のアプリケーション

# yum -y install screen traceroute links nkf patch