클라우드 분류
네이버클라우드 실무사용법003 : Init-Script 생성
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 2,290 조회
- 0 추천
- 목록
본문
실습. 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 |
"무단배포금지: 클라우드포털(www.linux.co.kr)의 모든 강좌는 저작권에 의해 보호되는 콘텐츠입니다. 무단으로 복제하여 배포하는 행위는 금지되어 있습니다."
관련자료
-
이전
-
다음
댓글 0
등록된 댓글이 없습니다.