Unix/linux System Management Technical Manual Read (10)

Source: Internet
Author: User
Tags unpack

2016.11.4 9:30-10:15

Adding new software

If you do need to install additional software, your first need to determine the canonical name of the relevant software PAC Kage. For example, you ' d need to translate "I want to install locate" to "I need to install the findutils pack Age, "or translate" I need named"to" I had to install BIND. " A variety of System-specific indexes on the web can help with this, but Google is usually just as effective. For example, the A search for "Locate command" takes the directly to several relevant discussions. If you're on a UNIX system, throw in the name of the operating system as well.

1.12.2 Add new software

If additional software needs to be installed, first determine the standard name of the relevant package. For example, you need to transfer "I want to locate" to "I need to install findutils Package" or "I want to named" to "I must install bind". Various system-specific indexes on the Web can help with conversions, but Google is usually more effective. For example, searching for the "Locate command" allows you to directly find a number of related discussions. If it is on a UNIX system, you also need to enter the name of the operating system.

Once know the name of the relevant software, you can download and install it. The complete installation are usually a single command on Linux systems and on Solaris systems, that has pkgutil i Nstalled. For HP-UX and AIX you'll have to download either a prebuilt binary package or the project ' s original source code. If the latter, try to locate the project's official web page through Google and download the source code from one of the P Roject ' s mirrors.

once you know the exact name of the relevant software, you can download and install it. On Linux and the Solaris system where Pkutil is installed, the entire installation process is usually done with one command, and for HP-UX and AIX, either download the precompiled binary package or download the project's source code. If the latter, you need to locate the project's official website via Google, and then download the source code from one of the project's mirror sites.

The following examples show the installation of the wget command on each ofour example systems. It ' s a nifty GNU utility that turns HTTP and FTP downloads to atomic commands-very useful for scripting. wget is installed by default on each of our example Linux systems, but the commands shown below can be used for B Oth initial installation and later updates.

Ubuntu uses APT, the Debian Advanced package Tool:

ubuntu# apt-get Install wget


The SUSE version is

suse# yast--install wget


The Red Hat version is

redhat# Yum Install wget


On a Solaris system with Pkutil already installed (see blastwave.org For instructions on setting this up )

solaris# /opt/csw/bin/pkgutil--install wget

<multiple pages of output as seven packages is installed>


for HP-UX, we found an appropriate binary package on hpux.connect.org.uk and

Downloaded it to the/tmp directory. The commands to unpack and install it were

hpux# gunzip/tmp/wget-1.11.4-hppa-11.31.depot.gz

hpux# swinstall-s/tmp/wget-1.11.4-hppa-11.31.depot wget

The following example shows the installation of the wget command on each of our sample systems. It's a great GNU tool that makes HTTP and FTP downloads into a single command---useful for scripting. Each of our Linux systems has wgetinstalled by default, but the commands given below are used to initialize the installation and subsequent upgrades.

The package depot to the swinstall command line must is specified as a full path starting with/; Otherwise, Swinstall tries to find the file on the network. The wget at the end tells Swinstall which package to install from within the depot file.

The Depot package that appears in the SWINSTALLW field must have the full path of/start, otherwise, Swinstall will find the file on the network. The final wget tells Swinstall which package to install from the depot file.

Unfortunately, the installation is not a really as easy as it first appears. The installed

Version of Wget won ' t actually run because several of the libraries on which it depends has not been installed:

hpux$ wget http://samba.org/samba/docs/Samba3-HOWTO.pdf

/usr/lib/dld.sl:can ' t open Shared library:/USR/LOCAL/LIB/LIBCRYPTO.SL

/usr/lib/dld.sl:no such file or directory

[HP ARIES32]: Core file for + bit PA-RISC application

[HP ARIES32]:/usr/local/bin/wget saved To/tmp/core.wget.

Unfortunately, this installation is not as simple as it seems at first glance. The loaded version of wget is not actually running because it does not have several libraries that it relies on.

Swinstall does has some dependency management built in, and its abilities unfortunately does not extend to Internet reposit Ories. You'll have to read the fine print and install all the appropriate prerequisite packages (in this case, six more) to make Things right.

Swinstall has a built-in dependency management mechanism, but unfortunately, it does not extend to software repositories on the Internet. Users have to follow the prompts to install preinstalled packages (6 in this case) to reach the final directory.


Building software from source code

There is in fact at least one binary wget package available for AIX in RPM format. A Google search for "Aix wget rpm" Should turn up some good leads. After downloading, the installation command would is a simple

aix# rpm--install wget-1.11.4-1.aix5.1.ppc.rpm

1.12.3 compiling software from source code

In fact, there is a wget binary package available for AIX, which is in RPM format. Searching for "Aix wget rpm" With Google should help you find some good clues. After downloading the download, the installation command is simple

aix# rpm--install wget-1.11.4-1.aix5.1.ppc.rpm

But just to illustration, let's build the AIX version of wget from the original source code.

but to demonstrate, we started compiling the AIX version of wgetfrom the source code.

Our first chore are to find the code, but that's easy:the first Google result for "wget"

Takes us right to the project page at GNU, and the source tarball is just a link away.

After downloading the current version into the/tmp directory, we unpack, configure, build, and install it:

aix# cd/tmp; gunzip wget-1.11.4.tar.gz

aix# tar xfp wget-1.11.4.tar

aix# CD wget-1.11.4

aix# ./configure--disable-ssl--disable-nls # See comments below

Configure:configuring for GNU Wget 1.11.4

Checking build system Type ... Rs6000-ibm-aix

...

Config.status:creating src/config.h

config.status:executing default Commands

Generating po/potfiles from./po/potfiles.in

Creating Po/makefile

aix# Make

<several pages of compilation output>

aix# make Install

<about a page of output>

our first task was to find the code, which was easy: the first result of Google's search for "wget" was just to point us to the GNU Wget Project, and then click to find the source code tar package. The anti-current version of the code is downloaded to the/tmp directory, then unpacked, configured and installed:

This configure/make/make install sequence are common to the majority of UNIX and Linux software and works on all s Ystems as long as you had the development environment and any package-specific prerequisites installed. However, it's always a good idea to check the package's INSTALL or README file for specifics.

for most Unix and Linux software, you can execute the configure/make/make install Three command sequentially, as long as you have installed the development environment and pre-requested packages, you will get results. However, it's a good idea to check the package's install or readme file to see what's special about the software.

The --disable-ssl and--disable-nls options to configure omit some wget features That's depend on other libraries that haven ' t been installed. In real life, you ' d probably want to install the prerequisites. Use Configure--help to see all the configuration options. Another useful Configure option is --prefix=directory, which lets you put the software somewhere other T Han /usr/local.

in this example, the two options for theconfigure command --disable-ssl and --disable-nls omit some of the features of wget , These attributes depend on other libraries that are not yet installed. In practice, users may want to install those libraries that require pre-installed. Use confiugre--help to view all configuration options. Another useful configuration option is --perfix=directory, which installs the software in a directory other than /usr/local .


This article is from the "Zhao Dongwei blog" blog, make sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1869234

Unix/linux System Management Technical Manual Read (10)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.