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
tutorials:vps_netbsd [2012/01/16 01:55] memnontutorials:vps_netbsd [2012/01/31 22:24] (current) memnon
Line 37: Line 37:
 ==== Networking ==== ==== Networking ====
  
-Look at the first line of your control panel at vps.sdf.org and note YOUR_IP (e.g. 192.94.73.255) and YOUR_HOSTNAME (e.g. netbsd99).+Look at the first line of your control panel at vps.sdf.org and note YOUR_HOSTNAME (e.g. netbsd99), EXTERNAL_IP (e.g. 192.94.73.nnn)and INTERNAL_IP (e.g. 
 +10.1.0.nnn)
 + 
 +<code> 
 +VPS Maintenance Shell for netbsd99 (192.94.73.nnn / 10.1.0.nnn) 
 +                          --------  -------------   ---------- 
 +                          ^                       ^ 
 +                          |                       | 
 +                          |         EXTERNAL_IP     INTERNAL_IP 
 +                          | 
 +                          YOUR_HOSTNAME 
 +</code>
  
 Start your server, and log in via the console. (default=root:root) Start your server, and log in via the console. (default=root:root)
  
-Open /etc/rc.conf in an editor and, replacing the text YOUR_HOSTNAME and YOUR_IP with your own actual host name and IP number, add:+Open /etc/rc.conf in an editor and replace the text YOUR_HOSTNAME,EXTERNAL_IP and INTERNAL_IP with your own actual host name and IP number, add:
  
   hostname=YOUR_HOSTNAME.sdf.org   hostname=YOUR_HOSTNAME.sdf.org
   defaultroute=192.94.73.1   defaultroute=192.94.73.1
   auto_ifconfig=yes   auto_ifconfig=yes
-  ifconfig_xennet0="inet YOUR_IP netmask 0xffffff00" +  ifconfig_xennet0="inet EXTERNAL_IP netmask 0xffffff00" 
 +  ifconfig_xennet1="inet INTERNAL_IP netmask 0xffffff00" 
 +  
 Then put this in /etc/resolv.conf: Then put this in /etc/resolv.conf:
  
Line 54: Line 66:
 Add this to /etc/hosts: Add this to /etc/hosts:
  
-  YOUR_IP  YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME+  EXTERNAL_IP  YOUR_HOSTNAME.sdf.org YOUR_HOSTNAME
  
 Run/Type: Run/Type:
Line 78: Line 90:
 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 +  echo "nfs_client=YES" >> /etc/rc.conf 
-  echo "rpcbind=YES" &gt;&gt; /etc/rc.conf +  echo "rpcbind=YES" >> /etc/rc.conf 
-  echo "10.1.0.1 vps" &gt;&gt; /etc/hosts +  echo "10.1.0.1 vps" >> /etc/hosts 
-  echo "vps:/images/pkg_neb501 /images/pkg_neb501 nfs ro" &gt;&gt; /etc/fstab +  echo "vps:/images/pkg_neb501 /images/pkg_neb501 nfs ro" >> /etc/fstab 
-  echo "export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin" &gt;&gt; /etc/profile+  echo "export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin" >> /etc/profile
  
 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 99: Line 111:
  
   for set in games xbase xcomp xetc xfont xserver ; do \   for set in games xbase xcomp xetc xfont xserver ; do \
-    tar tzf /usr/INSTALL/$set.tgz | sed -e 's/^\.//' &gt;&gt; /tmp/purgelist ; \+    tar tzf /usr/INSTALL/$set.tgz | sed -e 's/^\.//' >> /tmp/purgelist ; \
   done   done