User Tools

Site Tools


vps_-_debian

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_-_debian [2021/04/02 18:21] – [Setting up SSH] hc9vps_-_debian [2021/04/02 18:51] (current) – [Networking] hc9
Line 3: Line 3:
 ====== Debian on SDF VPS ====== ====== Debian on SDF VPS ======
  
-====== Basics ======+===== Basics =====
  
 The root user on a fresh Debian VPS has the default password "rootroot". The root user on a fresh Debian VPS has the default password "rootroot".
Line 15: Line 15:
 This user will be able to perform administrative tasks by runing ''su'' to obtain superuser privileges using the root password. This user will be able to perform administrative tasks by runing ''su'' to obtain superuser privileges using the root password.
  
-====== Set Your Timezone ======+===== Set Your Timezone =====
  
   dpkg-reconfigure tzdata   dpkg-reconfigure tzdata
  
-====== Networking ======+===== Networking =====
  
 In your control panel at vps.sdf.org, note YOUR_IP (e.g. 205.166.94.255) on the top line, and YOUR_HOSTNAME (e.g. debian99). In your control panel at vps.sdf.org, note YOUR_IP (e.g. 205.166.94.255) on the top line, and YOUR_HOSTNAME (e.g. debian99).
Line 40: Line 40:
 //Note: For VPS installations of Debian 8.4 (jesse) on VPS3, please omit the above dns-nameservers line from the interfaces file, and instead add this line to //**/etc/resolv.conf**: //Note: For VPS installations of Debian 8.4 (jesse) on VPS3, please omit the above dns-nameservers line from the interfaces file, and instead add this line to //**/etc/resolv.conf**:
  
-  nameserver 205.166.94.20+<file config /etc/resolv.conf> 
 +nameserver 205.166.94.20 
 +</file>
  
 Add this to /etc/hosts: Add this to /etc/hosts:
Line 58: Line 60:
   /etc/init.d/networking restart   /etc/init.d/networking restart
  
-====== Setting up SSH ======+===== Setting up SSH =====
  
 You may wish to add ssh access to your VPS. It is **//highly//** recommended that you disable root login via ssh and use a normal user account to login. You may wish to add ssh access to your VPS. It is **//highly//** recommended that you disable root login via ssh and use a normal user account to login.
Line 128: Line 130:
 Load rules (now): Load rules (now):
  
-  # iptables -F +<file config now> 
-  # iptables-restore < /etc/firewall+# iptables -F 
 +# iptables-restore < /etc/firewall 
 +</file>
  
 Load rules (boot): Load rules (boot):
  
-  # vi /etc/network/if-pre-up.d/firewall+<file config boot> 
 +# vi /etc/network/if-pre-up.d/firewall
  
-  #!/bin/sh +#!/bin/sh 
-  /sbin/iptables-restore < /etc/firewall+/sbin/iptables-restore < /etc/firewall 
 + 
 +# chmod 755 /etc/network/if-pre-up.d/firewall 
 +</file>
  
-  # chmod 755 /etc/network/if-pre-up.d/firewall 
  
 ===== Software and Distribution Updating ===== ===== Software and Distribution Updating =====
Line 144: Line 151:
 To update your system, run the following commands: To update your system, run the following commands:
  
-  * apt-get update +  * apt-get update <code> apt-get update 
-  * apt-get dist-upgrade -y+</code> 
 +  * apt-get dist-upgrade -y <code> apt-get dist-upgrade -y 
 +</code>
  
 ===== Reducing Memory Usage ===== ===== Reducing Memory Usage =====
Line 155: Line 164:
 You might not need one or both of those, so you can deactivate them with You might not need one or both of those, so you can deactivate them with
  
 +<file config cron and at>
   # update-rc.d -f atd remove   # update-rc.d -f atd remove
   # update-rc.d -f cron remove   # update-rc.d -f cron remove
 +</file>
  
 This frees up ca. 7MB (if both are deactivated). This frees up ca. 7MB (if both are deactivated).
Line 164: Line 175:
 This being a virtual system, you won't need getty on tty1-6. In order to eliminate them, edit /etc/inittab and modify the corresponding lines like this: This being a virtual system, you won't need getty on tty1-6. In order to eliminate them, edit /etc/inittab and modify the corresponding lines like this:
  
-<code>+<file config /etc/inittab>
   co:2345:respawn:/sbin/getty hvc0 9600 linux   co:2345:respawn:/sbin/getty hvc0 9600 linux
  
Line 173: Line 184:
   #5:23:respawn:/sbin/getty 38400 tty5   #5:23:respawn:/sbin/getty 38400 tty5
   #6:23:respawn:/sbin/getty 38400 tty6   #6:23:respawn:/sbin/getty 38400 tty6
-</code>+</file>
  
 You need to keep the line with hvc0 so you can attach a serial console from vps.sdf.org to your vps. This frees up ca. 10MB. You need to keep the line with hvc0 so you can attach a serial console from vps.sdf.org to your vps. This frees up ca. 10MB.
Line 181: Line 192:
 rsyslogd eats a lot of memory by default (26MB on my vps) which can be reduced by the usage of ulimit. Edit /etc/init.d/rsyslog and include the following line just before the command where rsyslogd will be started: rsyslogd eats a lot of memory by default (26MB on my vps) which can be reduced by the usage of ulimit. Edit /etc/init.d/rsyslog and include the following line just before the command where rsyslogd will be started:
  
-  ulimit -s 256+<file config /etc/init.d/rsyslog> 
 +ulimit -s 256 
 +</file>
  
 Example: Example:
vps_-_debian.1617387676.txt.gz · Last modified: 2021/04/02 18:21 by hc9