Create a general installation package in linux

Source: Internet
Author: User
Production of general installation packages in linux-general Linux technology-Linux technology and application information. The following is a detailed description. In linux, the software installation packages of xxxx. run and xxxx. bin are often seen. This file is a script and also contains the files required for installation. How can this problem be solved? The following is a simple example:

Original file Packaging

Tar czvf install_original.tar.gz your_original_files

Install. sh

#! /Bin/bash
Skip_line = 'awk'/^ # END_OF_SCRIPT/{print NR + 1; exit 0;} 'Update. Sh' # locate the start line of install_original.tar.gz
Tail-n + $ skip_line $0 | open install_original.tar.gz in tar xjvf--C/usr/local restart
Exit 0
# END_OF_SCRIPT
... Here is the content of the appended tar file ....

Append install_original.tar.gz to install. sh.

Cat install_original.tar.gz> install. sh
Related Article

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.