CN104778048A - Method and device for installing and setting up server web environment on the basis of Linux system - Google Patents

Method and device for installing and setting up server web environment on the basis of Linux system Download PDF

Info

Publication number
CN104778048A
CN104778048A CN201410010168.0A CN201410010168A CN104778048A CN 104778048 A CN104778048 A CN 104778048A CN 201410010168 A CN201410010168 A CN 201410010168A CN 104778048 A CN104778048 A CN 104778048A
Authority
CN
China
Prior art keywords
linux
php
catalogue
apache
mysql
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410010168.0A
Other languages
Chinese (zh)
Other versions
CN104778048B (en
Inventor
张红玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201410010168.0A priority Critical patent/CN104778048B/en
Publication of CN104778048A publication Critical patent/CN104778048A/en
Application granted granted Critical
Publication of CN104778048B publication Critical patent/CN104778048B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a method and a device for installing and setting up a server web environment on the basis of a Linux system. A shell setup script is operated to detect the type of the Linux operating system; and according to the type of the detected Linux operating system, at least one of a web server Apache, a hypertext preprocessor (PHP) and a relational database management system MySQL (Structured Query Language) is installed. The setup complexity of the server web environment under the Linux system is lowered, and a compatibility requirement on a server web application is lowered.

Description

The method and apparatus of server web environment is built in installation based on linux system
Technical field
The present invention relates to areas of information technology, particularly relate to the method and apparatus that server web environment is built in a kind of installation based on linux system.
Background technology
Linux system is a kind of class Unix operating system of free and open source code, there is many different linux versions, but they all employ linux kernel.
And there is diversity and heterogeneity due to linux system, therefore, when server web environment is built in installation, the server version of installation method and support all can be different, and the installation method generally all can supported based on server itself and installation kit carry out customization and install.But, the server web environmental structure complexity under linux system can be caused so higher, also indirectly improve the compatibility requirement that server web is applied.
Summary of the invention
The invention provides the method and apparatus that server web environment is built in a kind of installation based on linux system, to reduce the server web environmental structure complexity under linux system, reduce the compatibility requirement that server web is applied.
On the one hand, the invention provides a kind of method that server web environment is built in installation based on linux system, it is characterized in that, comprising:
Run shell installation script;
Detect the type of (SuSE) Linux OS;
According to the type of detected described (SuSE) Linux OS, at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL is installed.
On the other hand, the present invention also provides a kind of installation based on linux system to build the device of server web environment, comprising:
Run module, for running shell installation script;
Detection module, for detecting the type of (SuSE) Linux OS;
Installation module, for the type according to detected described (SuSE) Linux OS, installs at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL.
The method and apparatus of server web environment is built in installation based on linux system provided by the invention, originally the type of (SuSE) Linux OS was detected by running shell installation foot, and according to the type of detected described (SuSE) Linux OS, at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL is installed.Realize the server web environmental structure complexity under reduction linux system, reduce the compatibility requirement that server web is applied.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 be the installation based on linux system provided by the invention build a method embodiment of server web environment process flow diagram;
Fig. 2 is the structural representation that a device embodiment of server web environment is built in the installation based on linux system provided by the invention;
Fig. 3 is the structural representation that another embodiment of device of server web environment is built in the installation based on linux system provided by the invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the process flow diagram that a method embodiment of server web environment is built in the installation based on linux system provided by the invention, and as shown in Figure 1, the method comprises:
S101, operation shell installation script;
The type of S102, detection (SuSE) Linux OS;
S103, type according to detected (SuSE) Linux OS, install at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL.
In the present invention, server web environment is built for installation, provides required Apache source code bag, PHP(Hypertext Preprocessor) at least one in source code bag and MySQL source code bag, shell installation script, and other relevant source code bags, mounting list document etc.
Wherein, write install.sh, this file can carry out the step detecting Yu install.
As one preferably embodiment, before running shell installation script, can first by least one in the source code bag of the source code bag of Apache, the source code bag of PHP and MySQL, and shell installation script, relevant source code bag and mounting list document unzip in any one target directory in (SuSE) Linux OS, and then the installation file in operational objective catalogue, namely run the bash./install.sh file in this target directory.Install.sh supports 4 parameters: prepare, apache, mysql and php.Acquiescence bash./install.sh runs, and order of representation first detects the type of (SuSE) Linux OS, then installs apache successively, mysql and php.Also can directly input single parameter, some functions are only installed, as bash./install.sh mysql just only can reinstall mysql.
It should be noted that, the method for server web environment is built in the installation based on linux system provided by the invention, both can support to install the whole of Apache, PHP and MySQL; Can support again any one in Apache, PHP and MySQL or two are installed.Therefore, run shell installation script, originally detected the type of (SuSE) Linux OS by shell installation foot after, successively Apache can be installed, MySQL and PHP.Also can directly input single parameter, only install wherein some or two, as bash./install.sh mysql, then only MySQL is installed.
In installation process, can point out user required whole still parts of installing Apache, PHP and MySQL, user can pass through to reply certain character, such as: y adds carriage return to determine.
Wherein, linux system type can comprise linux system version number, company originated etc. information, and the linux system type such as comprised at present can see table:
After detecting linux system type, can install in Apache, PHP and MySQL adaptively according to the type of system one or more.
In addition, as one preferably embodiment, the source code bag of Apache, PHP and MySQL can be separated with configuration file and store, that is: under at least one in Apache, PHP and MySQL being installed to the first catalogue in (SuSE) Linux OS, under at least one in the configuration file of the configuration file of Apache, the configuration file of PHP and MySQL being installed to the second catalogue in (SuSE) Linux OS, the first catalogue and the second catalogue are the different directories in (SuSE) Linux OS.
Optionally, the first catalogue is /usr/local/webserver.Such as:
/usr/local/webserver/apache2
/usr/local/webserver/mysql,/usr/local/webserver/php。
Optionally, the second catalogue that the configuration file of Apache is corresponding is /etc/httpd/httpd.conf, the second catalogue that the configuration file of PHP is corresponding is the second catalogue that the configuration file of 2.mysql:/etc/my/cnf, MySQL is corresponding is /usr/local/webserver/php/etc/php.nin.
After successful installation, Apache, PHP and MySQL can be started by running to issue orders, such as:
Apache starts (stop | restarting | heavily loaded configuration file)
service httpd start(stop|restart|reload)
Mysql(stops | restarting | heavily loaded configuration file)
service mysqld start(stop|restart|reload)
The method of server web environment is built in installation based on linux system provided by the invention, originally the type of (SuSE) Linux OS was detected by running shell installation foot, and according to the type of detected (SuSE) Linux OS, at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL is installed.Realize the server web environmental structure complexity under reduction linux system, reduce the compatibility requirement that server web is applied.
Fig. 2 is the structural representation that a device embodiment of server web environment is built in the installation based on linux system provided by the invention, as shown in Figure 2, comprising:
Run module 11, for running shell installation script;
Detection module 12, for detecting the type of (SuSE) Linux OS;
Installation module 13, for the type according to detected (SuSE) Linux OS, installs at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL.
As shown in Figure 3, this device can further include: decompression module 14, for by least one in the source code bag of the source code bag of Apache, the source code bag of PHP and MySQL, and shell installation script, relevant source code bag and mounting list document unzip in any one target directory in (SuSE) Linux OS;
Run module 11 can also be used for: the installation file in operational objective catalogue.
Optional installation module 13 can also be specifically for: under at least one in Apache, PHP and MySQL being installed to the first catalogue in (SuSE) Linux OS, under at least one in the configuration file of the configuration file of Apache, the configuration file of PHP and MySQL being installed to the second catalogue in (SuSE) Linux OS, the first catalogue and the second catalogue are the different directories in (SuSE) Linux OS.
Optionally, the first catalogue is /usr/local/webserver.
Optionally, the second catalogue that the configuration file of Apache is corresponding is /etc/httpd/httpd.conf, the second catalogue that the configuration file of PHP is corresponding is the second catalogue that the configuration file of 2.mysql:/etc/my/cnf, MySQL is corresponding is /usr/local/webserver/php/etc/php.nin.
The device of server web environment is built in the installation based on linux system that the present embodiment provides, the actuating unit of the method for server web environment is built for the installation based on linux system provided by the invention, its detailed process performing the method can associated description in embodiment shown in Figure 1, does not repeat them here.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by device is divided into different functional modules, to complete all or part of function described above.The system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described module or unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that the technical scheme of the application contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform all or part of step of method described in each embodiment of the application.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.
The above, above embodiment only in order to the technical scheme of the application to be described, is not intended to limit; Although with reference to previous embodiment to present application has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the application.

Claims (10)

1. build a method for server web environment based on the installation of linux system, it is characterized in that, comprising:
Run shell installation script;
Detect the type of (SuSE) Linux OS;
According to the type of detected described (SuSE) Linux OS, at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL is installed.
2. method according to claim 1, is characterized in that, before described operation shell installation script, also comprises:
By at least one in the source code bag of the source code bag of described Apache, the source code bag of described PHP and described MySQL, and described shell installation script, relevant source code bag and mounting list document unzip in any one target directory in described (SuSE) Linux OS;
Run the installation file in described target directory.
3. method according to claim 1 and 2, is characterized in that, at least one of installing in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL described, comprising:
Under at least one in described Apache, described PHP and described MySQL being installed to the first catalogue in described (SuSE) Linux OS, by under at least one second catalogue being installed in described (SuSE) Linux OS in the configuration file of the configuration file of described Apache, described PHP and the configuration file of described MySQL, described first catalogue and described second catalogue are the different directories in described (SuSE) Linux OS.
4. method according to claim 3, is characterized in that, described first catalogue is /usr/local/webserver.
5. method according to claim 3, it is characterized in that, described second catalogue that the configuration file of described Apache is corresponding is /etc/httpd/httpd.conf, described second catalogue that the configuration file of described PHP is corresponding is 2.mysql:/etc/my/cnf, and described second catalogue that the configuration file of described MySQL is corresponding is /usr/local/webserver/php/etc/php.nin.
6. build a device for server web environment based on the installation of linux system, it is characterized in that, comprising:
Run module, for running shell installation script;
Detection module, for detecting the type of (SuSE) Linux OS;
Installation module, for the type according to detected described (SuSE) Linux OS, installs at least one in Apache web server Apache, hypertext pre-service language PHP and relational data management system MySQL.
7. device according to claim 6, it is characterized in that, also comprise: decompression module, for by least one in the source code bag of the source code bag of described Apache, the source code bag of described PHP and described MySQL, and described shell installation script, relevant source code bag and mounting list document unzip in any one target directory in described (SuSE) Linux OS;
Described operation module also for: run the installation file in described target directory.
8. the device according to claim 6 or 7, it is characterized in that, described installation module specifically for: under at least one in described Apache, described PHP and described MySQL being installed to the first catalogue in described (SuSE) Linux OS, by under at least one second catalogue being installed in described (SuSE) Linux OS in the configuration file of the configuration file of described Apache, described PHP and the configuration file of described MySQL, described first catalogue and described second catalogue are the different directories in described (SuSE) Linux OS.
9. device according to claim 8, is characterized in that, described first catalogue is /usr/local/webserver.
10. device according to claim 8, it is characterized in that, described second catalogue that the configuration file of described Apache is corresponding is /etc/httpd/httpd.conf, described second catalogue that the configuration file of described PHP is corresponding is 2.mysql:/etc/my/cnf, and described second catalogue that the configuration file of described MySQL is corresponding is /usr/local/webserver/php/etc/php.nin.
CN201410010168.0A 2014-01-09 2014-01-09 The method and apparatus that server web environment is built in installation based on linux system Expired - Fee Related CN104778048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410010168.0A CN104778048B (en) 2014-01-09 2014-01-09 The method and apparatus that server web environment is built in installation based on linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410010168.0A CN104778048B (en) 2014-01-09 2014-01-09 The method and apparatus that server web environment is built in installation based on linux system

Publications (2)

Publication Number Publication Date
CN104778048A true CN104778048A (en) 2015-07-15
CN104778048B CN104778048B (en) 2018-06-19

Family

ID=53619534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410010168.0A Expired - Fee Related CN104778048B (en) 2014-01-09 2014-01-09 The method and apparatus that server web environment is built in installation based on linux system

Country Status (1)

Country Link
CN (1) CN104778048B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480534A (en) * 2017-08-17 2017-12-15 郑州云海信息技术有限公司 A kind of automated detection method for Apache configuration securities
CN108170588A (en) * 2016-12-07 2018-06-15 阿里巴巴集团控股有限公司 A kind of test environment building method and device
CN109976768A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 General installation kit determines method, apparatus and common software packet installation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595870A (en) * 2003-12-15 2005-03-16 浪潮电子信息产业股份有限公司 Method of remote parallel automatic installation of multiple types of operating systems via network
CN101833462A (en) * 2010-04-01 2010-09-15 山东高效能服务器和存储研究院 Method for making general installation program of cross-operating system platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595870A (en) * 2003-12-15 2005-03-16 浪潮电子信息产业股份有限公司 Method of remote parallel automatic installation of multiple types of operating systems via network
CN101833462A (en) * 2010-04-01 2010-09-15 山东高效能服务器和存储研究院 Method for making general installation program of cross-operating system platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170588A (en) * 2016-12-07 2018-06-15 阿里巴巴集团控股有限公司 A kind of test environment building method and device
CN108170588B (en) * 2016-12-07 2021-07-23 阿里巴巴集团控股有限公司 Test environment construction method and device
CN107480534A (en) * 2017-08-17 2017-12-15 郑州云海信息技术有限公司 A kind of automated detection method for Apache configuration securities
CN109976768A (en) * 2017-12-27 2019-07-05 航天信息股份有限公司 General installation kit determines method, apparatus and common software packet installation method

Also Published As

Publication number Publication date
CN104778048B (en) 2018-06-19

Similar Documents

Publication Publication Date Title
US10908887B2 (en) Dynamic container deployment with parallel conditional layers
US9386079B2 (en) Method and system of virtual desktop infrastructure deployment studio
US9665469B2 (en) System and method of runtime downloading of debug code and diagnostics tools in an already deployed baseboard management controller (BMC) devices
US8135813B2 (en) Method, system and program product for remotely deploying and automatically customizing workstation images
US11086662B2 (en) Method and system of migrating applications to a cloud-computing environment
CN106775928B (en) Automatic virtual machine migration system and method between heterogeneous cloud platforms
US20150261546A1 (en) Baseboard management controller and method of loading firmware
CN105389182A (en) Software upgrading method and apparatus
CN103746833A (en) PXE-based RAID automatic configuration method and system
CN102937909B (en) A kind of method of disposing and upgrading linux system
CN107766130B (en) Method and device for migrating virtual machine to container
US20180088932A1 (en) Multi-platform installer
JP6861886B2 (en) Systems and methods for customized operating system conversion
CN101650660A (en) Booting a computer system from central storage
CN110888650B (en) Method and system for customizing operating system mirror image
CN105138431A (en) Linux system back-up and restoring method
CN105824678A (en) Method and device for installing operating system
CN102937904A (en) Multi-node firmware updating method and device
CN103747095A (en) Virtual desktop system and method
CN106126303A (en) The installation method of (SuSE) Linux OS, Apparatus and system
CN104778048A (en) Method and device for installing and setting up server web environment on the basis of Linux system
US20140013096A1 (en) Booting a computing device to have a predefined functionality
CN104077196A (en) Linux boot failure recovering method and device
CN105389495A (en) Method for externally resetting password of windows virtual machine
US20190317747A1 (en) Binary restoration in a container orchestration system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220624

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180619

CF01 Termination of patent right due to non-payment of annual fee