LNMP installation Package SH script

Source: Internet
Author: User

Xshell 5 (Build 0719) Copyright (c)2002-2015 Netsarang Computer, Inc. All rights reserved.Type ' help‘To learn how to use Xshell prompt. [d:\~]$ Connecting to 192.168.1.137:22...connection established. To escape to local shell, Press' ctrl+alt+] '. Last Login:sun Dec 19:15:22 from 192.168.1.169[[email protected] ~]# cd/home[[email protected] home]# Lltotal 4drwx------. 4 Ligaoxiang Ligaoxiang 4096 Dec ligaoxiang[[email protected] home]# wget-c HTTP://SOFT.VPSER.NET/LNMP/LNMP 1.2-FULL.TAR.GZ--2015-12-13 20:44:04--http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gzResolving soft.vpser.net ...  Failed:name or service not known.wget:unable to resolve host address "soft.vpser.net" [[email protected] home]# wget -C http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && CD Lnmp1.2-full & amp;&./install.sh lnmp--2015-12-13 20:44:57--http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gzResolving Soft.vpser.net ... 74.207.246.99Connecting to soft.vpser.net|74.207.246.99|:80 ... Connected. HTTP request sent, awaiting response ...                                   oklength:326745420 (312M) [application/octet-stream]saving to: "Lnmp1.2-full.tar.gz" 19% [=======> ] 62,303,983 3.45m/s eta 78s ^c[[email protected] home]# lltotal 61520drwx------. 4 Ligaoxiang ligaoxiang 4096 Dec ligaoxiang-rw-r--r--. 1 root root 62991223 Dec 20:45 lnmp1.2-full.tar.gz[[email protected] home]# wget-c http://soft.vpser. NET/LNMP/LNMP1.2-FULL.TAR.GZ--2015-12-13 20:45:34--http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gzResolving Soft.vpser.net ... 74.207.246.99, 2600:3c01::f03c:91ff:fe96:d57aconnecting to soft.vpser.net|74.207.246.99|:80 ... Connected. HTTP request sent, awaiting response ... 206 Partial contentlength:326745420 (312M), 263754197 (252M) remaining [application/octet-stream]saving to: " Lnmp1.2-full.tar.gz "100%[++++++++==================================>] 326,745,420 3.05M/s in 84s 2015-12-13 20:47 : 2.98 MB/S-"lnmp1.2-full.tar.gz" saved [326745420/326745420][[email protected] home]# lltotal 319096DRWX------. 4 Ligaoxiang ligaoxiang 4096 Dec ligaoxiang-rw-r--r--.    1 root root   326745420 Jul 02:34 lnmp1.2-full.tar.gz[[email protected] home]# tar zxf lnmp1.2-full.tar.gz ^H^H^C[[email&nbsp ;p rotected] home]# tar zxf lnmp1.2-full.tar.gz[[email protected] home]# lltotal 319100drwx------. 4 Ligaoxiang ligaoxiang 4096 Dec ligaoxiangdrwxr-xr-x. 7 root root 4096 June 5 Lnmp1.2-full-rw-r--r--. 1 root root 326745420 Jul 02:34 lnmp1.2-full.tar.gz[[email protected] home]# CD LNMP1.2-FULL[[EMAIL&N Bsp;protected] lnmp1.2-full]# lltotal 80-rwxr-xr-x. 1 root root 3870 June 5 Addons.sh-rw-r--r--. 1 root root 6338 June 5 changelogdrwxr-xr-x. 3 root root 4096 June 5 confdrwxr-xr-x. 2 root root 4096 June 5 includedrwxr-xr-x. 2 root root 4096 Apr init.d-rwxr-xr-x. 1 root root 4534 June 5 install.sh-rwxr-xr-x. 1 root root 6123 June 5 php5.2.17.sh-rwxr-xr-x. 1 root root 6694 June 05:25 Pureftpd.sh-rw-r--r--. 1 root root 5272 readme-rw-r--r--. 1 root RoOT 5272 June 5 readmedrwxr-xr-x. 3 root root 4096 June 23:00 Srcdrwxr-xr-x. 2 root root 4096 Apr tools-rwxr-xr-x. 1 root root 3942 June 5 uninstall.sh-rwxr-xr-x. 1 root root 2421 June 5 upgrade.sh[[email protected] lnmp1.2-full]# vim install.sh[[email protected] Lnmp1 .2-full]# Vim Install.sh#!/bin/bashpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport path# Check If user is root exit 1ficur_dir=$ (pwd) stack= "LNMP" Else stack=$1filnmp_ver=' 1.2 ' . Include/main.sh. Include/init.sh. Include/mysql.sh. Include/mariadb.sh. Include/php.sh. Include/nginx.sh. Include/apache.sh. Include/end.shget_dist_nameif ["${distro}" = "Unknow"]; Then exit 1ficlearecho "+------------------------------------------------------------------------+" echo "+--------        ----------------------------------------------------------------+ "echo" | A tool to Auto-compile & install Lnmp/lnmpa/lamp on Linux | "          echo "+------------------------------------------------------------------------+" echo "| For more information visit http://www.lnmp.org |    echo "+------------------------------------------------------------------------+" Init_install () {Press_install Print_sys_info if ["${distro}" = "RHEL"]; Then Rhel_modify_source fi get_dist_version if ["${distro}" = "Ubuntu"]; Then Ubuntu_modify_source fi set_timezone If ["$PM" = "yum"]; Then CENTOS_INSTALLNTP Centos_removeAMP centos_dependent elif ["$PM" = "apt"];    Then DEB_INSTALLNTP xen_hwcap_setting deb_removeamp deb_dependent fi disable_selinux Check_download install_autoconf install_libiconv install_libmcrypt install_mhash Install_Mcrypt Install_ Freetype Install_curl Install_pcre if ["${selectmalloc}" = "2"]; Then Install_jemalloc elif ["${selectmalloc}" = "3"]; Then Install_tcmalloc fi if ["$PM" = "yum"]; Then centos_lib_opt elif ["$PM" = "apt"]; Then deb_lib_opt deb_check_mysql fi if ["${dbselect}" = "1"]; Then install_mysql_51 elif ["${dbselect}" = "2"]; Then install_mysql_55 elif ["${dbselect}" = "3"]; Then install_mysql_56 elif ["${dbselect}" = "4"]; Then Install_mariadb_5 elif ["${dbselect}" = "5"]; Then install_mariadb_10 fi export_php_autoconf}lnmp_stack () {init_install if ["${phpselect}" = "1"]; Then install_php_52 elif ["${phpselect}" = "2"]; Then install_php_53 elif ["${phpselect}" = "3"]; Then install_php_54 elif ["${phpselect}" = "4"]; Then install_php_55 elif ["${phpselect}" = "5"]; Then install_php_56 fi install_nginx install_php_54 elif ["${phpselect}" = "4"]; Then install_php_55 elif ["${phpselect}" = "5"];     Then install_php_56 fi creat_php_tools add_lamp_startup Check_lamp_install} case ' ${stack} ' in LNMP) dispaly_selection Lnmp_stack 2>&1 |     Tee-a/root/lnmp-install.log; Lnmpa) dispaly_selection Lnmpa_stack 2>&1 |     Tee-a/root/lnmp-install.log; Lamp) Dispaly_selection Lamp_stack 2>&1 |     Tee-a/root/lnmp-install.log; *) echo_red "Usage: $ Lnmp|lnmpa|lamp}";;                                    ESAC--VISUAL line--             190,1 Bot 

LNMP installation Package SH script

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.