Ubuntu Server - aragorn/home GitHub Wiki
Ubuntu 14.04 기준
일반적으로 서버 세팅과정에 필요한 절차를 정리해 본다.
dpkg 기반 패키지 설정
- apt-get 준비
- sudo apt-get update
- sudo apt-get upgrade --yes
- sudo apt-get install --yes tree
JDK 8 설치하기
- 먼저 apt-get 을 위한 /etc/apt/apt.conf 설정파일에 proxy 서버를 설정한다.
Acquire::http::proxy "http://proxy.mycompany.io:3128";
Acquire::http::proxy::mycompany.com "DIRECT";
Acquire::https::proxy "http://proxy.mycompany.io:3128";
- add-apt-repository 명령으로 ppa:webupd8team/java 리포지토리를 apt-sources 에 추가한다. 이때, add-apt-repository 를 위한 http_proxy 환경변수를 적절히 설정해 주어야 한다.
export http_proxy="http://proxy.mycompany.io:3128"
export https_proxy="http://proxy.mycompany.io:3128"
sudo -E add-apt-repository ppa:webupd8team/java
- sudo 에서 -E 옵션을 사용해야 현재 shell 의 환경변수가 sudo 에서 실행하는 명령으로 전달된다.
- sudo -E add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
haveged(8) 설치
- haveged - Generate random numbers and feed linux random device.
The HAVEGE (HArdware Volatile Entropy Gathering and Expansion) algorithm harvests the indirect effects of hardware events on hidden processor state (caches, branch predictors, memory translation tables, etc) to generate a random sequence. - Spring Boot 애플리케이션을 실행할 때, 초기화 단계에서 멈추는 현상이 발생할 수 있다.
gradle bootRun --debug
로 실행하는 경우, 아래와 같은 로깅 메시지에서 멈추는 현상이다. 리눅스 시스템의 막수 생성기에 충분한 엔트로피 입력이 주어지지 않아서 발생하는 현상이다.
18:28:35.612 [QUIET] [system.out] INFO web.Application - Starting Application on shop-diff-api1.s2.krane.9rum.cc with PID 14289 (/home/deploy/diff_search1/web/build/classes/main started by deploy in /home/deploy/diff_search1/web)
18:28:35.613 [QUIET] [system.out] DEBUG web.Application - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.4.RELEASE
18:28:35.613 [QUIET] [system.out] INFO web.Application - The following profiles are active: test
-
apt-get install haveged -y
명령으로 haveged 를 설치한다. -
참고할 자료