Yao Huilong, engaged in software custom developmentTenyears, experienced aC/SArchitecture of information systems andb/SArchitecture ofWebProgram Development,also experiencedLinuxdevelopment of applications and kernel programs.
——— I'm a split line . ———
with Linux programs, the software installation process often occurs the following problems:
1 , hardware configuration similar or concurrent, batch installation system and software, want to achieve automated installation, reduce installation time and human error.
2 , Engineering implementation personnel to perform system and software installation at different customer sites ( Different hardware configurations ) , because of the hardware differences, it is not easy to achieve automation.
for the above scenario, the author from the standpoint of improving production efficiency and reducing misoperation, the following solutions are proposed , hope to achieve the purpose of the discussion, and peer-to-depth exploration, found deficiencies.
Background knowledge points
Anacondais aRedHat,CentOS,FedorawaitLinuxInstallation Management program, which can provide text, graphics and other installation management methods, and supportKickstartsuch as scripts provide automatic installation of 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 provide automatic installation;
( 2 ) to a redhat implement upgrade
Available installation methods: Local CDROM , USB , network mode ( NFS , FTP , HTTP ) and so on.
forKickstart, it is a useAncondaTools for automating the installation of servers. through the generatedKickstartconfiguration fileks.cfg, the non-interactive (unattended) installation configuration can be implemented from bare metal to full-featured services;ks.cfgis a simple text file that containsAncondaSome necessary configuration information (such as keyboard settings, language settings, partition settings, and so on) that you need to obtain when installing the system and configuring the service after installation.
Anconda read the necessary configuration directly from the file , as long as the file information is configured correctly and meets all system requirements, it is no longer necessary to interact with the user to obtain information to automate 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 and developed programs
· making SPEC files
· using the rpmbuild command to generate rpm packages
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/82/A0/wKioL1ddMK-yTi5kAAHN2kVcPdw042.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiol1ddmk-yti5kaahn2kvcpdw042.jpg "/>
Rpmbuild-bb/root/rpmbuild/specs/apm_c.spec
Build apm_c-2.5.0-1.x86_64.rpm
Step two: Customizing Kickstart configuration file
· customizing isolinux/isolinux.cfg files
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/A0/wKioL1ddMLGQ-7J6AAJFHSQv-Lk478.jpg "title=" 3.jpg " Style= "Float:none;" alt= "wkiol1ddmlgq-7j6aajfhsqv-lk478.jpg"/>
· Configure ks.cfg
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/82/A2/wKiom1ddL6HhnxKMAAM9ycgq0hk843.jpg "title=" 2.jpg " Style= "Float:none;" alt= "wkiom1ddl6hhnxkmaam9ycgq0hk843.jpg"/>
Step three: Customizing the Installation Interface
· Configuring the repodata/xxx-comps.xml file
· install.img file
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/82/A2/wKiom1ddL6Ohxm6hAAFegcR-vtA203.jpg "title=" 4.jpg "Style=" Float:none; "alt=" wkiom1ddl6ohxm6haafegcr-vta203.jpg "/>
650 "this.width=650;" src= "/HTTP// S2.51cto.com/wyfs02/m02/82/a2/wkiom1ddl6sxg1claaf6-lpmuee864.jpg "title=" 5.jpg "style=" Float:none; "alt=" Wkiom1ddl6sxg1claaf6-lpmuee864.jpg "/>
Fourth step: Regenerate ISO image File
Use Mkisofs command to regenerate the image file
——— I'm a split line ———
Cloud Software: Our devops philosophy, from monitoring, to application experience, to automated continuous delivery, all-in-a-stack operations solution Provider
This article is from the "excellent Cloud Agile Operations" blog, please be sure to keep this source http://uyunops.blog.51cto.com/11708365/1788399
How to create a CentOS-based product image