I'm going to install :
- bash shell
- portmaster
- portupgrade
- portmanager
- midnight commander
- nano (although I can find my way in vi)
- sudo
- links (a text-based browser always comes in handy)
First things first: fix su for SSH access
Normally an openSSH installation does not accept a root-login for security reasons but my normal user account can't do anything without extra privileges so we're going to add marcel to the group wheel.
Login as root and add the user to the group wheel$ susu : SorryNov 9 19:46:37 beesd su: BAD SU marcel to root on /dev/ttyv0$
beesd# pw user mod marcel -G wheelYou can check if the user is added to the right groups with the following command:
groups marcel
Since the machine gets its IP address via DHCP check (ifconfig) the current IP address for connecting with SSH. Now let's try:
marcel@tuxtop:~$ ssh 192.168.1.119
The authenticity of host '192.168.1.119 (192.168.1.119)' can't be established.
RSA key fingerprint is 3a:80:ee:75:81:5d:45:55:f2:43:fc:1e:75:f2:56:2c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.119' (RSA) to the list of known hosts.
Password:
Last login: Wed Nov 9 19:35:54 2011
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 8.2-RELEASE (GENERIC) #0: Thu Feb 17 02:41:51 UTC 2011
Welcome to FreeBSD!
[...]
$ su
Password:
beesd#
Cheers !
Change the IP-address to a static address
In /etc/rc.conf find:
Change this to:ifconfig_em0="DHCP"
add:ifconfig_em0="inet 192.168.1.22 netmask 255.255.255.0"
Restart the network:defaultrouter="192.168.1.1"
# /etc/rc.d/netif restartPortsnap
Portsnap is a prerequisite to get applications installed. There are also other options like CVSup or installing via sysinstall but I'm goin to use portsnap.
FreeBSD installs applications (ports) from source. Although there are Linux-like repositories with binary packages, it is prefered to build them from source. Luckily the ports-mechanism works really easy and does not required deep knowledge of compilers, dependencies, etc..
From the FreeBSD site:
Portsnap is a system for securely distributing the FreeBSD ports tree. Approximately once an hour, a “snapshot” of the ports tree is generated, repackaged, and cryptographically signed. The resulting files are then distributed via HTTP.With these two commands we download and extract the compressed snapshot of the ports tree.
Like CVSup, Portsnap uses a pull model of updating: The packaged and signed ports trees are placed on a web server which waits passively for clients to request files. Users must either run portsnap(8) manually to download updates or set up a cron(8) job to download updates automatically on a regular basis.
For technical reasons, Portsnap does not update the “live” ports tree in /usr/ports/ directly; instead, it works via a compressed copy of the ports tree stored in /var/db/portsnap/ by default. This compressed copy is then used to update the live ports tree.
To update the ports-tree:# portsnap fetch# portsnap extract
Application installation# portsnap update
We're ready now to add the first applications to the system. First we're going to replace the C-shell with the Bash-shell.
Main steps: find the location of the port with whereis, change directory and use make install clean to compile and install the port. More info on Port installation is in the FreeBSD site.beesd# whereis bash
bash: /usr/ports/shells/bash
beesd# cd /usr/ports/shells/bash
beesd# make install clean
Often you will be ask which options to enable or install during compilation. Read this thread for more info on "silent installs".
After installation change the default to bash
beesd# chsh -s /usr/local/bin/bash rootPortmaster and portmanager are tools which are used primarily to upgrade installed ports
chsh: user information updated
beesd# chsh -s /usr/local/bin/bash marcel
chsh: user information updated
Now let's repeat the installation steps for portmaster:
# whereis portmasterInstallation of portmanager with portmaster:
portmaster: /usr/ports/ports-mgmt/portmaster
# cd /usr/ports/ports-mgmt/portmaster
# make install clean
Now rinse and repeat this with your favourite tool to install the rest of the ports.# whereis portmanager# portmaster ports-mgmt/portmanager
portmanager: /usr/ports/ports-mgmt/portmanager
No comments:
Post a Comment