非固定IPで独自ドメイン運用
 Yahooカテゴリ掲載 !!  Fedoracore5リリース!! 内容順次掲載予定

あなたは proxy経由かその他のOS / その他のブラウザ をお使いですね。
SINCE 2005/06/12
LAST UPDATE 2006/7/29
TOTAL ACCESS 1190574
YESTERDAY 00356
TODAY 00074
 

 

Home
install
after install
Apache
BIND
Postfix
dovecot
SMTP-AUTH
Squid
Webalizer
awstats
blog
Virtual IP
SSL + Virtual Domain
MHonArc + NAMAZU
VNC Server
DHCP
SSH
wsftp
SquirrelMail

 

・インストール後設定

【Yahoo!ショッピング】デジタル家電から白物家電まで魅力的な商品が満載

ログイン ユーザー名 
先ほど作ったシステムユーザー (fedora) でログイン
ログイン パスワード 
先ほど作ったシステムユーザー (fedora) のパスワード入力

ログインしたら "アプリケーション" → "システムツール" → "GNOME端末"
の順に進め、下の様な画面にして下さい。
[fedora@fedoracore4 ~]$su -    スーパーユーザーになるコマンド
password:    
rootのパスワードを入力
[root@fedoracore4 ~]$
  fedora@fedoracore4 → root@fedoracore4に変化した
グラフィックログインでは電源を切ることができたり不具合が多いのでテキストログインへ変更
[root@fedoracore4 ~]$vi /etc/inittab    vi /eで<Tabキー>を押し、続いてiniまで<Tab>を押してみると一致する3つが表示されるので、<t> <Tab>と押すと左記パスが出てきます。
入力ミスを防ぎ、楽に入力できるので<Tab>を有効に使って下さい。

# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:     
id:5→id:3 へ

# System initialization.
vi エディタ非常によく使います。
基本操作だけでもひとますはOKですのでこの機会に習得して下さい。
こちらのページはよくまとまっています。

5の左側までカーソルを持って行き、<x>で削除。
<i>で入力モードに切り替えて、"3"を入力。
<Esc>でコマンドモードに戻り、":wq" (保存して終了)
確認の為、<↑>を押すと直前のコマンド" vi /etc/inittab " が出るのでそのまま<ENTER>
id:5になっていればOK   そのまま ":q"で終了。
なにか迷えば<Esc> 保存せずそのまま閉じたい時は":q!"をまずは覚えて下さい。

これでテキストログインになりますので、コマンドで再起動してみましょう。
[root@fedoracore4 ~]$shutdown -r now

・rootになれるユーザーを限定

 

login:fedora
password:
[fedora@fedoracore4 ~]$ su -
password:
[root@fedoracore4 ~]$ vi /etc/group
mem:x:8:
kmem:x:9:
wheel:x:10:root,fedora      追加
mail:x:12:mail,postfix
news:x:13:news
[root@fedoracore4 ~]$ vi /etc/pam.d/su

#%PAM-1.0
auth sufficient /lib/security/$ISA/pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient /lib/security/$ISA/pam_wheel.so trust use_uid    #を削除
# Uncomment the following line to require a user to be in the "wheel" group.
auth required /lib/security/$ISA/pam_wheel.so use_uid
auth required /lib/security/$ISA/pam_stack.so service=system-auth
account required /lib/security/$ISA/pam_stack.so service=system-auth
password required /lib/security/$ISA/pam_stack.so service=system-auth
# pam_selinux.so close must be first session rule
session required /lib/security/$ISA/pam_selinux.so close
session required /lib/security/$ISA/pam_stack.so service=system-auth
# pam_selinux.so open and pam_xauth must be last two session rules
session required /lib/security/$ISA/pam_selinux.so open multiple
session optional /lib/security/$ISA/pam_xauth.so
[root@fedoracore4 ~]$ vi /etc/login.defs

# On RH systems, we do. This option is ORed with the -m flag on
# useradd command line.
#
CREATE_HOME yes

SU_WHEEL_ONLY yes    
最終行へ追記
[root@fedoracore4 ~]$ exit


[fedora@fedoracore4 ~]$ su -
password:

[root@fedoracore4 ~]$    fedoraからrootになれることを確認。
[root@fedoracore4 ~]$ useradd testuser    さらに別のユーザーを作成して確認します。
[root@fedoracore4 ~]$ passwd testuser    testuserのパスワードを設定
Changing password for user testuser.
New UNIX password:     
パスワード1回目入力
Retype new UNIX password:    パスワード2回目入力
passwd: all authentication tokens updated successfully.
[root@fedoracore4 ~]# exit


[fedora@fedoracore4 ~]$ exit
login:testuser
password:

[testuser@fedoracore4 ~]$ su -    fedoraからrootになれるか確認。
Password:
su: パスワードが違います
[testuser@fedoracore4 ~]$    
testuserからはrootになれないことを確認できました。

・外部からSSHでログインできるように設定

 

[root@fedoracore4 ~]$ chkconfig --list >> chkconfig_def.txt    自動起動するリストの初期値を保存
[root@fedoracore4 ~]$ cat chkcofig_def.txt |grep ssh
sshd 0:off 1:off 2:off 3:off 4:off 5:off 6:off    
sshは自動起動しない設定


[root@fedoracore4 ~]$ vi /etc/ssh/sshd_config

# RSAAuthentication yes
# PasswordAuthentication yes

# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
#Protocol 2,1    # ,1削除  より安全なssh2のみ許可
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
ForwardX11Trusted yes


[root@fedoracore4 ~]$ /etc/init.d/sshd start 
ssh起動
sshd を起動中:
[ OK ]
[root@fedoracore4 ~]$ chkconfig sshd on    
ssh自動起動設定
[root@fedoracore4 ~]$ chkconfig --list sshd
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off    ssh自動起動確認 ランレベル2〜5がonならOK

Poderosa を使って外部からログイン

まずはMicrosoft .NET Framework & Poderosa をダウンロードしてインストール。                                                                  

Last login: Sat Jun 18 10:34:20 2005
[fedora@fedoracore4 ~]# su -
[root@fedoracore4 ~]#
    rootになれることを確認。
[root@fedoracore4 ~]# exit    exitでfedoraに。
[fedora@fedoracore4 ~]$ exit    さらにexitでTeraTarm終了。

詳細はSSH編をご覧下さい。

 

 

SELinuxを無効にする

インストール時に有効にしておくとアクセス制御情報の割り当てがなされるため、有効にしていましたが制御が複雑すぎるため一旦無効にします。

                                                               
Last login: Sat Jun 18 10:40:10 2005
[fedora@fedoracore4 ~]# su -
[root@fedoracore4 ~]# vi /etc/sysconfig/selinux

# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
#SELINUX=enforcing    #でコメントアウト
SELINUX=disabled    追記
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

[root@fedoracore4 ~]# shutdown -r now    再起動でSELinuxを無効化

 

Apache設定へ



Linux Users Ring

[ 自宅サーバーWebRing |ID=280 前後5表示乱移動サイト一覧 ]

Copyright (c) 2005 - Fedoracore4.com - All rights reserved