服務安裝菜單示例腳本
#service script
menu () {
cat <<END
1 [install lamp]
2 [install lnmp]
3 [exit]
pls input the num you want:
END
}
menu
script1=/server/scripts/lamp.sh
script2=/server/scripts/lnmp.sh
read int
case "$int" in
1)
if [ -x $script1 ]
then
echo "start installing lamp."
/bin/sh $script1
else
echo "this script cannot be used."
fi
;;
2)
if [ -x $script2 ]
then
echo "start installing lnmp."
/bin/sh $script2
else
echo "this script cannot be used."
exit 1
fi
;;
3)
exit 0
;;
*)
echo "lnput error."
exit 2
esac
服務安裝菜單示例腳本
相關推薦
服務安裝菜單示例腳本
script end input int ror art star else error #!/bin/bash#service scriptmenu () {cat <<END1 [install lamp]2 [install lnmp]3 [exit]pl
用於Nagios中監控服務器連接數腳本
ss nagios socket 最近因為服務器不斷有增加新的業務,需要對服務器的最大連接數進行調整評估,所以就利用Nagios去監控相應的連接數,腳本也是利用Nagios發送相應的轉態來實現監控,實現也很簡單#/bin/bash #Used to monitor the number of
Centos 6.5全新安裝firefox45.2瀏覽器腳本
firefox45安裝ok centos6安裝firefox45版 在Centos 6.5x86_64系統中自帶的是firefox 17版,版本太低,由於騰訊雲實驗室需要在firefox瀏覽器45版或45版以上的版本來支持,否則無法進入騰訊雲實驗室環境。而很多朋友想在Centos 6.5上安
JavaScript+CSS+DIV實現下拉菜單示例
element 菜單 clas java java程序 out style ntb tab <!DOCTYPE html> <html> <head> <title>下拉菜單示例</title> &
Django如何在啟動服務時自動運行腳本(可設置定時運行)
imp 裝飾 AR 自動運行 即使 模塊 urls.py文件 步驟 sta Django搭建的服務器一般都用作WEB網站進行訪問,通常的形式是用戶訪問網站或點擊按鈕發送請求,Django檢測到請求後進行相應的試圖函數處理後返回頁面給用戶。 但是,我們有時會需要有一些
jQurey實現隱藏菜單示例
python<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title>
linux 服務器初始化優化腳本
iptable kconfig systemctl boot xslt del alt out tab linux 服務器初始化優化腳本 -------------------------------------------------------------------
服務器端語言和腳本語言的區別
兩種 開發 jsp 就是 back scrip serve side 需要 服務器端語言(php,asp……), 英文就是 Server Side Included ( SSI ), 一般(大多數)都應用在網站開發上. 方法就是將 編程的代碼 嵌入到 html 內, 伺服器
html-4, form 表單 輸入、傳文件、單選、多選、下拉菜單、文本描述、重置、submit、按鈕限制輸入
part row man head 密碼 文本 inpu set 跳轉 <!-- form HTTP協議 action:提交的服務器網址 method:get(默認)| post(應用:
Linux中源碼包安裝MySQL的shell腳本
login support des ant chown default sets emctl group #!/bin/bash#安裝MYSQL yum -y install ncurses-develyum -y install autoconftar zxf /cmak
docker 部署mysql服務之後,執行sql腳本
sql腳本 source 得到 ash 進入容器 mysql http copy 服務 1,先將.sql文件copy到docker容器裏 docker ps //找到容器的短ID或者指定的name。 docker inspect -f ‘{{.Id}}‘ id or na
一鍵安裝MySQL5.6.43腳本
ext thread conn xtra pack 6.4 general log_file bison #!/bin/bash #卸載系統自帶的Mysql /bin/rpm -e $(/bin/rpm -qa | grep mysql|xargs) --nodep
親測完美centos7部署Nginx1.6.3(附一鍵安裝nginx1.13.8腳本)
親測 group 安裝 centos oot roo down 測試 eve 1. 創建預備環境 [[email protected] ~]# test -f /services/current_apps || mkdir /services/current_a
Centos自動安裝openssh及openssl腳本並隱藏版本號
rec tar -xvf prefix pub entos log gcc host dep #!/bin/bash # install_ssh() { NOW=`date +%Y%m%d` setenforce 0 cd /usr/local/ tar
shell腳本一鍵安裝LNMP菜單方式安裝
shell腳本一鍵安裝LNMP#!/bin/bash#定義軟件包變量Tnginx="nginx-1.6.0.tar.gz"nginx="nginx-1.6.0"Tcmake="cmake-2.8.6.tar.gz"cmake="cmake-
jira安裝配置與服務腳本
jira安裝部署 jira服務腳本 jira授權一、安裝說明系統:CentOS 6.7 x64 export LANG="zh_CN.UTF-8" # 否則中文無法顯示,還是英文安裝java 1.7.x版本jdk安裝mysql 5.1及以上版本二、數據庫配置創建mysql:>>crea
把編譯安裝的httpd 實現服務腳本,通過service和chkconfig 進行管理
成功 服務腳本 文件內容 roc grep sharp list roo httpd 把編譯安裝的httpd 實現服務腳本,通過service和chkconfig 進行管理 1 編譯安裝httpd 把httpd編譯安裝在/app/httpd/目錄下。 2 在/e
shell整理(35)====模擬用戶登錄的打印菜單腳本
shell 心得 思考(一)打印一個菜單,接受一個輸入,如果沒有這個用戶就創建用戶和密碼,將創建的用戶和密碼寫入到一個文件,如果文件中有就模擬一個用戶登錄,要求用戶名任意,可以是(^$ ^q ),密碼分兩種可以是空密碼,也可以是任意長度的密碼。shell代碼如下:#!/bin/bashcreate_us
服務(1)====一個lamp的腳本以及基於lamp安裝wordpress
服務lamp word press博客#!/bin/bash #部署一個LAMP的環境 #文檔整理人:dingxue #整理日期:2017-10-6 #提取部署好yum環境,也可以使用網絡yum操作 #說明:本文檔部署環境的機器是:Linux redhat_6.5_x64 #請將所需的源
安裝nginx 服務shell腳本
nginx 安裝 !/bin/bash wget http://nginx.org/download/nginx-1.10.2.tar.gz tar -xf nginx-1.10.2.tar.gz cd nginx-1.10.2 yum -y i