Saturday, 11 March 2017

How to Compile & Install TAR BALL in Ubuntu Linux

1 unzip the tarball:

Create a folder where you will unpack the tarball,
mkdir <FolderName>
Copy the tarball to
the cp <source_file>> <destination folder>
Directly razarhiviruem in folder:
tat xfzv <Imya_tarbola> 
- Decompression of archives such as tgz and tar.gz
tat xfjv <Imya_tarbola>
- Decompression of archives and type tbz
Unzipped files in the current folder (for working with archives are very convenient to use Midnight Commander - MC - free clone NC)
Go to the folder with the uncompressed tarball
cd _Imya_papki_

2 configuration package

(In severe cases will need to be in the parameters to specify the path for all required libraries and header-files - but fortunately, usually at close systems, they are the same and he configure script finds them, as these options have required if the package will be stationed in the wrong place where supposed developer program, and in any other)

3 Create a package:


4 Install the package

make install 
(The last stage can be theoretically done and manually copying the files in the right places), I wish to emphasize that this is the most dangerous stage - it is desirable to take care of to him about how to restore the old package, if there is a new error.

7.2 Installing the programs from sortsy (.src.rpm)

Programmers create software project (eg via Kdevelop), it contains all the configuration files and the makefile (configure), and then pack them into tarballs. In the case of package improvements are Patch-and to the source code that replace one string of text to other programs. Tarball and applies to them and patch-packed in bags, sortsy (.SRC.RPM) (there are also other packages on your system - but I'm talking about the distributions based on RPM - Red Hat, Mandrake, SuSe ). RPM-package - a very organized archive, which in addition to the data (tarballs and patches - for raw sugar, the necessary programs - for binary RPM) are packaged scripts to install and update. 

C using sortsy can create a binary RPM - ie such RPM, which packed executable packages. Moreover, if the RPM is created on the current machine, it theoretically would be the best way to approach the current configuration package (which is why many administrators the most important packages are collected from a raw again in his car).

 As a result, the installation sortsa- the directory / usr / src / RPM / source placed all the tarballs (usually one) and patches (there may be many, and perhaps more than one - it all depends on the developer and originator of a particular RPM). - The directory / usr / src / RPM / spec fit installation script (extension spec file) in which the developer RPM puts all the steps to install the package - uncompress tarballs, overlapping patches, broadcasting, etc. Developed many macros for spec-files. With most of them old and the general theory of their construction as well as the rpm command options can be found in the RPM-the HOWTO .

 When building the package, all operations with source code programs are usually (but not always) be placed in / usr / src / RPM / builder , and new received packets (new, raw and new binary) are placed, respectively, in / usr / src / RPM / RPMS and / usr / src / RPM / SRPMS. Get a set of sortsy appropriate package with the command

rpm -ba packet ..... spec

7.3 Installing software packages from .RPM

The distributions of Red Hat, Mandrake, Suse, AltLinux, ASP Linux and some other program (consisting usually of several files) are distributed in RPM format combined packages (RedHat Packet Manager).

 Rpm With this program you can easily install, modify, delete, and create software packages, as well as receive a variety of information about them. All these distributions (except for the initial setup program) consist of such packets.

 Each package is determined by the name of the program, its version number and the version number of the release of this distribution program, as well as the architecture of the package. For example, bash-2.0.5-alt2.i586.rpm: in this package
  • name - bash,
  • version - 2.0.5
  • release number - alt2,
  • Architecture - i586.
The higher version number (or the same version number - the more the release number), so, consequently, the newer package. Manage packages from the command line using the rpm program, which has the following syntax:
rpm -options rpm_package_name
The following are the possible options.

Installation package.

You can install the program using the -i option (option -v and -h exhibited here to enable visualization of the installation process). For example, to install Klyx, type:

rpm -ivh klyx-0.10.9-ipl6mdk.i586.rpm

Update package.

In order to update the program (to install a more recent version), you must use the option -U instead of -i, it will save all of the current configuration files. If the packet was not previously in the system, it will be installed.

Deleting package.

If you want to remove the package from the system, enter carefully:
# Rpm -e imya_paketa_bez_nomera_versii_i_reliza 
that is, for example, for klyx package:
# Rpm -e klyx
If during removal of the package dependencies violation happen, the rpm program will inform about it.

Package information.

You can ask the rpm range of useful information about the package without installing it - for example, it is convenient to view a list of all the files in the package, or a brief description of its capabilities. To do this, use the -q option (query, query). -qi used to obtain some information about those packages before installing; 

-qip used to have not yet installed packages. In this case, you must specify the full path and name of the package (for example, /mnt/cdrom/Mandrake/RPMS/klyx-0.10.9-ipl6mdk.i586.rpm); -ql used to view the list of files in the package. Add p, if the package has not yet been set; -qa gives a list of all installed packages (do not need to specify the name of the package).

Be careful with the --force option - it can be used only in those cases when you know very well what you are doing.

If you need to install two or more packages dependent on each other, set them at the same time:

# Rpm -ihv foo-1.1-3mdk.rpm libfoo-1.5-2mdk.rpm

It is often more convenient, however, to use a program specially created for this distribution, for example, rpmdrake, developed by MandrakeSoft, kpackage of KDE, gnorpm from GNOME or apt system (AltLinux).

 The distributions, Mandrake easier to manage related packages via GUI rpmdrake, which can be run through DrakConf control panel (located on the desktop). You can select two modes of operation - installation or removal - using the buttons in the upper right corner. Highlighting the package, you can get information about it, within its set of files, as well as some others. By clicking on "Remove Selected" or "Install Selected", you can remove or install the selected packages. 

It often happens that the required package for the proper functioning requires the other; In this case, the program will prompt you to install or remove a few packages. When removing packages must be careful not to delete important parts of the system, such as the packages kernel or glibc. To use the service packs you must specify the program through the menu File | Preferences additional source packages, which can be a resource as the Internet and a local directory or a CD-ROM. 

The installation package is very convenient to carry and use the console program urpmi - with the difference that all actions will be carried out at least visually. To install the packages, supplied ALT Linux Team, you can even run urpmi program is not the superuser, and as a regular user; the only thing you need to do for this? urpmi add it to the group. For more information, type man rpm.


No comments:

Post a Comment