Difference between revisions of "Configure System Services"

From gr0x0rd
Jump to navigation Jump to search
Line 38: Line 38:
 
Start the ntp daemon, ensuring your system time remains in sync.
 
Start the ntp daemon, ensuring your system time remains in sync.
 
  '''#''' rc-update add ntpd default
 
  '''#''' rc-update add ntpd default
 +
 +
'''Optional: RAID'''
 +
 +
If you used RAID, you'll also need to emerge mdadm and add it to the system boot level.
 +
emerge -av mdadm
 +
rc-update add mdadm boot
  
 
Your system services are now scheduled to start when the system boots. The next step is to [[Configure the Kernel]].
 
Your system services are now scheduled to start when the system boots. The next step is to [[Configure the Kernel]].

Revision as of 21:41, 10 May 2011

Installing Gentoo - Configure System Services

Now that we've installed all of our system utilities, we need to configure them to start with the system.



Optional - Change your ssh port

The default port for ssh connections is 22. Much like with FTP servers configured to use the default port (21), people program bots to find an ssh server listening on the default port and then hammer it, using a password dictionary, to try to guess the root password. Changing the port to something other than the default is a very easy way to deter 99% of such attacks.

The ssh port setting is stored in the file /etc/ssh/sshd_config. Find the line containing the directive Port, uncomment it, and replace yourport in the example below with your desired port.

# nano -w /etc/ssh/sshd_config

file: /etc/sshd/sshd_config

... 
Port yourport
...

Let's take a moment to configure our networking options. This will improve boot time and reduce the time it takes for the network interface to time out.

# nano -w /etc/conf.d/net

file: /etc/conf.d/net

...
modules=( "dhcpcd" )
modules_eth0=( "ifconfig" )
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 5"

Start networking with the system.

# rc-update add net.eth0 default

Enable numlock at startup.

# rc-update add numlock default

Start the ssh daemon, so you can connect remotely to your computer.

# rc-update add sshd default

Start the system logger, so you can view system logs for security and troubleshooting purposes.

#  rc-update add syslog-ng default

Start the cron deamon, so scheduled tasks are run when invoked.

# rc-update add vixie-cron default

Start the ntp daemon, ensuring your system time remains in sync.

# rc-update add ntpd default

Optional: RAID

If you used RAID, you'll also need to emerge mdadm and add it to the system boot level.

emerge -av mdadm
rc-update add mdadm boot

Your system services are now scheduled to start when the system boots. The next step is to Configure the Kernel.