Advanced Operating Systems - PowerPoint PPT Presentation

Loading...

PPT – Advanced Operating Systems PowerPoint presentation | free to view - id: 5aeba-NzIwO



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Advanced Operating Systems

Description:

Advanced Operating Systems – PowerPoint PPT presentation

Number of Views:99
Avg rating:3.0/5.0
Slides: 33
Provided by: tihe
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Advanced Operating Systems


1
Advanced Operating Systems
Tonga Institute of Higher Education
Lecture 4 Installation and Installing Programs
2
Installation in Linux
  • There are many different versions of Linux.
    Unlike other commercial operating systems that
    are controlled by one company, Linux is free to
    distribute and use.
  • So, in the Linux world, there is a situation
    unlike what occurs in the proprietary operating
    system world a number of companies,
    organizations and individuals have developed
    their own "versions" of the Linux operating
    system, known as distributions.
  • There are versions of Linux that were developed
    to be installed on computers that receive heavy
    traffic. Some were developed to be used in
    networks were security is a priority. There are
    versions of Linux that are meant to be installed
    on top of an existing operating system like
    Windows so people can try out Linux under
    familiar conditions.

3
Which Linux is the best?
  • Most PC users probably just need the everyday
    version. This kind of Linux has been widely
    available for some time now.
  • Unfortunately Microsoft Corp., who makes its
    living selling people "ordinary" operating
    systems, have a lot to lose if Linux ever got
    popular with the masses. For this reason they
    have done everything in their power to "warn" the
    public that Linux is something that you probably
    don't want and don't need. But in reality, Linux
    is just as easily installed and supports just as
    wide a range of hardware as Microsoft Windows
    does.

4
Which Linux is the Best?
  • Of all the distributions out there, and there are
    a lot, the most popular ones, with the easiest
    installation and maintenance are RedHat, SuSE,
    and Debian.
  • RedHat Linux is probably the most popular and
    they have been the most successful. You can
    download their 'Personal' version for free from
    their website.
  • They also have an 'Advanced Server' which costs
    around 500-1000 US, but Linux is Linux and
    you'll be able to do anything you need with the
    'Personal Edition'

5
The Install
  • There are a couple of questions you need to ask
    yourself.
  • 1. Do you have another operating system
    installed.
  • 2. Do you want to continue to use it.
  • If you want to keep an existing operating system,
    and install Linux as well, you will have what is
    known as a "dual-boot" system.
  • That means that you have a PC that can use two
    different operating systems. The important thing
    is that you have the option to have both.

6
Dual-booting
  • To have to operating systems on your computer,
    you'll need two partitions at least.
  • If you happen to have MS Windows you must
    repartition your hard drive to make room for
    Linux.
  • You can either erase the drive and repartition a
    blank drive or you can attempt to repartition a
    working hard drive. Ideally, what was done in the
    "old" days was to install Windows in C and Linux
    in the D partitions.
  • There are programs that can help you repartition
    a hard drive that only has one partition, but
    sometimes this might be dangerous

7
Installing
  • If you have the right partitions, then you can
    pop in the CD you have and boot up your computer.
  • Your computer probably supports booting from the
    CD-ROM. In this case, Linux installer will start
    right up
  • Sometimes, a CD-ROM will not install from booting
    and you'll need a boot disk. The CD-ROM will
    usually contain a way on the disc on how to make
    a floppy boot disk.
  • Once you've made this boot disk, you'll be able
    to boot up the CD-ROM

8
Partitioning
  • Your hard disk is like a pie. You can divide it
    into sections. For example, if you had two
    partitions, popular operating systems would
    generally call them C and D. You can call them
    whatever you want
  • Linux doesn't use them, though. Linux may call
    them /hda3 and /hda5 for example.
  • You will also need another partition known as a
    'swap' partition. This 'swap' partition is just a
    way that Linux uses to get more memory so that
    you don't run out of it.

9
Partitioning
  • The classic way of partitioning your hard disk is
    with a program called 'fdisk'. This is the
    dangerous way to do it. The re-partioning using
    this method will get rid of everything forever
  • But installing Linux isn't dangerous. If you're
    fortunate enough to have a hard drive with more
    than one partition (the old C and D routine),
    then it may be just a question of moving some
    files around.
  • If you didn't have two partitions already made,
    then there's a tool called FIPS that comes with
    major Linux versions. This will re-arrange your
    hard drive so you can install Linux. There are
    also other programs you can download that will do
    the same and help you move things around and make
    new partitions.

10
More partitioning
  • Now that you have the CD in the computer and you
    have a place to put Linux, the installation will
    ask you to further repartition the hard drive.
  • This is because Linux puts different pieces on
    different parts of a hard drive (in different
    partitions).
  • There are generally four or five partitions that
    you will need for sure.
  • These are the swap partition, root, home and usr

11
More partitioning
  • Let's take a 10 gigabyte hard drive as an
    example. First, you should see how much RAM you
    have. From this figure, you create what's known
    as a SWAP partition. This is simply a way that
    Linux uses to get an extra memory boost. Usually,
    your swap partition should be double your RAM
    memory. So if you've got 256 megabytes of RAM,
    the feel free to make a 500 megabyte swap
    partition.
  • Then the partitioning ends up looking like this
  • Partition Location Size
  • swap /dev/hda2 500 mb
  • / (boot) /dev/hda1 1.2 gb
  • /usr /dev/hda3 3.5 gb
  • /home /dev/hda4 5 gb

12
More Partitioning
  • Assign partitions to look like this. You must
    indicate here that you want / to be the bootable
    partition. /usr will contain most of the programs
    that will run on your machine. /home will contain
    your personal files. This kind of a partition
    scheme may come in handy if you have problems
    with your hard disk. You may be able to save
    information if it's located in different
    partitions easier than if it were only one big
    partition.
  • Before we actually assign the other partitions
    their places and functions, we need to initialize
    and activate a the swap partition.
  • After, you should initialize the / partition -
    the one that will boot the Linux kernel.

13
Partitioning
  • Different distributions will ask for different
    partitions as well that will serve different
    purposes.
  • The best rule is to give enough space to the
    different parts for your type of system
  • For example, if you will have many users on a
    system, you will want to give more space to the
    /home partition, because your users will all have
    space in the home directory
  • If you want to have a lot of programs, give more
    space to the /usr partition
  • Most of the time, the distribution will choose
    sizes for you and these sizes are generally
    pretty good

14
The rest of installation
  • At this point you should have your hard drive
    partitioned and these partitions assigned to what
    areas they'll be housing.
  • Now, comes the point in the process to install
    the Linux kernel. You can choose additional parts
    to add to the kernel, known as modules, to better
    use your hardware. Unless you need something
    specific, the installation program will choose
    the correct ones you need
  • Next, you'll have to choose a 'hostname' or name
    for your computer. Use whatever name you want for
    the computer. After, you should choose a 'domain'
    name. Even if your not running an Internet server
    and even if you don't have a network you should
    choose a name as if you had one. Normally if you
    were in fact a server providing Internet
    services, you would choose a name and append
    .com, .net etc on the end. Example yahoo.com,
    google.com

15
Making it bootable
  • Now, as we're installing from a CD, you should
    choose 'CD-Rom' for the installation procedure.
    You should also choose the settings 'make system
    bootable'.
  • Your hard disk is basically a piece of metal with
    a metal disk flying around in it at incredible
    speeds. It essentially does nothing unless you
    tell it to do. At this point, we're going to tell
    it to boot up the Linux operating system.
  • If you have a dual-boot system, you can also tell
    it to ask you to choose from different operating
    systems at boot.
  • These are programs called Boot Loaders. One good
    one is 'LILO'. Later, you can actually make
    alternative versions of the Linux kernel and have
    LILO boot them.

16
Adding packages
  • Different distributions will have different
    orders for their installations. At this point,
    most will ask for what packages you want
    installed on the system
  • Packages are just programs that will run on your
    computer. They could be web browsers, web
    servers, Gnome or KDE.
  • Often there will be guidelines for what kind of
    computer you want, Server, Workstation or
    Desktop. Each will give you a different
    configuration for packages
  • If you have a lot of harddrive space, you can
    install everything and not worry about what you
    might need in the future
  • If you're short on space, you can choose the
    minimalist package. We'll go into what programs
    you'll need for what kind of computers later on.

17
Choose Passwords
  • You'll be asked for a root password at some
    point.
  • The root user, you'll remember, is the superuser,
    the most important user who can do anything they
    want.
  • So you don't want anyone else to be able to guess
    the password or else they can do whatever they
    want to your computer.
  • A good password will have numbers and letters and
    special characters (,.gtlt!_at_). People can
    also use password crackers and these will make a
    brute force attempt to guess your password, but
    if you use numbers, letters and special
    characters, it will be very hard to guess

18
Other installation issues
  • The rest of the installation is pretty simple,
    but sometimes things go wrong when the software
    tries to detect hardware.
  • Most distributions will have a long list of
    hardware device drivers they use to get the
    operating system to talk to the hardware.
  • Sometimes it doesn't have the right hardware or
    it can decide what hardware you actually have.
  • In this case, your best bet is too choose
    manually what you have from a list. If it's not
    on the list, then choose the most generic form.
  • For example, if you have a monitor but can't find
    it on the list, look for Generic VGA 800x600.
    Most likely it will work and then you can search
    online later to find the correct driver

19
The end of installation
  • Now you have installed Linux. Remove the CD and
    reboot the computer. When it starts up again
    you'll be able to choose which operating system
    (if you have more than one) and you'll see a
    login screen. That's where you type in the root
    username and password.
  • What to do after that?
  • That's what we'll be focusing on for the rest of
    the classes.

20
Installing new programs
  • So you finished installing Linux, but what
    happens when you need to get a new program or you
    need to update an existing program?
  • Installing programs on Linux is sometimes very
    easy and sometimes painfully difficult.
  • The first objective is to find the program on the
    internet. The best bet is to search with
    google.com to find what you need.
  • Other sites that also have a lot of Linux
    software are
  • http//www.linux.org
  • http//www.sourceforge.net
  • http//rpmfind.net
  • http//www.ibiblio.org

21
Installing new programs
  • There are two ways to install a new program on
    your system.
  • You can download the source code and compile it
  • Or, you can download a binary package.
    Different distributions use different types of
    systems. Redhat and SuSE will use what is called
    an rpm file. This is like a program all bundled
    up into one file and then you just need to run a
    command and it will install on your system
  • Of course sometimes things aren't that easy.

22
The easy way RPMs
  • RPM stands for RPM package manager. It's a way to
    download, install, verify and update packages on
    a system.
  • Each software package consists of an archive of
    files along with information about the package
    like its version, a description, and the like.
  • When you go to get a RPM from a website (like
    http//www.rpmfind.net) you'll want to look for
    the one that most closely matches your system.
  • For example, if you have RedHat 9.0 installed and
    you want a rpm for a package but can't find one
    made for RedHat 9.0, choose the one that says
    RedHat 8.0 or RedHat 7.2. This is because the rpm
    will put files in different places that it thinks
    the system follows.

23
The easy way RPM
  • Now that you've downloaded your rpm package for
    your system, time to install it
  • For example, if the name of the package you
    downloaded is called mozilla.rpm, to install it,
    we'd type into the shell
  • rpm -U mozilla.rpm
  • The -U stands for upgrade, which is the safest
    way to do it. You can also try
  • rpm -i mozilla.rpm
  • This will install the program, but generally does
    not work as well as the -U

24
Problems with RPMs
  • Unfortunately, RPMs aren't always so easy.
  • The thing about RPMs is that they might assume
    you have other files and programs already
    installed on your computer.
  • So sometimes when you try to install, you'll see
    stuff like this
  • root_at_usp root rpm -U bittorrent-3.2.1b
  • error Failed dependencies
  • python-base gt 2.2 is needed by bittorrent
  • This means that you need the program called
    python-base (and a better version that 2.2)
    before you can install the program called
    bittorrent.
  • So what can you do? Begin the search for other
    files

25
More RPMs
  • Sometimes you'll be led on a wild chase to find
    all the packages. Because when you go for the
    package that is missing, sometimes that package
    will also need other programs. It can be a big
    headache.
  • The other downside about RPMs is that they put
    files and programs in places where maybe you
    don't want them.
  • You won't always know where they go, and they
    might overwrite files that you think are
    important.
  • So there is another way, luckily for us.

26
Installing from source
  • So we don't RPMs, and a lot of the time we won't
    be able to find one, so the other option is to
    download the source code of the program and to
    compile the program ourselves. This is actually
    not as hard as it sounds
  • So now you'll download the source code and it
    will usually be in one of 3 formats, .gz, .zip or
    .bz2
  • These are all compression formats used to make
    the files smaller so it's easier to download.

27
The first step Decompressing
  • So the first step we need to do after downloading
    is to decompress the file.
  • If it ends in .tar.gz this means it's gzipped
    and put together with tar. Tar is a program that
    puts directories and many files together into one
    file. Then gzip is a way to decompress files
  • We can decompress in one small simple step
  • tar zxvf kxine-0.4.tar.gz
  • The 'z' says first decompress. The 'x' says to
    expand the tar file. The 'v' says to output any
    messages and the 'f' says use the file that
    you're going to type after

28
Other Compressions
  • If you get a file that ends in '.bz2' you'll use
    the bunzip2 program. Bunzip is a good
    compression, better than even gzip
  • bunzip2 kxine-0.4.2.bz2
  • The last format you will probably see is the
    '.zip' format. This is the compression used on
    most Windows machines. You can also use it with
    Linux
  • unzip kxine-0.4.2.zip
  • Now you'll have a folder with the source files
    and you'll be ready to compile

29
Installing from source
  • After decompressing, you'll need to change into
    the new directory with the files. For example,
  • cd kxine-0.4.2
  • Now the best thing to do is to open the README or
    the INSTALL file. Usually there will be one or
    the other. These will tell you the exact steps to
    take to compile and install.
  • Most programs today will follow a general
    guideline of steps that most other programs
    follow.
  • With these steps, things are pretty easy.

30
Compiling
  • In all likelihood, the INSTALL or README file
    will tell you do to the following.
  • root_at_usp root ./configure
  • root_at_usp root make
  • root_at_usp root make test
  • root_at_usp root make install
  • The configure says to run a little program that
    will check your system for everything it needs
    and where to find it. If configure runs and it's
    all good, then you can type make
  • make is a program used to compile other programs.
    So now you will see a lot of output where the
    computer is compiling
  • make test will make sure it compiled correctly
  • make install will put the program in the right
    place

31
Installing from source
  • When you install from source, there are
    potentially many more things that can go wrong.
    Sometimes the configure program will tell you
    what's wrong and how to fix it.
  • If you get a compiler error though, it means that
    the program was not able to find everything it
    needed. In that case, it's best to give up and
    look for another program that will do the same
    thing.
  • Unless you really need that program, dealing with
    compiler errors is more of a headache then it's
    worth

32
Summary
  • Installation with most Linux distributions is
    very easy these days. Using RedHat 9.0, it's very
    simple, just follow the steps, and you'll be on
    your way to using Linux in no time
  • Installing programs is getting easier, but there
    still can be lots of problems if something on
    your system is missing or it's in a place that is
    not expected.
  • It can be quite time consuming and difficult to
    get programs to compile and install when they
    don't work right away, but usually there are 3 or
    4 other programs that will do the same thing in
    Linux.
About PowerShow.com