Unix - Advanced Concepts - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Unix - Advanced Concepts

Description:

Is used to mount (connect) a partition on a local hard drive to ... linux - disk druid or fdisk. Create file system on new partition. sun - newfs. linux - mkfs ... – PowerPoint PPT presentation

Number of Views:123
Avg rating:3.0/5.0
Slides: 20
Provided by: stank6
Learn more at: http://crab.rutgers.edu
Category:

less

Transcript and Presenter's Notes

Title: Unix - Advanced Concepts


1
Unix - Advanced Concepts
  • System Administration

15
2
More File Systems
3
Mount
  • Is used to mount (connect) a partition on a local
    hard drive to your unix file system (local).
  • Can be used to connect a servers partition to
    your local client for access
  • (client/server networking).
  • A mapping process

4
Mount Commands
  • mount
  • see what is currently mounted
  • mount -t type /dev/hda1 /mnt
  • where "type" is either nfs (over network,
    client/server) or ext3 (for local hard drive
    partition linux native) "/dev/hda1" is the
    physical partition on the given hard drive /mnt
    is the empty directory (mount point) where the
    partition
  • is mount to
  • Note- ext3/ext2 is a type of UFS (unix file
    system) used by linux

5
For Example
  • mount -t ext2 /dev/hda4 /home
  • mount the home directory on /dev/hda4 to the
    location /home (local mounting)

6
Over a Network
  • Server
  • Share directory to be accessed by clients
    (share command)
  • Client
  • mkdir /usr/local
  • create empty directory, a mount point
  • mount -t nfs server1/usr/local /usr/local
  • mount, over the network (nfs) from the server
    called "server1",mount its /usr/local partition
    onto the client at the same location.
  • umount /home
  • un mount a partition
  • Note - all file systems normally mount up, at
    boot time, via the /etc/fstab (/etc/vfstab) file

7
Adding a New Disk Drive
  • Partition and format the new drive
  • sun - format
  • linux - disk druid or fdisk
  • Create file system on new partition
  • sun - newfs
  • linux - mkfs
  • Mount partitions via mount command or at bootup
    via
  • sun - /etc/vfstab
  • linux - /etc/fstab

8
fsck - file system check
  • Tool to check and fix a file
  • system
  • Automatically attempts to fix
  • things, if file system is corrupted.
  • You can fun this manually...and it also runs
    automatically at boot time if the system was not
    cleanly shutdown.

9
Install Software
10
Compressed Files
  • 2-1 ratio
  • file --gt file.gz
  • Use zip/gzip to compress, and unzip/gunzip to
    uncompress

11
Tar
  • Archive format
  • Gathers many directories/files
  • into one single tape or onto one single file
    (called a tar file or tarball).
  • Also saves group/ownership/permission info and
    date info for each file/directory.

12
Examples of Tar
  • tar -tvf file.tar
  • This takes a tar file (file.tar) and shows the
    table of contents of the file (-t option) in a
    verbose (-v option) way.
  • tar -xvf file.tar
  • This will extract all file/directories from the
    above tar file, into the current directory. (-x
    extract -v verbose).
  • Permissions ownership/group will be set
    correctly.
  • (untar)
  • tar -cvf file.tar directory-name
  • The entire contents of the given directory, and
    everything in it, will be copied into the tar
    file (file.tar) including permissions/ownership/gr
    oup. (-c create -v verbose)

13
  • Thus when you install software, it often comes in
    a compressed tarball. Something like
    "file.tar.gz". Thus you need to first uncompress
    the file and then untar it.
  • gunzip file.tar.gz
  • Creates the file file.tar)
  • tar -xvf file.tar
  • This extracts all the software)
  • Note- make sure to do the above in the correct
    location on the system.

14
Other Methods to Install Software
  • sun - pkgadd/pkgrm
  • install/remove scripts
  • linux - rpm
  • red hat package manager
  • Note- when done installing software, always check
    ownership/group/permissions and also test to make
    sure it works correctly (not just as root).

15
Source Code
  • When the software you get is just source code,
    and not binaries, you will have to compile it
    first to get the binaries created and installed.
    Typical set of steps
  • read README file and other docs
  • Often have a Makefile that may need adjustment
    (edit)
  • May have a command called "./configure" to create
    a Makefile for you.
  • ./make
  • run the Makefile, this will compile, link and
    create the binaries from the source code
  • ./make install
  • copies all binaries to final location on the
    system

16
Install O.S. Patches
17
Linux
  • "patch" program, to add patches
  • to linux source code
  • Then build a new kernel
  • (compile linux source code)
  • Install new kernel into /boot/vmlinuz-2.0.xxx

18
Solaris
  • patchadd 106751.tar.gz
  • patchrm
  • Easy scripts to add/remove patches.
  • Patches for solaris come in a compressed/zipped
    and tar format.
  • No need to build (compile source code ) a new
    kernel.

19
THE END!!
Write a Comment
User Comments (0)
About PowerShow.com