Install NetBSD-3.0 by Bootable CD. rm -rf /home mkdir /usr/home ln -s /usr/home /home useradd -m -d /usr/home/USERNAME -c USERNAME USERNAME vi /etc/group #Add ",USERNAME" after root. passwd USERNAME passwd root cat<>/etc/rc.conf wscons=NO hostname=HOSTNAME sendmail=NO #defaultroute=192.168.0.254 apmd=YES EOF cat<>/etc/rc.local echo '106 Japanese keyboard.'; /sbin/wsconsctl -w encoding=jp EOF cat<~/.cshrc set path=(/usr/{local,X11R6}/bin /{,usr/}bin /{,usr/}sbin /usr/games) set prompt='%m{!} %~ %# ' setenv LD_LIBRARY_PATH /usr/local/lib:/usr/X11R6/lib:/usr/lib setenv CFLAGS '-O2 -pipe' setenv PAGER less #setenv LANG ja_JP.eucJP EOF cd / cat syssrc.tgz|gzip -d|tar -xf- cd /usr/src/sys/arch/i386/conf cp GENERIC MACHINENAME vi MACHINENAME config MACHINENAME cd ../compile/MACHINENAME make clean depend all|&tee mk01.log mv /netbsd /netbsd.org mv netbsd / shutdown -r now cat make-3.81.tar.gz|gzip -d|tar -xf- cd make-3.81 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cat tcsh-6.14.00.tar.gz|gzip -d|tar -xf- cd tcsh-6.14.00 ./configure|&tee mk01.log make|&tee mk02.log make install install.man|&tee mk03.log patch<>/etc/ld.so.conf /usr/local/lib /usr/X11R6/lib EOF cat</etc/exports /usr -alldirs -network 192.168.0/24 EOF cat<>/etc/rc.conf rpcbind=YES mountd=YES nfs_server=YES EOF cat</etc/ifconfig.NIC 192.168.0.254 EOF mkdir -p /etc/ppp/peers cat</etc/ppp/peers/PROVIDERNAME tty00 115200 crtscts connect '/usr/sbin/chat -v -f /etc/ppp/chat-PROVIDERNAME' name USERID@PROVIDERID defaultroute EOF cat</etc/ppp/chat-PROVIDERNAME ABORT "NO CARRIER" ABORT "ERROR" ABORT "BUSY" "" atx0 "" at\$n1=1 "" atdTELEPHONENUMBER CONNECT EOF cat</etc/ppp/pap-secrets USERID@PROVIDERID * PASSWORD EOF chmod go-rwx /etc/ppp/pap-secrets cp -p /etc/ppp/pap-secrets /etc/ppp/chap-secrets pppd call PROVIDERNAME cat</etc/ifconfig.pppoe0 create ! /sbin/ifconfig NIC up ! /sbin/pppoectl -e NIC \$int ! /sbin/pppoectl \$int myauthproto=pap myauthname=USERID@PROVIDERID myauthsecret=PASSWORD inet 0.0.0.0 0.0.0.1 netmask 0xffffffff #! /sbin/route add default -iface 0.0.0.1 up EOF chmod go-rwx /etc/ifconfig.pppoe0 mkdir /etc/ppp cat</etc/ppp/ip-up #! /bin/sh /sbin/route add default \$5 EOF cat</etc/ppp/ip-down #! /bin/sh /sbin/route delete default \$5 EOF chmod a+x /etc/ppp/ip-up /etc/ppp/ip-down #cat</etc/ipf.conf #pass in all #pass out all #EOF perl /usr/share/examples/ipf/mkfilters>/etc/ipf.conf cat</etc/ipnat.conf map pppoe0 192.168.0.0/24 -> 0/32 portmap tcp/udp auto mssclamp 1408 map pppoe0 192.168.0.0/24 -> 0/32 mssclamp 1408 rdr pppoe0 0/0 port SHAREPORT -> 192.168.0.1 port SHAREPORT tcp EOF cat<>/etc/rc.conf ifwatchd=YES ipfilter=YES ipnat=YES EOF cat<>/etc/sysctl.conf # Obey interface MTUs when calculating MSS net.inet.tcp.mss_ifmtu=1 EOF #ipfstat -i #ipfstat -o #ipnat -l #ipnat -C #ipnat -f /etc/ipnat.conf cat</etc/resolv.conf nameserver 220.220.248.1 nameserver 220.220.248.9 EOF cat tcp_wrappers_7.6.tar.gz|gzip -d|tar -xf- cd tcp_wrappers_7.6 make REAL_DAEMON_DIR=/usr/libexec/real STYLE=-DPROCESS_OPTIONS netbsd|&tee mk01.log cp safe_finger tcpd tcpdchk tcpdmatch try-from /usr/local/bin mkdir /usr/local/man/man3 mkdir /usr/local/man/man5 mkdir /usr/local/man/man8 cp *3 /usr/local/man/man3 cp *5 /usr/local/man/man5 cp *8 /usr/local/man/man8 mkdir /usr/libexec/real cat</etc/hosts.allow tcp-env: 192.168.0.0/255.255.255.0: setenv RELAYCLIENT: ALLOW tcp-env: ALL: ALLOW ALL: 127.0.0.1, 192.168.0.0/255.255.255.0: ALLOW ALL: ALL: DENY EOF #tcpdchk -v #tcpdmatch telnetd 123.45.67.89 #tail -f /var/log/maillog mv /usr/libexec/telnetd /usr/libexec/real ln -s /usr/local/bin/tcpd /usr/libexec/telnetd cat<>/etc/inetd.conf #telnet stream tcp nowait root /usr/libexec/telnetd telnetd -a valid telnet stream tcp nowait root /usr/libexec/telnetd telnetd EOF mv /usr/libexec/ftpd /usr/libexec/real ln -s /usr/local/bin/tcpd /usr/libexec/ftpd cat<>/etc/inetd.conf ftp stream tcp nowait root /usr/libexec/ftpd ftpd -ll EOF useradd -m -d /usr/home/ftp -s /sbin/nologin -g wheel -c 'anonymous ftp' ftp rm ~ftp/.* mkdir ~ftp/bin ~ftp/etc ~ftp/pub cat<~ftp/etc/master.passwd root::0:0::0:0::: EOF pwd_mkdb -d ~ftp ~ftp/etc/master.passwd cat<~ftp/etc/group wheel::0: EOF cat</etc/ftpwelcome Hello ! I am ftp server on HOSTNAME. EOF cat<~ftp/etc/motd Welcome to anonymous ftp server on HOSTNAME. EOF chown -R root:wheel ~ftp chmod 444 ~ftp/etc/* chmod 555 ~ftp ~ftp/bin ~ftp/etc cat checkpassword-0.90.tar.gz|gzip -d|tar -xf- cd checkpassword-0.90 make setup check|&tee mk01.log cat qmail-1.03.tar.gz|gzip -d|tar -xf- cd qmail-1.03 patch<min,2); len += i; if (s) s += i; i = fmt_str(s,":"); len += i; if (s) s += i; i = fmt_uint0(s,dt->sec,2); len += i; if (s) s += i; - i = fmt_str(s," -0000\n"); len += i; if (s) s += i; + i = fmt_str(s," +0900 (JST)\n"); len += i; if (s) s += i; return len; } --- conf-cc +++ conf-cc @@ -1,3 +1,3 @@ -cc -O2 +cc -O2 -pipe This will be used to compile .c files. EOF mkdir /var/qmail groupadd nofiles useradd -s /sbin/nologin -g nofiles -d /var/qmail/alias -c alias alias useradd -s /sbin/nologin -g nofiles -d /var/qmail -c qmaild qmaild useradd -s /sbin/nologin -g nofiles -d /var/qmail -c qmaill qmaill useradd -s /sbin/nologin -g nofiles -d /var/qmail -c qmailp qmailp groupadd qmail useradd -s /sbin/nologin -g qmail -d /var/qmail -c qmailq qmailq useradd -s /sbin/nologin -g qmail -d /var/qmail -c qmailr qmailr useradd -s /sbin/nologin -g qmail -d /var/qmail -c qmails qmails make setup check|&tee mk01.log #./config|&tee mk02.log ./config-fast HOSTNAME.DOMAINNAME|&tee mk02.log #echo :RELAYSERVER.DOMAINNAME>/var/qmail/control/smtproutes (cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root) chmod 644 ~alias/.qmail* cp /var/qmail/boot/home /var/qmail/rc patch<>/etc/inetd.conf smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd pop3 stream tcp nowait root /var/qmail/bin/qmail-popup qmail-popup HOSTNAME.DOMAINNAME /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir EOF cat<>/etc/rc.local echo 'Starting qmail.'; /bin/csh -cf '/var/qmail/rc &' EOF /var/qmail/bin/maildirmake ~/Maildir #/var/qmail/bin/qmail-showctl cat httpd-2.2.3.tar.bz2|gzip -d|tar -xf- cd httpd-2.2.3 ./configure --enable-proxy --enable-ssl --enable-so|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log #chown -R root:wheel /usr/local/apache2 patch< + AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec EOF cat<>/etc/rc.local echo 'Starting Apache2 HTTP server.'; /usr/local/apache2/bin/apachectl start EOF #Homepage is in /usr/local/apache2/htdocs. #tail -f /usr/local/apache2/logs/access_log|/usr/local/apache2/bin/logresolve #/usr/local/apache2/bin/apachectl configtest #I probably need following Options in httpd.conf. #AddOutputFilter INCLUDES .html #Options ExecCGI Includes cat postgresql-8.1.4.tar.bz2|gzip -d|tar -xf- cd postgresql-8.1.4 ./configure|&tee mk01.log make|&tee mk02.log make check|&tee mk03.log make install|&tee mk04.log useradd -d /usr/local/pgsql -s /bin/csh -g users -c postgres postgres mkdir /usr/local/pgsql/data chown postgres:users /usr/local/pgsql/data su - postgres -c '/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data'|&tee mk05.log patch<>/etc/rc.local echo 'Starting PostgreSQL RDBMS.' su - postgres -c '/usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data &' EOF su - postgres -c '/usr/local/pgsql/bin/createuser -d -A USERNAME' su - USERNAME -c '/usr/local/pgsql/bin/createdb -E EUC_JP' cat libxml2-2.6.26.tar.gz|gzip -d|tar -xf- cd libxml2-2.6.26 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cat php-5.1.4.tar.bz2|gzip -d|tar -xf- cd php-5.1.4 ./configure --without-pear --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql|&tee mk01.log make|&tee mk02.log make test|&tee mk03.log #There was 11 fails. Ignored. make install|&tee mk04.log cp php.ini-dist /usr/local/lib/php.ini patch< # EOF cat samba-3.0.23b.tar.gz|gzip -d|tar -xf- cd samba-3.0.23b/source ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log #cat</usr/local/samba/lib/smb.conf #[global] # workgroup = INSIDE # #[homes] # read only = No # browseable = No #EOF mv /usr/local/samba/sbin/smbd /usr/libexec/real mv /usr/local/samba/sbin/nmbd /usr/libexec/real mv /usr/local/samba/sbin/swat /usr/libexec/real ln -s /usr/local/bin/tcpd /usr/local/samba/sbin/smbd ln -s /usr/local/bin/tcpd /usr/local/samba/sbin/nmbd ln -s /usr/local/bin/tcpd /usr/local/samba/sbin/swat cat<>/etc/inetd.conf netbios-ssn stream tcp nowait root /usr/local/samba/sbin/smbd smbd netbios-ns dgram udp wait root /usr/local/samba/sbin/nmbd nmbd swat stream tcp nowait.400 root /usr/local/samba/sbin/swat swat EOF #http://localhost:901 ./script/mksmbpasswd.sh/usr/local/samba/private/smbpasswd /usr/local/samba/bin/smbpasswd USERNAME ntpdate ntp.nc.u-tokyo.ac.jp cat XFree86-4.5.0-src-1.tgz|gzip -d|tar -xf- cat XFree86-4.5.0-src-2.tgz|gzip -d|tar -xf- cat XFree86-4.5.0-src-3.tgz|gzip -d|tar -xf- cat XFree86-4.5.0-src-4.tgz|gzip -d|tar -xf- cat XFree86-4.5.0-src-5.tgz|gzip -d|tar -xf- cd xc/config/cf cp xf86site.def host.def patch<.Xresources *vt100*translations: #override CtrlShift_R: begin-conversion() EOF cat<.xsession xrdb .Xresources kinput2 -jserver localhost & xlogo -geometry -10+10 & xeyes -geometry -120+10 & xclock -geometry -10+150 & xload -geometry -190+150 & xman -geometry -280+10 & kterm -r -sb -km euc -geometry +10+10 & kterm -r -sb -km euc -geometry -10-10 & twm EOF chmod a+x .xsession cat FreeWnn-1.10.tar.gz|gzip -d|tar -xf- cd Xsi patch<>/etc/rc.local /usr/local/bin/Wnn4/jserver EOF cat kinput2-v3.tar.gz |gzip -d|tar -xf- cd kinput2-v3 patch<>~/.cshrc setenv XMODIFIERS "@im=kinput2" EOF cat pkg-config-0.20.tar.gz |gzip -d|tar -xf- cd pkg-config-0.20 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat<>~/.cshrc setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig EOF cat glib-2.10.0.tar.bz2 |gzip -d|tar -xf- cd glib-2.10.0 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat jpegsrc.v6b.tar.gz |gzip -d|tar -xf- cd jpeg-6b ./configure|&tee mk01.log make|&tee mk02.log mkdir /usr/local/include make install install-lib|&tee mk03.log cd .. cat tiff-v3.6.1.tar.gz |gzip -d|tar -xf- cd tiff-v3.6.1 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat libpng-1.2.8-config.tar.gz |gzip -d|tar -xf- cd libpng-1.2.8-config ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat cairo-1.0.2.tar.gz |gzip -d|tar -xf- cd cairo-1.0.2 setenv CFLAGS '-O2 -pipe -I/usr/local/include -I/usr/X11R6/include' ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat pango-1.10.4.tar.bz2 |gzip -d|tar -xf- cd pango-1.10.4 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat atk-1.10.3.tar.bz2 |gzip -d|tar -xf- cd atk-1.10.3 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat gtk+-2.8.9.tar.bz2 |gzip -d|tar -xf- cd gtk+-2.8.9 setenv LDFLAGS -L/usr/local/lib setenv CFLAGS '-O2 -pipe -I/usr/local/include' setenv CPPFLAGS -I/usr/local/include ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat libIDL-0.8.6.tar.bz2 |gzip -d|tar -xf- cd libIDL-0.8.6 ./configure|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. cat zip231.tar.gz |gzip -d|tar -xf- cd zip-2.31 make -f unix/Makefile generic|&tee mk01.log make -f unix/Makefile install|&tee mk02.log #make: execvp: man/zip.1: Permission denied. Why? cd .. cat mozilla-1.7.12-source.tar.bz2 |gzip -d|tar -xf- cd mozilla cat<~/.mozconfig # sh # Build configuration script # # See http://www.mozilla.org/build/unix.html for build instructions. # # Options for client.mk. mk_add_options MOZ_CO_PROJECT=suite mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/suite # Options for 'configure' (same as command-line options). ac_add_options --enable-default-toolkit=gtk2 ac_add_options --enable-application=suite ac_add_options --enable-optimize='-O2 -pipe' ac_add_options --enable-crypto ac_add_options --disable-debug ac_add_options --disable-tests ac_add_options --disable-freetype2 ac_add_options --disable-shared ac_add_options --enable-static EOF make -f client.mk build|&tee mk01.log cat mozilla-source-1.4.4.tar.bz2 |gzip -d|tar -xf- cd mozilla ./configure --enable-default-toolkit=gtk2 --enable-crypto --disable-tests --disable-debug --disable-freetype2|&tee mk01.log make|&tee mk02.log cat bochs-2.2.6.tar.gz|gzip -d|tar -xf- cd bochs-2.2.6 ./configure --enable-pci --enable-show-ips --enable-clgd54xx --enable-fpu|&tee mk01.log make|&tee mk02.log make install|&tee mk03.log cd .. ntpdate ntp1.plala.or.jp