Centos6.5 visual interface script one-click deployment service

        The script currently supports the deployment of Jdk, Tomcat, Oracle, Mysql, MongDb, LAMP, LNMP, services [Oracle supports all versions of Centos]

        Some commands and thoughts of this script refer to Baidu, and even some experience of csdn bosses.

        shortcoming:

                ①Version 7.0 and above is not currently supported, because the system files and the firewall are inconsistent, so there is no time to optimize now.

                ②Binding resource files, because of the on-site situation, there are very few yum installations, and they are basically offline installations. Those who have done projects should understand that the site really does not allow you to connect to the external network, and it will be dead.

                ③Resource files are hard-coded, such as tomcat, jdk, oracle versions, and may do fuzzy query + regular retrieval later.

                ④ The code is redundant and not professional.

                ⑤ The file size is 3.3G.

                ⑥ Lamp and lnmp use yum to install dependencies. I really don't want to manually find dependency packages. It is troublesome to manually find the associated installation dependencies, but the specific services are still installed in a derogatory sense.

         Advantages: One-click deployment in the visual interface [deployment for fools].

       Note: hobbies! The more I write the script, the more excited I get. However, most of the companies currently working in the company use the Windows system. If you are used to the Linux system, you will find that the Windows system really doesn't want to be used.

        communicate with:

                   ①The source environment variable is required for jdk deployment, but the command is written in the script, and it seems that it will not be executed. Even if ./ is used, there will be problems, so I wrote reboot after following the JDK. [On the Internet, it is said that because the source will open another process to execute, it will form a sub-thread relationship with the script? It will not take effect], so reboot is used here to avoid it.

                    ②The command cannot be written when the "" '' $ variable is embedded inside the sed command. Avoid using other methods.

                    ③ Every time the script is executed, there will be an error that the directory cannot be found. In fact, it is still executed. I don't know why this command is not displayed.

        When I wrote this visual script, I occasionally saw the big guys in the group posted pictures. It was said that it was very easy to do. Then I went to ask the company bosses for advice. They said that they need to write code, which cannot be achieved by sh scripts. Then I kept thinking, then I can imitate the visual interface by sh a lot of echo and other commands. And then done.



        The main commands are basically sed, tar, echo, and pipeline commands.

        Start: (copy the directory to the tmp directory)

                ①Start command: sh /tmp/MyZApplication/Visualization.sh

                ②Enter any serial number to secure any service. After the installation is complete, wait for the user to enter any key to return to the main page

                ③Look at the picture, the first step is to release the files, mainly release tar -zcf all.tar.gz jdk, apache, tocmat, etc.

  

                ④ After the release is completed, it will automatically return to the home page, and then view the directory tree.


                ⑤ Then, according to jdk, database, etc., two kinds of jdk/Oracle are demonstrated here.


                    ⑥ The above figure shows that the Centos version is selected first, then the jdk version is selected, and then the installation is performed. Finally, the installation will automatically restart and take effect, because a command is written in the /etc/bashrc file when the file is released, so you can enter the script by entering a custom command without entering a long series of commands. At the same time, the yes setting of restarting automatic networking is also updated in eth0.


                    ⑦Install Oracle,




                    ⑧Finished


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325954513&siteId=291194637