#!/bin/bash
公司主營業(yè)務(wù):成都網(wǎng)站制作、做網(wǎng)站、移動(dòng)網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。創(chuàng)新互聯(lián)建站是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)建站推出江安免費(fèi)做網(wǎng)站回饋大家。
cat < # auto install lamp env # by author max # 2017-03-20 EOF APACHE_SOFT="httpd httpd-devel" MySQL_SOFT="mariadb-server mariadb mariadb-devel" PHP_SOFT="php php-mysql php-devel" IP=`ifconfig eno16777736|grep 192|awk '{print $2}'|sed 's/addr://g'` if [ -Z $1 ];then echo -e "\033[36mPlease Se;ect Install Menu:\033[0m" echo "1)install httpd" echo "2)install mysql" echo "3)install php" echo "4)install lamp and access lamp" echo -e "\033[32m----------------------------\033[0m" echo "Usage:{Please enter $0 '@1 arg 1|2|3|4}" exit 0 fi ############################ if [ $1 == "1" ];then # install apache yum -y install $APACHE_SOFT fi if [ $1 == "2" ];then # install mysql yum -y install $MYSQL_SOFT fi if [ $1 == "3" ];then # install php yum -y install $PHP_SOFT fi if [ $1 == "4" ];then # lamp config yum -y install $APACHE_SOFT $MYSQL_SOFT $PHP_SOFT # touch index,php cat >/var/www/html/index.php< phpinfo(); ?> EOF systemctl restart httpd systemctl restart mariadb-service echo "----------------------------" echo "You can to use http://$IP/ to access." fi
文章名稱:shell之路--LAMP一鍵安裝yum版
轉(zhuǎn)載源于:http://weahome.cn/article/jjspis.html