User Tools

Site Tools


vps_-_netbsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vps_-_netbsd [2021/04/02 19:09] – [References] hc9vps_-_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:
-{{:vps_-_netbsd:netbsd.png?nolink&200|}}+{{:vps_-_netbsd:netbsd.png?nolink&150|}}
  
 ====== NetBSD on SDF VPS ====== ====== NetBSD on SDF VPS ======
- 
-===== Contents ===== 
- 
-  * [[#first_steps|First Steps]] 
-    * [[#user_accounts|User Accounts]] 
-    * [[#system_clock|System Clock]] 
-    * [[#networking|Networking]] 
-  * [[#pkgsrc|pkgsrc]] 
-  * [[#tips|Miscellaneous Tips]] 
-  * [[#references|References]] 
  
 ===== First Steps ===== ===== First Steps =====
Line 21: Line 11:
 One of the first things you will want to do is change the default root password by typing "passwd" at the prompt. Don't forget this password as there is currently no way to recover it. One of the first things you will want to do is change the default root password by typing "passwd" at the prompt. Don't forget this password as there is currently no way to recover it.
  
-It is also a good habit to create a regular user account for working, using "suto obtain root privileges as needed. To create a regular user account which is part of the administrative "wheelgroup:+It is also a good habit to create a regular user account for working, using ''su'' to obtain root privileges as needed. To create a regular user account which is part of the administrative ''wheel'' group:
  
-  useradd -m -G wheel &lt;username&gt;+  useradd -m -G wheel <username>
  
 Then immediately set its password with: Then immediately set its password with:
  
-  passwd &lt;username&gt;+  passwd <username>
  
-This user will be in the "wheelgroup and will be able to perform administrative tasks by runing "suto obtain superuser privileges using the root password.+This user will be in the ''wheel'' group and will be able to perform administrative tasks by running ''su'' to obtain superuser privileges using the root password.
  
 ==== System Clock ==== ==== 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 "/usr/share/zoneinfo/and link to it at "/etc/localtimeas follows:+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 ''/usr/share/zoneinfo/'' and link to it at ''/etc/localtime'' as follows:
  
   ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime   ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
Line 41: Line 31:
 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), and INTERNAL_IP (e.g. 10.1.0.nnn): 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), and INTERNAL_IP (e.g. 10.1.0.nnn):
  
-  VPS Maintenance Shell for netbsd99 (205.166.94.nnn / 10.1.0.nnn) +<file> 
-                            --------  -------------   ----------+VPS Maintenance Shell for netbsd99 (205.166.94.nnn / 10.1.0.nnn) 
 +                          --------  -------------   ----------
  
-                            |                       | +                          |                       | 
-                            |         EXTERNAL_IP     INTERNAL_IP +                          |         EXTERNAL_IP     INTERNAL_IP 
-                            +                          
-                            YOUR_HOSTNAME+                          YOUR_HOSTNAME 
 +</file>
  
 Open /etc/rc.conf in an editor and, replacing the text YOUR_HOSTNAME, EXTERNAL_IP, and INTERNAL_IP with your own actual host name and IP numbers, add: Open /etc/rc.conf in an editor and, replacing the text YOUR_HOSTNAME, EXTERNAL_IP, and INTERNAL_IP with your own actual host name and IP numbers, add:
  
-  hostname=YOUR_HOSTNAME.sdf.org +<file config etc/rc.conf> 
-  defaultroute=205.166.94.1 +hostname=YOUR_HOSTNAME.sdf.org 
-  auto_ifconfig=yes +defaultroute=205.166.94.1 
-  ifconfig_xennet0="inet EXTERNAL_IP netmask 0xffffff00" +auto_ifconfig=yes 
-  ifconfig_xennet1="inet INTERNAL_IP netmask 0xffffff00"+ifconfig_xennet0="inet EXTERNAL_IP netmask 0xffffff00" 
 +ifconfig_xennet1="inet INTERNAL_IP netmask 0xffffff00" 
 +</file> 
 + 
 +Then put this in /etc/resolv.conf: 
 + 
 +<file config /etc/resolv.conf> 
 +nameserver 205.166.94.20 
 +</file> 
 + 
 +Add this to /etc/hosts: 
 + 
 +<file config /etc/hosts> 
 +EXTERNAL_IP YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME 
 +</file> 
 + 
 +Run/Type: 
 + 
 +  /etc/rc.d/network restart 
 +   
 +Alternatively, if the above does not work: 
 + 
 +Open /etc/rc.conf in an editor and, replacing the text YOUR_HOSTNAME, EXTERNAL_IP, and INTERNAL_IP with your own actual host name and IP numbers, add: 
 + 
 +<file config etc/rc.conf> 
 +hostname=YOUR_HOSTNAME.sdf.org 
 +defaultroute=205.166.94.1 
 +</file> 
 + 
 +Create /etc/ifconfig.xennet0 and open it in an editor. Add: 
 + 
 +<file config etc/ifconfig.xennet0> 
 +up 
 +EXTERNAL_IP netmask 255.255.255.0 
 +</file>
  
 Then put this in /etc/resolv.conf: Then put this in /etc/resolv.conf:
  
-  nameserver 205.166.94.20+<file config /etc/resolv.conf> 
 +nameserver DNS_SERVER_IP 
 +</file>
  
 Add this to /etc/hosts: Add this to /etc/hosts:
  
-  EXTERNAL_IP YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME+<file config /etc/hosts> 
 +EXTERNAL_IP YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME 
 +</file>
  
 Run/Type: Run/Type:
Line 87: Line 117:
 To set this up on boot, execute the steps above and then: To set this up on boot, execute the steps above and then:
  
-  echo "nfs_client=YES" &gt;&gt; /etc/rc.conf +<code> 
-  echo "rpcbind=YES" &gt;&gt; /etc/rc.conf +echo "nfs_client=YES" >> /etc/rc.conf 
-  echo "10.1.0.1 vps" &gt;&gt; /etc/hosts +echo "rpcbind=YES" >> /etc/rc.conf 
-  echo "vps:/pkgshare /pkgshare nfs ro" &gt;&gt; /etc/fstab +echo "10.1.0.1 vps" >> /etc/hosts 
-  echo "export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin" &gt;&gt; /etc/profile+echo "vps:/pkgshare /pkgshare nfs ro" >> /etc/fstab 
 +echo "export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin" >> /etc/profile 
 +</code>
  
 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. 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.
Line 107: Line 139:
 Decide which sets you want to remove and examine their contents. For example, to remove games and all X11 sets: 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 \ +<code> 
-    tar tzf /usr/INSTALL/$set.tgz | sed -e 's/^\.//' &gt;&gt; /tmp/purgelist ; \ +for set in games xbase xcomp xetc xfont xserver ; do \ 
-  done+  tar tzf /usr/INSTALL/$set.tgz | sed -e 's/^\.//' >> /tmp/purgelist ; \ 
 +done 
 +</code>
  
-After examining "/tmp/purgelistand removing any files you want to keep, do:+After examining ''/tmp/purgelist'' and removing any files you want to keep, do:
  
   cat /tmp/purgelist | xargs rm   cat /tmp/purgelist | xargs rm
vps_-_netbsd.1617390573.txt.gz · Last modified: 2021/04/02 19:09 by hc9