1. 程式人生 > >Linux-指令碼安裝軟體

Linux-指令碼安裝軟體

指令碼安裝包介紹

所謂的一鍵安裝包,實際還是安裝的原始碼包與RPM包,只是把安裝過程寫成了指令碼,便於初學者的安裝.
優點:
簡單,快速,方便
缺點:
不能定義安裝軟體的版本
不能定義所需要的軟體的功能
原始碼包的優勢喪失.

說明: 本文以安裝LNMP的環境為例子:

準備工作

檢查是否安裝了軟體:apache ,mysql,Nginx

1.關閉apache  ,mysql,Nginx後,最好刪除之前安裝的版本
2.保證yum源能正常使用
    yum list 測試下
3.關閉SELinux和防火牆

安裝指南

  • 下載的版本:
    lnmp1.4-full.tar.gz

  • 安裝的步驟:

[[email protected] lnmp1.4-full]# ./install.sh 
+------------------------------------------------------------------------+
|          LNMP V1.4 for CentOS Linux Server, Written by Licess          |
+------------------------------------------------------------------------+
|        A tool to auto-compile & install LNMP/LNMPA/LAMP on Linux       |
+------------------------------------------------------------------------+
| For more information please visit https://lnmp.org | +------------------------------------------------------------------------+ You have 5 options for your DataBase install. 1: Install MySQL 5.1.73 2: Install MySQL 5.5.56 (Default) 3: Install MySQL 5.6.36 4: Install MySQL 5.7.18 5: Install MariaDB 5.5.56 6: Install MariaDB 10.0.30 7: Install MariaDB 10.1.23 0: DO NOT Install MySQL/MariaDB Enter your choice (1, 2, 3, 4, 5, 6, 7 or 0): 3 You will Install MySQL 5.6.36 ===========================
Please setup root password of MySQL.(Default password: root) Please enter: root MySQL root password: root =========================== Do you want to enable or disable the InnoDB Storage Engine? Default enable,Enter your choice [Y/n]: y You will enable the InnoDB Storage Engine =========================== You have 6 options for your PHP install. 1: Install PHP 5.2.17 2: Install PHP 5.3.29 3: Install PHP 5.4.45 4: Install PHP 5.5.38 (Default) 5: Install PHP 5.6.30 6: Install PHP 7.0.19 7: Install PHP 7.1.5 Enter your choice (1, 2, 3, 4, 5, 6 or 7): 6 You will install PHP 7.0.19 =========================== You have 3 options for your Memory Allocator install. 1: Don't install Memory Allocator. (Default) 2: Install Jemalloc 3: Install TCMalloc Enter your choice (1, 2 or 3): No input,You will not install Memory Allocator. Press any key to install...or Press Ctrl+c to cancel

按照提示,根據根據自己的需求進行選擇安裝的版本就好.