install software. unix shell the unix/linux shell is a program important part of a unix system....

18
Install Software

Upload: cameron-griffin

Post on 31-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Install Software

Page 2: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

UNIX Shell

•The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running when you log interprets the commands that you type. Before runs commands, determines whether

cmd is

Page 3: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

What a UNIX/LINUX shell•Al shells derive many of their features from

the Bourne shell, or /bin/sh•Every Unix system needs the Bourne shell to

function correctly•bash is the default shell for most Linux

distributionsWhen a user is created, many startup files are

placed in their home directory: .bash_logout, .bash_profile, .bashrc...

Page 4: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Compress file•gzip(gunzip), bzip2 (bunzip2) ,zip (unzip) : •compress and replace

▫ gzip(bzip2) mydata.doc▫ zip mydata.zip mydata.doc

• tar: archiving, support gzip(-z) & bzip2 (-j)▫ archiving: tar -cvfmyarchive.tar mydirectory/▫ de-archiving: tar -xvfmyarchive.tar

mydirectory/▫ combine with gzip

compress: tar -zcvfpics.tar.gz *.jpg decompress: tar -zxvfpics.tar.gz

Page 5: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Compress File•gzip(gunzip), bzip2 (bunzip2) ,zip (unzip)

: compress and replace▫ gzip(bzip2) mydata.doc▫ zip mydata.zipmydata.doc

•tar: archiving, support gzip(-z) & bzip2 (-j)▫ archiving: tar -cvfmyarchive.tarmydirectory/▫ de-archiving: tar -

xvfmyarchive.tarmydirectory/▫ combine with gzip▫ compress: tar -zcvfpics.tar.gz*.jpg ▫ decompress: tar -zxvfpics.tar.gz

Page 6: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Installing Software

•Sources:•■ Tucows http://linux.tucows.com•■ Freshmeat http://www.freshmeat.net•■ Linux Online

http://www.linux.org/apps•...•Verifying Your Downloads

Page 7: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Installing Software Packages (RPM)•■ Install new packages•■ Update existing packages•■ Verify package files•■ Query installed packages•■ Uninstall packages

Page 8: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

A sample RPM

Page 9: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

A sample RPM• ■ Package.• ■ Version Number: 7.0.5.• ■ Release Number : 15.• The designators include:• ■ fcx Specifies that the package is intended for Fedora

Core version x. For • example, fc4 indicates the package is for Fedora Core 4.• ■ rhlx Specifies that the package is intended for Red

Hat Linux version x.• ■ susexxx Specifies that the package is intended for

SUSE Linux • version xxx. For example, Fedora Core 10

Page 10: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

A sample RPM• ■ Architecture Type This part of the file name

specifies the CPU ▫■ i386 Specifies that the software will run on an

Intel 80386 or later CPU.▫■ i686 Specifies that the software will run on an

Intel Pentium II or ▫ later CPU.▫■ athlon Specifies that the software is intended to

run on an AMD Athlon CPU.▫■ ppc Specifies that the software is intended to run

on the PowerPC CPU.▫■ noarch Specifies that the package is not

architecture-dependent.

Page 11: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

From .rpm packages

•Installing and upgrading,remove▫ rpm –i(U) software-2.3.4.rpm▫ rpm –e software

•Querying the RPM database▫ rpm -q software▫ rpm -qa //list all package▫ rpm -qa| grepkde

Page 12: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Querying Packages-# rpm -q [options]

•rpm -q▫■ –i rpm –qi postfix command has been

issued▫installed on the system.▫■ --whatrequires

rpm –q –whatrequires postfix▫■ –l This option displays a list of files that

are included in an RPM package.▫■ --provides This option displays the

functionality the specified package supplies.

Page 13: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Querying Packages-• • -qa — Lists all installed packages. • • -qf file — Lists the package that owns file.

(The file must include the full path name or rpm assumes the current directory.)

• • -qi package — Lists lots of information about a package.000

• • -qR package — Lists components (such as libraries and commands) that package depends on.

• • -ql package — Lists all the files contained in package.

Page 14: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Querying Packages-

•• -qd package — Lists all documentation files that come in package.

•• -qc package — Lists all configuration files that come in package.

•• -qp [option] package — Query packages that are not yet installed. Using this option, along with other query options, allows you to query packages you have that are not yet installed.

Page 15: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Verifying rpm package integrity

Page 16: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Installing Software from Source Code

•■ Preparing the installation files▫./configure

•■ Compiling the executable: convert the •text-based source code into a binary

executable file by C compiler (such as gcc)▫make

•■ Installing the executable▫make instal

Page 17: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Running yum to download and install RPMs

Page 18: Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running

Using yum to install packages locally