!!!Linux NFSを構成する [Linux] !!必要なサービス ,サービス,内容 ,portmap,RPCのプログラム番号をTCP/IPのポート番号に変換 ,nfs,NFSサーバ ,nfslock,NFSのファイルロック ,rpcidmapd,ユーザ名とユーザIDをマッピングするNFSバージョン4のためのデーモン ,prcgssd,NFSバージョン4クライアント用セキュリティデーモン !!サービスの起動 !起動確認 # /sbin/service nfs status rpc.mountd は停止しています nfsd は停止しています rpc.rquotad は停止しています # /sbin/service nfslock status rpc.statd (pid 1222) を実行中... # /sbin/service portmap status portmap (pid 1201) を実行中... # /sbin/service rpcidmapd status rpc.idmapd (pid 1255) を実行中... !サーバー起動時に起動されるように # chkconfig --level 3 nfs on # chkconfig --level 5 nfs on # chkconfig --list | grep nfs nfs 0:off 1:off 2:off 3:on 4:off 5:on 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off !サービスを起動 portmap,nfs,nfslockの順に起動する # /sbin/service nfs start NFS サービスを起動中: [ OK ] NFS クォータを起動中: [ OK ] NFS デーモンを起動中: [ OK ] NFS mountd を起動中: [ OK ] !!ファイアウォールの設定 *NFS4にチェックし、2049ポートを開放する {{ref_image nfs_01.jpg}} !!/etx/exports の設定 ::公開ディレクトリの設定 *fsid=0オプションの師弟 # vi /etc/exports /home *(rw,sync,fsid=0) ::再読み込みと、公開ディレクトリの確認 # /sbin/service nfs reload # showmount -e localhost Export list for localhost: /home * !!マウント ::NFSバージョン4 *nfs4 を指定する */etc/exports で設定した /home ではなく / を指定する *NFSバージョン4では、公開されているディレクトリをひとつの仮想ファイルシステムとしてマウントする # mkdir /krishna_share # mount -t nfs4 192.168.24.14:/ /krishna_share/ !接続できた [root@ryujyu krishna_share]# ls -l 合計 8 drwx------ 11 nobody nobody 4096 2009-02-19 00:10 piroot drwx------ 3 nobody nobody 4096 2008-11-30 15:06 postgres !!ユーザ管理 {{category 編集中}}