SELinux(Security-Enhanced Linux)는 미국 국가 안보국(NSA)에서 개발한 것으로,
관리자가 시스템 엑세스 권한을 효과적으로 제어할 수 있게 하는 Linux 시스템용 보안 아키텍처입니다.
특정 서비스의 구동이 원활하지 않거나 혹은 관리의 번거로움 등으로 인해 SELinux를 Disable 하는 경우가 많은데요,
SELinux를 사용해야 하는 이유와 작동 방식에 대해 설명합니다,
본 슬라이드는 Windows환경에서 NginX구동을 실습하기 위해, PHP를 예로 들어 진행하고 있습니다. NginX는 PHP 동적웹페이지에 대한 처리보다, 정적 HTTP 서버에 적합 합니다.
본 슬라이드는 시작과 구동에 초점을 맞추고 있습니다. 설정관련 내용은 아래 공식 문서를 참조할 수 있습니다.
http://nginx.org/en/docs/beginners_guide.html
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick GuideJi-Woong Choi
본 문서는 RHEL에 내장된 재해복구솔루션 ReaR (Relax and Recover)를 이용하여 OS 영역의 데이터를 백업하고 복구하는 방법을 다루고 있습니다. ReaR는 iso를 비롯한 다양한 백업 데이터 포맷을 지원하나, 이 문서에서는 CD/DVD 미디어 반입/보관이 보안상 대부분 허용되지 않는 기업 환경에서도 원활히 사용할 수 있는 PXE boot를 지원하는 포맷으로 ReaR 백업 데이터를 생성하고 복구하는 방법만을 자세히 설명합니다.
SELinux(Security-Enhanced Linux)는 미국 국가 안보국(NSA)에서 개발한 것으로,
관리자가 시스템 엑세스 권한을 효과적으로 제어할 수 있게 하는 Linux 시스템용 보안 아키텍처입니다.
특정 서비스의 구동이 원활하지 않거나 혹은 관리의 번거로움 등으로 인해 SELinux를 Disable 하는 경우가 많은데요,
SELinux를 사용해야 하는 이유와 작동 방식에 대해 설명합니다,
본 슬라이드는 Windows환경에서 NginX구동을 실습하기 위해, PHP를 예로 들어 진행하고 있습니다. NginX는 PHP 동적웹페이지에 대한 처리보다, 정적 HTTP 서버에 적합 합니다.
본 슬라이드는 시작과 구동에 초점을 맞추고 있습니다. 설정관련 내용은 아래 공식 문서를 참조할 수 있습니다.
http://nginx.org/en/docs/beginners_guide.html
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick GuideJi-Woong Choi
본 문서는 RHEL에 내장된 재해복구솔루션 ReaR (Relax and Recover)를 이용하여 OS 영역의 데이터를 백업하고 복구하는 방법을 다루고 있습니다. ReaR는 iso를 비롯한 다양한 백업 데이터 포맷을 지원하나, 이 문서에서는 CD/DVD 미디어 반입/보관이 보안상 대부분 허용되지 않는 기업 환경에서도 원활히 사용할 수 있는 PXE boot를 지원하는 포맷으로 ReaR 백업 데이터를 생성하고 복구하는 방법만을 자세히 설명합니다.
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트Ji-Woong Choi
Docker를 활용하여 Gitlab CI/CD 설치 구성 및 샘플 테스트를 위한 가이드 문서이며, Docker 및 Gitlab에 대한 개요 및 사용법에 대해서는 다루지 않습니다. Docker image를 이용 Gitlab 및 Gitlab CI/CD 설치 및 구성 후 Sample Spring boot web application을 이용하여 소스 변경에 따른 commit이 발생 했을 때 Gitlab CI/CD 기능을 통해 application 테스트, 빌드, 배포까지의 일련의 과정이 자동으로 진행되는지를 테스트 하는 내용입니다.
Hyperledger Fabric practice material for Korea Polytechnics students
- Build Your First Network
- Chaincode Development
- Chaincode Devolopment via IBM Blockchain Platform
- Balance Transfer
- Vote system example using 'Balance Transfer' tutorial
리눅스 pacemaker 기반의 High Availaiblity 구성방법에 대해 설명합니다. pacemaker를 사용하는 다른 리눅스 기반도 구성이 가능합니다.
Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
W3C HTML5 Conference 2016 12월 7일에 발표한 WebRTC의 표준 과 기술 및 비즈니스 현황 및 미래에 대해 발표한 자료.
RemoteMonster 대표 최진호가 발표.
ORTC와의 관계
투자 현황
표준 발전 방향
기술 요소 소개
https://remotemonster.com
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트Ji-Woong Choi
Docker를 활용하여 Gitlab CI/CD 설치 구성 및 샘플 테스트를 위한 가이드 문서이며, Docker 및 Gitlab에 대한 개요 및 사용법에 대해서는 다루지 않습니다. Docker image를 이용 Gitlab 및 Gitlab CI/CD 설치 및 구성 후 Sample Spring boot web application을 이용하여 소스 변경에 따른 commit이 발생 했을 때 Gitlab CI/CD 기능을 통해 application 테스트, 빌드, 배포까지의 일련의 과정이 자동으로 진행되는지를 테스트 하는 내용입니다.
Hyperledger Fabric practice material for Korea Polytechnics students
- Build Your First Network
- Chaincode Development
- Chaincode Devolopment via IBM Blockchain Platform
- Balance Transfer
- Vote system example using 'Balance Transfer' tutorial
리눅스 pacemaker 기반의 High Availaiblity 구성방법에 대해 설명합니다. pacemaker를 사용하는 다른 리눅스 기반도 구성이 가능합니다.
Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
W3C HTML5 Conference 2016 12월 7일에 발표한 WebRTC의 표준 과 기술 및 비즈니스 현황 및 미래에 대해 발표한 자료.
RemoteMonster 대표 최진호가 발표.
ORTC와의 관계
투자 현황
표준 발전 방향
기술 요소 소개
https://remotemonster.com
We offer custom mobile website design that is both affordable and results driven. We are a leader in mobile web and have designed hundreds of custom mobile websites.
오픈스택 커뮤니티 - 제1회 공개 SW 커뮤니티데이 (2017년 9월 정기 세미나 대체)
- 일시: 9월 22일 금요일
- 발표자: 장태희 (운영진, 스터디 매니저)
- 행사 정보: https://www.facebook.com/groups/openstack.kr/permalink/1826976907316452/
source : http://www.opennaru.com/apm/apache-tomcat-auto-provisioning/
OPENMARU APM은 Apache 웹서버와 Tomcat 에 대하여 자동으로 설치와 구성 그리고 튜닝하며 해당 구성에 대한 설치보고서를 자동생성하는 OPENMARU Installer 기능을 제공합니다.
이 기능은 OS 만 설치되어 있으면 수분 이내에 웹 서버와 WAS 서버를 설치하고 고난이도의 클러스터링 설정이나 리눅스 튜닝을 자동으로 수행하여 즉시 서비스할 수 있는 환경을 구성해주는 자동 프로비져닝 기능입니다.
기존의 엔지니어의 기술 지원에 의존적인 웹서버와 WAS 구성을 전문가 수준으로 자동으로 구성하여, 구축기간 뿐만아니라 비용 절감 효과를 제공합니다.
2. Kiril Georgiev played 360 people simultaneously in Sofia, Bulgaria.
His final score was 284 wins, 70 draws and 6 losses.
• Multiple protocol support (HTTP, HTTPS, WebSocket, IMAP, POP3, SMTP)
• SSL termination (TLSv1.1/TLSv1.2/SSL/SNI/PFS/PCI-DSS and OCSP Stapling)
• HTTP video streaming using MP4/FLV/HDS/HLS
• Caching static & dynamic content
• Content compression
• Header manipulation
• Request filtering
• Extended monitoring and logging
• Upgrades without downtime using live binaries
• Graceful restart with non-stop request processing
• Complete reverse proxy and load balancer
3. $ sudo yum install epel-release
$ sudo yum install epel-release
$ sudo yum -y install nginx
$ nginx -h
nginx version: nginx/1.0.15
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/share/nginx/)
-c filename : set configuration file (default: /etc/nginx/nginx.conf)
-g directives : set global directives out of configuration file
$ sudo nginx
NGINX 설치
(직접 컴파일 해야 하는 경우는 http://nginx.org/en/docs/configure.html)
INSTALL NGINX
6. WORKER
PROCESS
MASTER PROCESS
WORKER
PROCESS
WORKER
PROCESS
WORKER
PROCESS
root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx
nginx 32476 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32477 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32479 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32480 32475 0 13:36 ? 00:00:00 _ nginx: worker process
worker_processes 4;
events {
worker_connections 2048;
}
( Total worker connections : 4 x 2048 )
PROCESSES
7. WORKER
PROCESS
MASTER PROCESS
WORKER
PROCESS
WORKER
PROCESS
WORKER
PROCESS
root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx
nginx 32476 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32477 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32479 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32480 32475 0 13:36 ? 00:00:00 _ nginx: worker process
nginx 32481 32475 0 13:36 ? 00:00:00 _ nginx: cache manager process
nginx 32482 32475 0 13:36 ? 00:00:00 _ nginx: cache loader process
CACHE
MANAGER
CACHE
LOADER
PROCESSES
8. TERM, INT fast shutdown
QUIT graceful shutdown
HUP
changing configuration, keeping up
with a changed time zone (only for
FreeBSD and Linux), starting new
worker processes with a new
configuration, graceful shutdown of
old worker processes
USR1 re-opening log files
USR2 upgrading an executable file
WINCH graceful shutdown of worker processes
$ sudo nginx -s [OPTION]
stop — fast shutdown
quit — graceful shutdown
reload — reloading the configuration file
reopen — reopening the log files
$ sudo kill -HUP `cat /var/run/nginx.pid` $ sudo nginx -s reload
SIGNALS
9. PID PPID USER %CPU VSZ WCHAN COMMAND
33126 1 root 0.0 1148 pause nginx: master process
33127 33126 nobody 0.0 1380 kqread nginx: worker process (nginx)
33128 33126 nobody 0.0 1364 kqread nginx: worker process (nginx)
33129 33126 nobody 0.0 1364 kqread nginx: worker process (nginx)
33130 33126 nobody 0.0 1364 kqread nginx: worker process (nginx)
PID PPID USER %CPU VSZ WCHAN COMMAND
33126 1 root 0.0 1164 pause nginx: master process
33130 33126 nobody 0.0 1380 kqread nginx: worker process is
shutting down (nginx)
33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
33137 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
33138 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
PID PPID USER %CPU VSZ WCHAN COMMAND
33126 1 root 0.0 1164 pause nginx: master process
33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
33137 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
33138 33126 nobody 0.0 1368 kqread nginx: worker process (nginx)
BEFORE RELOAD
AFTER RELOAD
RELOADING
RELOAD NEW CONFIGURATION WITH NO DOWNTIME
12. Worker Process
worker_processes 2;
events {
worker_connections 65536;
use epoll;
multi_accept on;
}
/etc/nginx/nginx.conf
1
2
3
4
worker_process 는 Event Looping Single Thread 로 일반적으로 CPU Core 수에 맞게 설정한다.
또는, worker_processes auto; 하여 자동으로 Core 수에 맞게 실행되도록 할 수 있다.
$ grep ^processor /proc/cpuinfo | wc -l
Core 수 확인은 아래와 같이 함.
1
3 epoll 방식은 Kernel 에 의존하여 file descriptor 중 변화가 있는(이벤트 감지) 신호를 받아 처리
하는 방식으로 대용량 트래픽 처리에 적합하다.
2
worker process 별로 최대 연결할 수 있는 수이며, $ ulimit -n 로 file descriptor 수를 확인하
여 같거자 작은 값으로 설정해야 한다.
worker_connections =
inbound 연결수 + 연결 대기 수 + outbound 수(proxy 대상인 upstream servers)
4 work process 가 동시에 file descriptor 를 처리 할 수 있도록 하는 옵션이다.
13. HTTP section
http {
keepalive_timeout 65;
keepalive_requests 100000;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
}
/etc/nginx/nginx.conf
1
2
3
4
1
4
keepalive_timeout 은 TCP 연결 timeout (default: 75s) 이다.
keepalive_requests 는 하나의 Connection 에서 처리 할 수 있는 최대 request 수 (default :
100) 이다.
2
3
tcp_nopush on 은 sendfile on 일때만 동작하며, 소켓 옵션 중 TCP_CORK 를 사용하여 HTTP
Header 를 하나의 소켓으로 전송한다.
sendfile (default : off) 을 on 하게 되면, 이미지나 비디오 같은 static 파일을 multi
thread 로 보내도록 한다. 주로 이미지를 전송하게 되는 경우 사용한다.
tcp_nopush on 과 함께 사용하며, Client 로 부터의 ACK 를 최소화 하여 지연을 줄이는 방식이다.
14. HTTP section
http {
client_body_buffer_size 128k;
client_max_body_size 10m;
client_header_buffer_size 1k;
}
/etc/nginx/nginx.conf
1
2
1 client_body_buffer_size (Default 8k(32Bit) / 16k(64Bit)) 는 POST 로 전송되는
payload 사이즈이며 일반적으로 128k 가 적당하다. 초과 할 경우 temp 파일이 생성되어 속도 저하
가 발생한다.
client_max_body_size (Default: 1m) 는 최대 사이즈이며 초과 할 경우 413 (Request
Entity Too Large)를 반환한다.
2
client_header_buffer_size (default : 1k) header 사이즈며 대부분 1k 면 충분하다.
하지만 Cookie 가 상당히 많은 경우는 이를 조정할 필요가 있다. on 하게 되면, 이미지나 비디오
같은 static 파일을 multi thread 로 보내도록 한다. 주로 이미지를 전송하게 되는 경우 사용한
다.
15. Kernel Network Configuration
net.core.somaxconn = 65536
net.ipv4.tcp_max_tw_buckets = 1440000
/etc/sysctl.conf
1
2
1 net.core.somaxconn 는 socket max connection을 의미하며, 커널이 최대 연결 가능한 소
캣 수이다. 일반적으로 $ ulimit -n 에서 나오는 File Descriptor 와 일치 시킨다.
현재 설정 값은 $ cat /proc/sys/net/core/somaxconn 로 확인이 가능하다.
2 net.ipv4.tcp_max_tw_buckets 는 동시에 발생하는 timewait socket 수의 최대 값을 지정
하는 것으로, 이를 초과 하면 socket 을 제거 된다.
현재 설정 값은 $ cat cat /proc/sys/net/ipv4/tcp_max_tw_buckets 로 확인이 가능하다.
16. Compression
http {
server {
gzip on;
gzip_min_length 1000;
gzip_types: text/html text/javascript text/plain text/xml application/xml;
gzip_disable "MSIE [1-6].”;
}
}
/etc/nginx/nginx.conf
gzip on (default: off) 으로 응답 결과를 압축하도록 설정한다.
gzip_min_length (default: 20) 로 응답 사이즈의 최소값을 지정한다. 단위는 bytes.
gzip_types (default: text/html) 으로 MIME 타입을 지정하고 해당하는 MIME 타입인 경우에만 압축하도록 한다.
gzip_disable 요청 해더의 “User-Agent” 가 지정한 경우와 일치하는 경우 압축하지 않도록 한다.