Difference between revisions of "Installing Operating System"
(Created page with "Back ==FreeBSD Installation== You can go to the official site at http://www.freebsd.org/ and look at the handbook under installation or haver a look at thi...") |
(No difference)
|
Revision as of 09:25, 3 February 2012
Contents
FreeBSD Installation
You can go to the official site at http://www.freebsd.org/ and look at the handbook under installation or haver a look at this userfrendly guide: [ link removed]
The basics is that you download a ISO image and burn a bootable CD. Then you select a distribution that are downloaded with FTP. Do a lot of settings and you should have a running system within half an hour.
A few pointers and selections:
- Find wich is the latest release at freebsd.org and read about it.
- Get the latest ISO image for a boot only disk. Here is the 7.0 link: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.0/7.0-RELEASE-i386-bootonly.iso
- Burn it on a CD
- Boot on it
- Choose a standard installation
- Choose a X-USER distribution. (All the usual stuff, without any extra source code and the X windows system) even if you plan to run the server headless (Without ever using a screen or keyboard on it) It a few things easier. If you can spare about 3.5 GB, you can install the KDE graphical X-windows desktop. That's a nice user interface, if you should ever want to attach a screen to the system. But if you are pressed for space, don't. You can also choose a USER distribution and only run in text mode. That's absolutely fine and can run on less than a 200MB.
- Follow the instructions/defaults except:
- Say yes to SSH login
- use an ISO codepage if posible. KiSS uses ISO-8859-1
- Use a fixed IP address (Not DHCP)
- You might want a NFS server later.
- Make an account for your self. Make the group “staff” and the member group “wheel” (To give you root access)
Don't forget to use intelligent passwords. You can't login remotely with userid "root" So it is your userids password that is in the forefront of an attack. (You have to use the command su - to get root access)
When done, you can put the computer in the basement and do the rest from your workstation via a SSH terminal. (If your workstation is MS Windows, Putty is an excellent and free terminal program)
You can only log on to the server whith you user ID. Most installation however has to be done as root. When you are loged in, change your user to root:
su -
Korn shell
The standard sh had the advantage that its almost universal. But is is lacking in functionality. For me it fells important that it can at least show the path I'm in at the prompt, (DOS style prompt) Personally I prefer to add the Korn shell, but there are lots to choose from.
Install
FreeBSD:
pkg_add -r pdksh
Choose editor
Older Unix users usually prefer the powerful vi editor witch is always present on a unix system.. But if you are unfamiliar with it and don't wan't to learn, try edit, pico or some other available Term papers easy to use editor. (edit is now available as standart on FreeBSD)
Make global profile
After that you need to make a global profile. Here with some of my favourite settings:
edit /etc/profile # Let path include current directory export PATH=${PATH}:./ # Special override: all telnet session set to xterm if [ $TERM != cons25 ] then export TERM=xterm-color fi # Language dependtent settings export LC_CTYPE=da_DK.ISO8859-1 export lang=da_DK export charset=iso-8859-1 # Uncomment your favourite editor # export EDITOR=vi export EDITOR=edit export PAGER=more export BLOCKSIZE=K # some useful aliases alias h='fc -l' alias j=jobs alias m=$PAGER alias ls='ls -G' alias la='ls -aG' alias ll='ls -laG' alias l='ls -lG' alias g='egrep -i' export LSCOLORS=fxgxcxdxbxegedabagacad # set DOS style prompt export PS1='`pwd`>' export PS4='line $LINENO: ' # Enable emacs eg. history on command line set -o emacs
Change login shell
Now you need to change the user shell I the /etc/passwd or equivalent file
FreeBSD:
vipw Change the last entry in the line of your user id and root to the full path of your shell ex: /usr/local/bin/ksh
Now you should test it, by logging in again.
NTP client
Find a NTP time server near you, that will accept you as a client.
FreeBSD:
pkg_add -r ntp edit /etc/rc.conf Add this line: ntpdate_enable="YES"
Set NTP servers: Use the following setting or find a look for a suitable server Google.com/search?q=NTP+time+servers+stratum+list
edit /etc/ntp.conf driftfile /var/lib/ntp/ntp.drift server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server pool.ntp.org
Set the clock, first time. If the clock are more then a few minutes off (1000 secs) ntpd will not set the clock, but give you an error message instead. These options will force ntpd to set the time correctly and exit:
ntpd -gxq
from next time you boot, the ntpd will always keep the time for you.
Automatic update
It is important to keep your system up to date.. Even Unix systems have vulnerabilities.
FreeBSD:
To make the system update automaticly, you must add the freebsd-update command to the cron table ex:
crontab -e 0 4 * * * /usr/sbin/freebsd-update cron
You should choose a different time.
If you want to be informed of updates; also add this line at the top:
MAILTO="your@mail.tld"
Mail forwarding
If you don't want to run a full mail server it's a good idea to make the server forward all the mail it generates to your ISP's SMTP server (mail relaying). That way you don't have to deal with SPAM isues. Lets say your ISP's smtp server is called smtp.isp.com
Make sendmail use your ISP:
FreeBSD:
cd /etc/mail edit submit.cf ... # "Smart" relay host (may be null) DSsmtp.isp.com
make restart
You can test it by sending a mail:
sendmail you@mail.adr <write some text> <end with a new line + "." + [enter]>
When the mail are recieved, check the message header to se that it wat routed right. If you have problems; have a look in /var/log/maillog
--SR 13:30, 5 March 2008 (CET)
- Check this out..Best site for quality essay writings, term paper, research paper, course work, book report and resume writing. All writing services are guaranteed written by professional writers.