1)まず手動では
openbsdで PXEサーバーをたちあげて openbsdを インストール
internet
|
sis0
openbsd PXE server
ne3 :192.168.11.1
|
|
PC ( openbsd will be installed)
# cat /etc/hostname.ne3
inet 192.168.11.1 255.255.255.0
# cat /etc/dhcpd.interfaces
ne3
# cat /etc/dhcpd.conf
option domain-name "example.com";
option domain-name-servers 8.8.8.8;
subnet 192.168.11.0 netmask 255.255.255.0 {
option routers 192.168.11.1;
filename "pxeboot";
range 192.168.11.30 192.168.11.31;
default-lease-time 86400;
max-lease-time 90000;
}
# ./comment-out.bat /etc/rc.conf.local
dhcpd_flags="" #NO # for normal use: ""
ntpd_flags="" #NO # for normal use: ""
# ls -l /tftpboot/
total 13860
-rw-r--r-- 1 root wheel 6987854 Apr 30 01:21 bsd.rd
drwxr-xr-x 2 root wheel 512 Apr 30 09:04 etc
-rw-r--r-- 1 root wheel 81108 Apr 30 01:04 pxeboot
# cat /tftpboot/etc/boot.conf
#tty com0 19200
#set tty com0
boot tftp:/bsd.rd
/etc/httpd.conf
ext_addr="192.168.11.1"
server "www.intranet.com" {
listen on $ext_addr port 80
root "/htdocs/5.7"
}
ls /var/www/htdocs/pub/5.7
INSTALL.i386 base57.tgz bsd.rd
index.txt
xbase57.tgz xshare57.tgz
SHA256 bsd comp57.tgz man57.tgz xfont57.tgz
SHA256.sig bsd.mp game57.tgz pxeboot xserv57.tgz
tftpd /tftpboot
でPXEサーバーが動く
もし httpdではなくて nginx の場合は
cat /etc/nginx/nginx.conf
worker_processes 1;
worker_rlimit_nofile 1024;
events {
worker_connections 800;
}
http {
include mime.types;
default_type application/octet-stream;
index index.html index.htm;
keepalive_timeout 65;
server_tokens off;
server {
listen 80;
listen [::]:80;
server_name 192.168.11.1;
root /var/www/htdocs;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/htdocs;
}
}
}
1-1)dnsmasqをつかって
/etc/dnsmasq.conf
--------------------- listen-address=127.0.0.1
listen-address=192.168.11.1
interface=fxp0
dhcp-range=192.168.11.10,192.168.11.12,12h
dhcp-boot=pxeboot
enable-tftp
tftp-root=/tftpboot
/etc/hosts
127.0.0.1 localhost
::1 localhost
192.168.11.1 01.net
192.168.11.1 02.net
/etc/nginx/nginx.conf
worker_processes 1;
worker_rlimit_nofile 1024;
events {
worker_connections 800;
}
http {
include mime.types;
default_type application/octet-stream;
index index.html index.htm;
keepalive_timeout 65;
server_tokens off;
server {
listen 80;
listen [::]:80;
server_name 01.net;
root /var/www/htdocs;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/htdocs;
}
}
}
以下のシェルスクリプトで起動
ifconfig fxp0 192.168.11.1/24
ifconfig fxp0
echo '------------------------'
/etc/rc.d/dnsmasq restart
/etc/rc.d/nginx restart
echo '127.0.0.1' > /etc/resolv.conf
ただし wifiの時は
/etc/hostname.bge0 を前もってdhcpにしておかないと dnsmasqサーバーからアドレスをもらえない。
2)本題のautoinstall です。
http://www.bsdnow.tv/tutorials/autoinstall のとおりです。
cat /var/www/htdocs/install.conf
System hostname = bsdnow.tv
Password for root = ThePlaceToBe...SD
Network interfaces = em0
IPv4 address for em0 = dhcp
Setup a user = puffy
Password for user = whywasibornasafish
What timezone are you in = US/Eastern
Location of sets = http
Server = 192.168.1.1
----->8-----cut here ----->8-----
System hostname = tester
Which network interface do you wish to configure = em0
IPv4 address for em0 = 192.168.99.10
Netmask for em0 = 255.255.255.0
IPv6 address for em0 = none
Which network interface do you wish to configure = done
Default IPv4 route = 192.168.99.1
DNS domain name = example.com
DNS nameservers = none
Password for root account = insecure
Start sshd(8) by default = yes
Start ntpd(8) by default = no
Do you expect to run the X Window System = no
Do you want the X Window System to be started by xdm(1) = no
Setup a user = joe
Full name for user joe = Joe Blogs
Password for user joe = insecure
Public ssh key for user joe = none
Which disk is the root disk = wd0
Use DUIDs rather than device names in fstab = yes
Use (W)hole disk, use the (O)penBSD area, or (E)dit the MBR = whole
URL to autopartitioning template for disklabel = http://192.168.99.1/template
Location of sets = http
HTTP proxy URL = none
HTTP Server = 192.168.99.1
----->8-----cut here ----->8-----
/etc/rc.d/nginx stop と 止めます。
apacheをいれます。
internet
|
sis0
openbsd PXE server
ne3 :192.168.11.1
|
|
fxp0
PC ( openbsd will be installed)
a) httpd
# cat /etc/hostname.ne3
inet 192.168.11.1 255.255.255.0
# cat /etc/dhcpd.interfaces
ne3
# cat /etc/dhcpd.conf
option domain-name-servers 8.8.8.8;
subnet 192.168.11.0 netmask 255.255.255.0 {
option routers 192.168.11.1;
filename "auto_install";
next-server 192.168.11.1;
range 192.168.11.8 192.168.11.25;
}
b)httpd
$ cat /etc/httpd.conf
server "default" {
listen on ne3 port 80
root "/htdocs"
directory auto index
}
# ls -ltr /var/www/htdocs
total 340
-r--r--r-- 1 root bin 2220 Mar 6 2014 smalltitle.gif
-r--r--r-- 1 root bin 2063 Mar 6 2014 openssl_ics.gif
-r--r--r-- 1 root bin 3334 Mar 6 2014 openbsdpower.gif
-r--r--r-- 1 root bin 3361 Mar 6 2014 openbsd_pb.gif
-r--r--r-- 1 root bin 2007 Mar 6 2014 mod_ssl_sb.gif
-r--r--r-- 1 root bin 35570 Mar 6 2014 logo24.jpg
-r--r--r-- 1 root bin 46246 Mar 6 2014 logo23.jpg
-r--r--r-- 1 root bin 5417 Mar 6 2014 lock.gif
-r--r--r-- 1 root bin 4090 Mar 6 2014 bsd_small.gif
-r--r--r-- 1 root bin 41318 Mar 6 2014 blowfish.jpg
-r--r--r-- 1 root bin 2326 Mar 6 2014 apache_pb.gif
-r--r--r-- 1 root bin 537 Mar 6 2014 50x.html
-r--r--r-- 1 root bin 2269 Dec 26 05:35 index.html
drwxr-xr-x 2 root wheel 512 Apr 27 01:24 bgplg
drwxr-xr-x 3 root daemon 512 Apr 30 19:30 pub
lrwxr-xr-x 1 root daemon 11 Apr 30 20:49 auto_install -> 5.6/pxeboot
lrwxr-xr-x 1 root daemon 10 Apr 30 20:51 bsd -> 5.6/bsd.rd
drwxr-xr-x 2 root daemon 512 Apr 30 21:00 5.6
-rw-r--r-- 1 root daemon 263 May 1 02:09 install.conf
# ls /var/www/htdocs/5.6
INSTALL.i386 base56.tgz bsd.rd game56.tgz xbase56.tgz xserv56.tgz
SHA256 bsd comp56.tgz man56.tgz xetc56.tgz xshare56.tgz
SHA256.sig bsd.mp etc56.tgz pxeboot xfont56.tgz
cp /var/www/htdocs/5.6/bsd.rd /tftpboot/bsd
# cat /var/www/htdocs/install.conf
System hostname = bsdnow.tv
Password for root = e-----------
Network interfaces = fxp0 #reserch NIC previouly
IPv4 address for fxp0 = dhcp
Setup a user = t-user
Password for user = f-----------
What timezone are you in = Asia/Tokyo
Location of sets = http
Server = 192.168.11.1
c)tftpd
# ls -l /tftpboot/
total 13600
lrwxr-xr-x 1 root wheel 7 Apr 30 19:23 auto_install -> pxeboot
-rw-r--r-- 1 root wheel 6918326 May 1 01:30 bsd
-rw-r--r-- 1 root wheel 81108 Apr 30 01:04 pxeboot
bsdは実は bsd.rd でしたね
d)
/etc/rc.d/dhcpd -f restart
/etc/rc.d/httpd -f restart
tftpd /tftpboot
起動したら
cat /etc/kbdtype
jp
3)
http://cappesoft.blog21.fc2.com/blog-entry-1199.html
参考にして
./comment-out.bat .dillo/dillorc で日本語動くが、以下は奇妙
initially.
img.example.org,
font_serif="M+1P+IPAG"
font_sans_serif="M+1P+IPAG"
font_cursive="M+1P+IPAG"
font_fantasy="M+1P+IPAG"
font_monospace="M+1P+IPAG"
running
uniq").
viewport
start_page="http://www.searchdesk.com"
home="http://www.google.co.jp"
among
search_url="Google http://www.google.co.jp/search?ie=UTF-8&oe=UTF-8&q=%s"
search_url="YahooDictionary
http://dic.search.yahoo.co.jp/search?stype=0&dtype=2&ei=UTF-8&p=%s"
search_url="Wikipedia
http://ja.wikipedia.org/w/index.php?search=%s&go=Go"
www.iana.org/assignments/language-subtag-registry
http_language="ja"
proxy.
because it
that the
a
features
strings.
Firefox/7.0.1"
Windows...and
enterpress,
submits).
").
0 件のコメント:
コメントを投稿