Install NetBSD-4.0 CD. rm -rf /usr/share/man/cat?/* rm -rf /usr/X11R6 cd /etc cp printcap printcap.org cp inetd.conf inetd.conf.org cp rc.conf rc.conf.org cp shells shells.org cp group group.org cp sysctl.conf sysctl.conf.org mkdir /usr/home useradd -m -d /usr/home/USERNAME -c USERNAME USERNAME #Add USERNAME to wheel in /etc/group. passwd root passwd USERNAME cd mkdir .org mv .* .org cat<.cshrc set path=(/{usr/pkg/,,usr/}{bin,sbin} /usr/games) set filec set prompt='%m{!} %~ %# ' setenv CFLAGS '-O2 -pipe' setenv PAGER less EOF cd / cat syssrc.tgz|gzip -d|tar -xf- cd /usr/src/sys/arch/i386/conf cp GENERIC_LAPTOP HOSTNAME vi HOSTNAME config HOSTNAME cd ../compile/HOSTNAME make clean depend all|&tee mk01.log mv /netbsd /netbsd.org mv netbsd / shutdown -r now ntpdate ntp1.plala.or.jp cat<>/etc/hosts 192.168.0.1 HOSTNAME EOF cat<>/etc/rc.conf hostname=HOSTNAME #defaultroute=123.45.67.89 rpcbind=YES mountd=YES nfs_server=YES apmd=YES postfix=NO EOF cat</etc/exports /usr -alldirs -network 192.168.0/24 EOF cat</etc/resolv.conf nameserver 220.220.248.1 nameserver 220.220.248.9 EOF cat<>/etc/sysctl.conf # Obey interface MTUs when calculating MSS net.inet.tcp.mss_ifmtu=1 EOF touch /etc/ipf.conf #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 44000:49999 mssclamp 1408 map pppoe0 192.168.0.0/24 -> 0/32 mssclamp 1408 #rdr pppoe0 0/0 port WINNYPORT -> 192.168.0.1 port WINNYPORT tcp EOF cat</etc/ifconfig.pppoe0 create ! /sbin/ifconfig NIC up ! /sbin/pppoectl -e NIC $int ! /sbin/pppoectl $int myauthproto=pap myauthname=000XX0000@PROVIDER.or.jp 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 cat<>/etc/rc.conf ifwatchd=YES ipfilter=YES ipnat=YES EOF 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/up-down #ipfstat -i #ipfstat -o #ipnat -l #ipnat -C #ipnat -f /etc/ipnat.conf #cd /usr #cat pkgsrc-2008Q1.tar.bz2|gzip -d|tar -xf- #cat</etc/mk.conf #PKG_DEFAULT_OPTIONS+=-inet6 #EOF #cd /usr/pkgsrc/shells/tcsh #make package|&tee mk01.log pkg_add tcsh|&tee tcsh.log chsh root chsh USERNAME #cd /usr/pkgsrc/seciruty/openssl #make package|&tee mk01.log pkg_add openssl|&tee openssl.log #cd /usr/pkgsrc/meta-pkgs/courier #make package|&tee mk01.log pkg_add courier|&tee courier.log #cd /usr/pkgsrc/lang/tcl-expect #make package|&tee mk01.log pkg_add tcl-expect|&tee tcl-expect.log #cd /usr/pkgsrc/databases/php-pgsql #make package|&tee mk01.log pkg_add php5-pgsql|&tee php5-pgsql.log #cd /usr/pkgsrc/www/ap-php #make package|&tee mk01.log pkg_add ap22-php5|&tee ap22-php5.log #cd /usr/pkgsrc/databases/postgresql82 #make package|&tee mk01.log pkg_add postgresql82|&tee postgresql82.log #cd /usr/pkgsrc/net/samba #make package|&tee mk01.log pkg_add samba|&tee samba.log cp /usr/pkg/share/examples/rc.d/* /etc/rc.d cat<>/etc/rc.conf apache=YES authdaemond=YES courier=YES courierd=YES courieresmtp=YES courieresmtpmsa=YES courieresmtps=YES courierfilter=YES courierimap=YES courierimaps=YES courierpop=YES courierpops=YES nmbd=YES pgsql=YES #pgsql_flags="-l" samba=YES smbd=YES sqwebmail=YES webmlm=YES EOF #cat<>/var/cron/crontab/root #@hourly /usr/pkg/etc/courier/sharedindexupdate #@hourly /usr/pkg/etc/courier/cleancache.pl #EOF crontab -e cp /usr/pkg/libexec/courier/webmail/* /usr/pkg/libexec/cgi-bin echo PASSWORD>/usr/pkg/etc/courier/webadmin/password chown courier:mail /usr/pkg/etc/courier/webadmin/password chmod 0400 /usr/pkg/etc/courier/webadmin/password cd /usr/sbin mv sendmail sendmail.org ln -s /usr/pkg/bin/sendmail sendmail cat<>/usr/pkg/etc/httpd/httpd.conf Alias /sqwebmqil/ "/usr/pkg/share/courier/sqwebmail/images/" EOF #Add "extension=pgsql.so" to /usr/pkg/etc/php.ini. cat<>/usr/pkg/etc/httpd/httpd.conf LoadModule php5_module lib/httpd/mod_php5.so AddHandler application/x-httpd-php .php EOF cd /usr/pkg/etc/httpd openssl genrsa -out server.key 1024 openssl req -new -key server.key -out server.csr openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365 chmod go-rwx server.* cat<>/etc/inetd.conf swat stream tcp nowait.400 root /usr/pkg/sbin/swat swat EOF http://mune.plala.jp http://mune.plala.jp:901 https://mune.plala.jp/cgi-bin/webadmin https://mune.plala.jp/cgi-bin/webmail