It's too late to automate! Teach you 4 steps to build a CentOS-based product image

Source: Internet
Author: User
Tags rpmbuild

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/89/DF/wKioL1ggPnfxorv3AACoGFmGRss592.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 111.jpg "alt=" Wkiol1ggpnfxorv3aacogfmgrss592.jpg "/>

With the increase of Linux programs, the following problems often occur during the installation of software:

1, the hardware configuration similar or the same time, the batch installs the system and the software, hoped realizes the automation installment, reduced ~ Less installs the time and the human error.

2, the project implementation personnel in different customer site system and software installation (different hardware configuration), due to differences in hardware, it is not easy to automate.

The author aimed at the above scenes, from improving production efficiency, reduce the position of misoperation, put forward the following solutions, hope to achieve the purpose, and can be in-depth discussion with peers, found shortcomings.

Background knowledge points

Anaconda is a redhat, CentOS, Fedora and other Linux installation management program, it can provide text, graphics and other installation management methods, and support kickstart and other scripts to provide automatic installation features. Custom installation, it provides a custom interface, you can implement an interactive interface for users to choose the configuration (such as the choice of language, keyboard, time zone and other information).

Anaconda Supported management modes:

(1) Kickstart provides automatic installation;

(2) Implement upgrade for a redhat.

Available installation methods: Local CDROM, USB, network mode (NFS, FTP, HTTP), etc.

For kickstart, it is a way to automate the installation of the server using the Anconda tool. With the generated Kickstart profile ks.cfg, you can implement a non-interactive (unattended) installation configuration from bare metal to full-featured services, KS.CFG is a simple text file that contains some of the necessary configuration information that Anconda needs to obtain when installing the system and configuring the service after installation, such as keyboard settings , language settings, partition settings, and so on).

Anconda directly from the file to read the necessary configuration, as long as the file information is configured correctly and meet all system requirements, it is no longer necessary to interact with the user to obtain information, so as to achieve the automation of the installation. Once the user has made a selection, the installation will continue in a non-interactive manner. Use Kickstart to streamline automated installation, enforce consistency (package, partition, configuration, monitor, security), and reduce human deployment errors.

CentOS Custom Methods

First step: Prepare the Software installation package (RPM)

• Packaged development programs

• Making spec Files

• Use the Rpmbuild command to generate RPM packages

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/89/E2/wKiom1ggPoDA8YZSAAHN2kVcPdw463.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 1.jpg "alt=" Wkiom1ggpoda8yzsaahn2kvcpdw463.jpg "/>

Rpmbuild-bb/root/rpmbuild/specs/apm_c.spec

Generate apm_c-2.5.0-1.x86_64.rpm

Step two: Customizing the Kickstart configuration file

• Custom ISOLINUX/ISOLINUX.CFG files

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/89/DF/wKioL1ggPojSnuVKAAM9ycgq0hk718.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 2.jpg "alt=" Wkiol1ggpojsnuvkaam9ycgq0hk718.jpg "/>

• Configuration Ks.cfg

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/89/E2/wKiom1ggPpGz1gQMAAJFHSQv-Lk951.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 3.jpg "alt=" Wkiom1ggppgz1gqmaajfhsqv-lk951.jpg "/>

Step three: Customizing the Installation Interface

• Configuring Repodata/xxx-comps.xml Files

• Configuring INSTALL.IMG Files

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/89/DF/wKioL1ggPpnDxqebAAFegcR-vtA465.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 4.jpg "alt=" Wkiol1ggppndxqebaafegcr-vta465.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/89/DF/wKioL1ggPqGQAF5MAAF6-LPMuEE500.jpg "style=" height : auto;vertical-align:middle;border:0px; "title=" 5.jpg "alt=" Wkiol1ggpqgqaf5maaf6-lpmuee500.jpg "/>

Fourth step: Regenerate the ISO image file

Regenerate the image file using the Mkisofs command

——— I'm a split line ———

The author introduces: Yao Huilong, currently serving as gifted Cloud software, engaged in software customization development for more than more than 10 years, experienced the C/s architecture of the information system and B/s architecture of the Web program development, also engaged in the development of Linux applications and kernel programs.

This article is from the "excellent cloud dual-state Operations" blog, please be sure to keep this source http://uyunopss.blog.51cto.com/12240346/1870289

It's too late to automate! Teach you 4 steps to build a CentOS-based product image

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.