mount_nfs 192.168.0.146:/data /mnt

*** ssh [#d99b7b5e]
 cd $HOME
 mkdir .ssh
 cd .ssh
 cp /mnt/src/authorized_keys ./
 cp /mnt/src/id_dsa ./
 cd ../
 chown -R root .ssh
 chmod 700 .ssh
 chmod 600 .ssh/*
 
-key と id の作成方法は [[ssh-keygen>FreeBSD/ssh-keygen]] に。

-rootでssh出来るようにするにはipfで外部からを塞いで
 cd  /etc/ssh
 cp  sshd_config  sshd_config.orig
 sed s/'#PermitRootLogin no'/'PermitRootLogin yes'/ < sshd_config.orig >  sshd_config
 diff sshd_config sshd_config.orig

 


*** hosts [#x17c16fa]
 cp /etc/hosts /etc/hosts.orig
 cat /mnt/src/hosts.txt >> /etc/hosts
-example ==> /etc/hosts <==
 ::1                     localhost localhost.zenno.net
 127.0.0.1               localhost localhost.zenno.net
 192.168.0.160           kenji.zenno.net kenji
 192.168.0.160           kenji.zenno.net.
 #--- host.txt ---
 192.168.0.135           www
 192.168.0.136           www2
 ...
 ..
 .

*** resolv.conf [#y99b6890]
 cp /etc/resolv.conf /etc/resolv.conf.orig
 cp /mnt/src/resolv.conf /etc/resolv.conf
-example ==> /etc/resolv.conf <==
 domain  zenno.net
 nameserver      210.196.3.183
 nameserver      210.141.112.163
*** hosts.allow [#de314bea]
 mv /etc/hosts.allow /etc/hosts.allow.orig
 echo 'ALL : 127.0.0.1 : allow' >> /etc/hosts.allow
 echo 'ALL : 192.168. : allow' >> /etc/hosts.allow
 echo 'ALL : 125.53.25.128/255.255.255.192 : allow' >> /etc/hosts.allow
 echo 'ALL : ALL : deny' >> /etc/hosts.allow

*** inetd [#dc3ffe8b]
 cp /etc/rc.conf /etc/rc.conf.orig
 echo 'inetd_enable="YES"' >> /etc/rc.conf
 patch -p0 < /mnt/src/inetd.patch
 patch -p0 < /mnt/src/rsh.patch
 cp /mnt/src/rhosts.txt  /root/.rhosts

*** loader [#s8ea7315]
 echo 'hint.atkbd.0.flags="0x1"' >> /boot/loader.conf
 echo 'autoboot_delay="2"' >> /boot/loader.conf

*** ntp [#d0b25852]
 echo 'ntpd_enable="YES"' >> /etc/rc.conf
 
 vi /etc/ntp.conf
 #server 0.freebsd.pool.ntp.org iburst
 #server 1.freebsd.pool.ntp.org iburst
 #server 2.freebsd.pool.ntp.org iburst
 #server 3.freebsd.pool.ntp.org iburst
 server ntp.jst.mfeed.ad.jp iburst

*** ifconfig [#t8d0f064]
 
 cat /etc/rc.conf
 
 hostname="mem.zenno.net"
 keymap="jp.106.kbd"
 ifconfig_rl0="inet 192.168.0.120 netmask 255.255.255.0"
 defaultrouter="192.168.0.140"
 sshd_enable="YES"
 inetd_enable="YES"
 ntpd_enable="YES"


zfs snap -r zroot@02
----
[[FreeBSD/インストール9.3]]

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS