Debian core setup
- Insert the Debian Minimal Install CD and bootup.
- Enter linux26 at the prompt.
- Choose a language and country.
- Choose a name for the server.
- Enter the appropriate domain name (fcny.org).
- When prompted to partition, erase the entire disk.
- Select "All files in one partition..." and proceed with reformatting.
- Watch as the core Debian packages are installed.
- Install GRUB to the master boot record.
- When prompted, remove the CD and reboot.
Debian configuration
These instructions derived from C. Snyder's notes.
- Choose a timezone.
- Choose a root password. Make sure it's strong!
- Choose an admin username. Better to use something generic like "metrixadmin" than, say, "amitchell".
- Enter a password for this admin user. Make sure it's strong!
- Select "http" as the apt source. ("Apt" is Debian's package manager.)
- Select appropriate Debian mirrors.
- Leave proxy information blank.
- Watch as Debian gets the list of available packages from the mirrors.
- Select "Manual Package Installation".
- When Aptitude, the package manager, appears, press "q" to quit without selecting any packages.
- Configure the Mail Transfer Agent: set mail server to "internet site" profile, i.e. send and receive.
- Enter a username for the mail admin. Using the same username as the machine admin is fine.
- Setup will complete and send you to a shell login.
Basic operability configuration
These instructions derived from C. Snyder's notes.
- Login as the admin user.
- Switch to the root user and determine the IP address of this machine. Make a note of it.
$ su
[forge:enter root password
$ ifconfig eth0
inet addr 10.0.17.xxx
- Edit the network settings configuration file so this IP address is static:
# nano -w /etc/network/interfaces
iface eth0 inet static
address 10.0.17.xxx
netmask 255.255.255.0
gateway 10.0.17.1
- Save in nano with ctl-O.
- Exit nano with ctl-X.
- Edit the DNS (nameserver) settings:
$ nano -w /etc/resolv.conf
nameserver 209.11.29.164
nameserver 205.237.194.98
- Restart the network interface:
$ ifdown eth0
$ ifup eth0
- Install SSH (secure shell) so that this machine can be logged into remotely.
- Accept the defaults as SSH is installed.
- Test ssh accessibility from another system:
$ ssh 10.0.17.xxx
Password: *****
Linux gforge 2.4.27-2-386 #1 Mon May 16 16:47:51 JST 2005 i686 GNU/Linux
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
metrixadmin@gforge:~$
- If you are unable to login remotely, use iptables
to open the firewall to allow SSH traffic, and try again.
$ iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$ iptables -A FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
$ iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
$ iptables -A INPUT -d 10.0.17.172 -p tcp --dport 22 -j ACCEPT
- Exit the SSH session: $ exit
- Edit the apt-get sources list so that customized FCNY packages are available.
$ nano -w /etc/apt/sources.list
deb http:
- Update apt and upgrade installed software.
$ apt-get update
$ apt-get upgrade
$ apt-get dist-upgrade
Additional Configuration
Adapted from C. Snyder's configuration checklist
- Update the locate database
- Reduce the ssh login grace period, disallow root login via ssh, and keep client connections alive
$ nano -w /etc/ssh/sshd_config
LoginGraceTime 30
PermitRootLogin no
ClientAliveInterval 15
- Restart ssh (main instance only!)
$ kill `cat /var/run/sshd.pid`
$ /usr/sbin/sshd
- Test the SSH login from another terminal. (Make sure new configuration works before logging out of original session! You don't want to get locked out...)
- Log out of the SSH session.
- On the local machine, exit the su: $ exit
Secure the server
For production servers, the server should be hardened with Bastille. See C. Snyder's Hardening Checklist
for tips.
Continue preparing the server
Now that Debian is properly installed and configured, proceed with Installing pre-requisites for GForge.