# 어플리케이션 설치된 서버 복사본을 만들어 사용해보자.
# 특히, 프라이븟에 있는 서버에 로그온해 어플리케이션 설치하기 힘들다.
1
운영중인 서버를 내 서버 이미지로 만들수 있다.
어플리케이션 설치가 모두 완료된 서버를 이미지로 만드는 것이다.
단, 패스워드는 복사 되지 않는다.
2
Server > 서버 선택 > 서버 관리 및 설정 변경> 내 서버 이미지 생성
game-web-image
디스크 용량은 크게해서 생성해보자.
1
내 서버 이미지로 프라이빗에 서버를 2대 생성해보자.
Server > Server Image >
서버 선택
서버 생성
2
game-was
Script 선택 선택 없음.
다음
ncp-game-web01
서버수 2대로 변경
생성
3
참고
# init file
#!/bin/bash
Wget -O /etc/yum.repos.d/Rocky-Extras.repo http://init.ncloud.com/server/linux/repo/rocky8/Rocky-Extras.repo
yum clean all
yum -y install httpd php mariadb-server php-mysqlnd
sleep 60
cd /var/www/html
wget https://kr.object.ncloudstorage.com/ncp-manual/handson/lab.tgz
tar xvfz lab.tgz
/usr/bin/cp -rf php.conf /etc/httpd/conf.d/php.conf
/usr/bin/cp -rf www.conf /etc/php-fpm.d/www.conf
systemctl enable mariadb
systemctl enable httpd
systemctl enable php-fpm
systemctl start mariadb
systemctl start httpd
systemctl start php-fpm
1
#!/bin/bash
yum -y install httpd
systemctl enable httpd
systemctl start httpd
echo '<html><h1>Hello From Your Web Server!</h1></html>' > /var/www/html/index.html
2
다음
https://brunch.co.kr/@topasvga/4672