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