강좌
클라우드/리눅스에 관한 강좌입니다.
클라우드 분류

네이버클라우드 실무사용법003 : Init-Script 생성

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

실습. Init-Script 생성



Server > Init Script > +Script 생성 >

.Script 이름 : ss-linux-init-script
  .OS
타입 : Linux
  .Script
에 다음과 같이 bashshell 스크립트 입력

#!/bin/bash

yum install -y httpd

sleep 15

cd /var/www/html

wget http://demo2.ncloudedu.com/ncp.tgz

sleep 10

 

tar xvfz ncp.tgz

rm -rf /etc/yum.repos.d/*

cp -rf yum.repos.d/* /etc/yum.repos.d/

cat phpadd >> /etc/httpd/conf/httpd.conf

yum install -y redis php php-redis mariadb-server php-mysql mongodb-org php-mongodb

sleep 60

 

systemctl enable httpd

systemctl enable mariadb

systemctl enable redis

systemctl enable mongod

systemctl start httpd

systemctl start mariadb

systemctl start redis

systemctl start mongod

mysql < dbstep1.sql

mysql < dbstep2.sql

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,037 명
  • 현재 강좌수 :  35,806 개
  • 현재 접속자 :  154 명