Senin, 18 Maret 2013

Install tar.gz / tar.bz2 in Linux

Tar.gz file type or tar.bz2, is a type of file that may be common in linux. This file type is actually one type of file compression like zip, rar, 7z or another. In Linux, this file type can be used to package or compress a ready-made binary files or files that require compiling source code first so that we can use the application.

For beginner Linux users, see this file may be a fairly confusing because when viewed from the distribution used for example from Ubuntu deb packaging system-based applications such as Debian or OpenSuSE an application-based packaging system like redhat rpm will be different treatment method.

In general, type tar.gz file can contain source code of an application binary file which is compressed in order to stay put but it is easy to distribute, or a collection of files that are compressed so the file management easier and save on storage media. In this paper, to be discussed is the type tar.gz file containing the source code or binary in OpenSuSE distribution. For other Linux distributions, the steps are almost the same.


The steps to install tar.gz or tar.bz2 file type to the type of compressed file is binary, as follows.
  1. Once the download is complete, place the file into a new directory (ex. example) through a file manager (nautilus / dolphin)
  2. Go to the examples directory
  3. Extract the file, when using the file manager select the file and click the right mouse button so that it appears a menu and then select the command extract here or extract archive here
  4. Double-click the file that has the gear icon
  5. For tar.gz or tar.bz2 file type that contains binary file, the above steps are completed and by double clicking on the file with the gear icon, the application will run. If the file is already on a double click but not run the application, it's good in view the permissions of the file. If the execute permission has not been set, the first set execute permissions to the file.
As for the type tar.gz or tar.bz2 file containing the source code file, the steps for installing :
  1. Open console 
  2. Create a new directory (ex. example) 
  3. Copy tar.gz or tar.bz2 file to the new directory 
  4. Go to the new directory
  5. Extract file, for type tar.gz use the command tar zxvf  nama_file.tar.gz , for type tar.bz2  use the tar command jxvf nama_file.tar.bz2 
  6. After the extraction is complete, find the file named README or INSTALL, open and read the file. In the file there are usually instructions for installation. To open the README or INSTALL file, use a text editor such as vi or nano . 
  7. next step after understanding what is needed or what can be done is compile. To compile type the command. / Configure  that will automatically compile the source code files that have been extracted. The compilation of the source code can be done seamlessly when required compilers available on the system. If not available, usually in the compilation process will stop and there will be a message that the file xxxx not found or similar. This indicates that the compiler needed are not available and means you have to install the necessary packages. After it restarted again with command. / Configure , if all requirements are met, the compilation will run perfectly. 
  8. After the compilation, typing the command makeup
  9. The ninth step is to put a compilation step into the system, for it is moved from the active user is now the root user and then typing the command make install
  10. Done, when a file fails installed, once again read the INSTALL or README file carefully there may be forgotten to be done or provided. Do not forget when you still have not found the answer, find information based on the message given in the search engines like google.

Tidak ada komentar:

Posting Komentar