Gentoo Linux Console Install

Content:

1. Tools

Some standard linux tool do not come with the base Gentoo installation.

# emerge at                                               (Allow timed commands)

2. SSH

SSH is installed but not activated.

# /etc/init.d/sshd start                                          (Start daemon)
# rc-update add sshd default                                    (Add it at boot)

3. Telnet

Telnet allows a basic TCP/IP connection to a machine.

# emerge netkit-telnetd                                             (Install it)

You get a telnet daemon for free, but you don't want it.

4. Screen

The screen multiplexer allows to start a terminal connection to a machine, break it and later come back to it. It also has other interesting features...

# emerge screen                                                     (Install it)

Usage: screen -D -R. ^A-? for help.

5. DynDNS

The DynDNS service allows you to have a given hostname for a machine with a DHCP connection.

# emerge ddclient                                                   (Install it)
# nano -w /etc/ddclient/ddclient.conf                    (configure your dyndns)
# ddclient                                                             (Test it)
# /etc/init.d/ddclient start                                  (Start the daemon)
# rc-update add ddclient default                                (Add it at boot)

Some NAT firewalls already include dynamic DNS automatic updating.

6. FTP

I use ProFTPD as an FTP server.

# emerge proftpd                                                    (Install it)
# nano -w /etc/proftpd/proftpd.conf                               (Configure it)
# /etc/init.d/proftpd start                                            (Test it)
# rc-update add proftpd default                                 (Add it at boot)
# rm -R /home/ftp                                   (Remove user home directory)

The console FTP client is not part of the standard install.

# emerge ftp                                                        (Install it)

You might have to add user and group proftpd.

# groupadd proftpd                                               (add the group)
# useradd proftpd -g proftpd                                      (add the user)
# /etc/init.d/proftpd start                                   (Start the server)

7. Samba

Samba provides file and printing services across different platforms.

# USE="-gtk -X" emerge samba                                        (Install it)
# nano -w /etc/samba/smb.conf                                     (Configure it)
# smbpasswd -a <username>                                           (Add a user)
# /etc/init.d/samba start                                              (Test it)
# rc-update add samba default                                   (Add it at boot)

8. Apache

Apache is a widely used HTTP server.

# emerge apache                                                     (Install it)
# nano -w /etc/apache2/httpd.conf                                 (Configure it)
# apache2ctl start                                                     (Test it)
# rc-update add apache2 default                                 (Add it at boot)
# cd /var/www/localhost/htdocs                    (Go to HTML startup directory)
# wget <server>/index.html    (Copy the startup HTML file from a working server)
# wget <server>/powered-by-gentoo.jpg                     (Copy the Gentoo logo)

You might have to add user and group apache.

# groupadd apache                                                (add the group)
# useradd apache -g apache                                        (add the user)
# apache2ctl start                                            (Start the server)

9. NTP

Network Time Protocol is used to keep your time synchronized with a network time server.

# USE="-X -truetype -qt" emerge ntp                                 (Install it)
# ntpdate -u ntp.metas.ch                                              (Test it)
# cd /root                                           (Go to root home directory)
# nano -w crontab                                   (Add a line calling ntpdate)
# crontab -u root crontab                                          (Activate it)

10. Minicom

Minicom is a serial port terminal.

# emerge minicom                                                    (Install it)
# chmod 777 /var/lock                     (Allow all users to start the program)
# minicom                           (Edit the settings and save them as default)