vps_-_netbsd
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
vps_-_netbsd [2020/07/11 10:35] – created perlfan | vps_-_netbsd [2023/07/31 18:01] (current) – Added alternative set up method based on recent experience and need for help from membership. stug | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{: | ||
+ | |||
+ | ====== NetBSD on SDF VPS ====== | ||
+ | |||
+ | ===== First Steps ===== | ||
+ | |||
+ | ==== User Accounts ==== | ||
+ | |||
+ | After you have installed and started your NetBSD VPS, go to the console and log-in as user root with the default password, " | ||
+ | |||
+ | One of the first things you will want to do is change the default root password by typing " | ||
+ | |||
+ | It is also a good habit to create a regular user account for working, using '' | ||
+ | |||
+ | useradd -m -G wheel < | ||
+ | |||
+ | Then immediately set its password with: | ||
+ | |||
+ | passwd < | ||
+ | |||
+ | This user will be in the '' | ||
+ | |||
+ | ==== System Clock ==== | ||
+ | |||
+ | It is customary on UNIX systems for the system clock to be set to UTC. To set the local time zone, find your zone file in ''/ | ||
+ | |||
+ | ln -fs / | ||
+ | |||
+ | ==== Networking ==== | ||
+ | |||
+ | Look at the first line of your control panel at vps.sdf.org and note YOUR_HOSTNAME (e.g. netbsd99), EXTERNAL_IP (e.g. 205.166.94.nnn), | ||
+ | |||
+ | < | ||
+ | VPS Maintenance Shell for netbsd99 (205.166.94.nnn / 10.1.0.nnn) | ||
+ | -------- | ||
+ | |||
+ | | | ||
+ | | | ||
+ | | | ||
+ | YOUR_HOSTNAME | ||
+ | </ | ||
+ | |||
+ | Open / | ||
+ | |||
+ | <file config etc/ | ||
+ | hostname=YOUR_HOSTNAME.sdf.org | ||
+ | defaultroute=205.166.94.1 | ||
+ | auto_ifconfig=yes | ||
+ | ifconfig_xennet0=" | ||
+ | ifconfig_xennet1=" | ||
+ | </ | ||
+ | |||
+ | Then put this in / | ||
+ | |||
+ | <file config / | ||
+ | nameserver 205.166.94.20 | ||
+ | </ | ||
+ | |||
+ | Add this to /etc/hosts: | ||
+ | |||
+ | <file config / | ||
+ | EXTERNAL_IP YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME | ||
+ | </ | ||
+ | |||
+ | Run/Type: | ||
+ | |||
+ | / | ||
+ | | ||
+ | Alternatively, | ||
+ | |||
+ | Open / | ||
+ | |||
+ | <file config etc/ | ||
+ | hostname=YOUR_HOSTNAME.sdf.org | ||
+ | defaultroute=205.166.94.1 | ||
+ | </ | ||
+ | |||
+ | Create / | ||
+ | |||
+ | <file config etc/ | ||
+ | up | ||
+ | EXTERNAL_IP netmask 255.255.255.0 | ||
+ | </ | ||
+ | |||
+ | Then put this in / | ||
+ | |||
+ | <file config / | ||
+ | nameserver DNS_SERVER_IP | ||
+ | </ | ||
+ | |||
+ | Add this to /etc/hosts: | ||
+ | |||
+ | <file config / | ||
+ | EXTERNAL_IP YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME | ||
+ | </ | ||
+ | |||
+ | Run/Type: | ||
+ | |||
+ | / | ||
+ | |||
+ | ===== pkgsrc ===== | ||
+ | |||
+ | On NetBSD you can mount a pre-built (and still in progress) pkgsrc DESTDIR. Following the procedures below will effectively install the 2000+ included packages on your virtual NetBSD system. | ||
+ | |||
+ | Note that at the moment the pre-built pkgsrc assumes that its path is /pkgshare. Some programs won't work under a different prefix since they won't be able to find their shared libraries. | ||
+ | |||
+ | mkdir -p /pkgshare | ||
+ | rmdir /usr/pkg | ||
+ | ln -s /pkgshare /usr/pkg | ||
+ | rm -rf /var/db/pkg | ||
+ | ln -s / | ||
+ | mount -t nfs 10.1.0.1:/ | ||
+ | export PATH=$PATH:/ | ||
+ | |||
+ | It is read only. | ||
+ | |||
+ | To set this up on boot, execute the steps above and then: | ||
+ | |||
+ | < | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | </ | ||
+ | |||
+ | Note that you cannot use both this pre-built pkgsrc and pre-built packages from netbsd.org. It may be possible to set the system up so you can, however this is best left to the experienced NetBSD administrator. | ||
+ | |||
+ | ===== Miscellaneous Tips ===== | ||
+ | |||
+ | ==== Free up disk space by removing unwanted sets ==== | ||
+ | |||
+ | The default image comes with all distribution sets installed. You can free up some disk space by removing the ones you don't need. | ||
+ | |||
+ | First, check which distribution sets are installed: | ||
+ | |||
+ | ls /etc/mtree | ||
+ | |||
+ | Decide which sets you want to remove and examine their contents. For example, to remove games and all X11 sets: | ||
+ | |||
+ | < | ||
+ | for set in games xbase xcomp xetc xfont xserver ; do \ | ||
+ | tar tzf / | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | After examining ''/ | ||
+ | |||
+ | cat / | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ---- | ||
+ | $Id: VPS_NetBSD.html, | ||