<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ubuntu Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Fri, 05 Dec 2025 12:21:43 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>Ubuntu Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Nginx + Apache / Reverse Proxy</title>
		<link>https://lycos7560.com/ubuntu/nginx-apache-reverse-proxy/40373/</link>
					<comments>https://lycos7560.com/ubuntu/nginx-apache-reverse-proxy/40373/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Fri, 05 Dec 2025 12:18:49 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[127.0.0.1]]></category>
		<category><![CDATA[301 redirect]]></category>
		<category><![CDATA[502 bad gateway]]></category>
		<category><![CDATA[a2dissite]]></category>
		<category><![CDATA[a2ensite]]></category>
		<category><![CDATA[access log]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache configuration]]></category>
		<category><![CDATA[apache modules]]></category>
		<category><![CDATA[apache reload]]></category>
		<category><![CDATA[apache virtualhost]]></category>
		<category><![CDATA[application server]]></category>
		<category><![CDATA[auto renewal]]></category>
		<category><![CDATA[Backend Server]]></category>
		<category><![CDATA[Caching Strategy]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Certbot]]></category>
		<category><![CDATA[Certificate Management]]></category>
		<category><![CDATA[connection pooling]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Decryption]]></category>
		<category><![CDATA[deny rules]]></category>
		<category><![CDATA[document root]]></category>
		<category><![CDATA[domain configuration]]></category>
		<category><![CDATA[downstream server]]></category>
		<category><![CDATA[dynamic content]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[error log]]></category>
		<category><![CDATA[file protection]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[frontend server]]></category>
		<category><![CDATA[gzip compression]]></category>
		<category><![CDATA[Header Manipulation]]></category>
		<category><![CDATA[host header]]></category>
		<category><![CDATA[HSTS]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[http to https]]></category>
		<category><![CDATA[HTTP2]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[https redirect]]></category>
		<category><![CDATA[internal port]]></category>
		<category><![CDATA[KeepAlive]]></category>
		<category><![CDATA[lamp stack]]></category>
		<category><![CDATA[lemp stack]]></category>
		<category><![CDATA[let's encrypt]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[location block]]></category>
		<category><![CDATA[Log Analysis]]></category>
		<category><![CDATA[mixed content]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[nginx configuration]]></category>
		<category><![CDATA[nginx modules]]></category>
		<category><![CDATA[nginx reload]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[permanent redirect]]></category>
		<category><![CDATA[php processing]]></category>
		<category><![CDATA[port configuration]]></category>
		<category><![CDATA[port forwarding]]></category>
		<category><![CDATA[port forwarding configuration]]></category>
		<category><![CDATA[proxy buffer]]></category>
		<category><![CDATA[proxy headers]]></category>
		<category><![CDATA[proxy pass]]></category>
		<category><![CDATA[proxy redirect]]></category>
		<category><![CDATA[proxy set header]]></category>
		<category><![CDATA[real ip]]></category>
		<category><![CDATA[redirect loop]]></category>
		<category><![CDATA[regex location]]></category>
		<category><![CDATA[remote addr]]></category>
		<category><![CDATA[Request Forwarding]]></category>
		<category><![CDATA[Reverse Proxy]]></category>
		<category><![CDATA[scheme forwarding]]></category>
		<category><![CDATA[security headers]]></category>
		<category><![CDATA[seo optimization]]></category>
		<category><![CDATA[server block]]></category>
		<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[server management]]></category>
		<category><![CDATA[server name]]></category>
		<category><![CDATA[server optimization]]></category>
		<category><![CDATA[sites-available]]></category>
		<category><![CDATA[sites-enabled]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[ssl certificate]]></category>
		<category><![CDATA[SSL Termination]]></category>
		<category><![CDATA[Static Files]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[symbolic link]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[TLS]]></category>
		<category><![CDATA[tls termination]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[upstream server]]></category>
		<category><![CDATA[virtual host]]></category>
		<category><![CDATA[web architecture]]></category>
		<category><![CDATA[web hosting]]></category>
		<category><![CDATA[Web Performance]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[web stack]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress security]]></category>
		<category><![CDATA[wp-config]]></category>
		<category><![CDATA[x-content-type-options]]></category>
		<category><![CDATA[x-forwarded-for]]></category>
		<category><![CDATA[x-forwarded-proto]]></category>
		<category><![CDATA[X-Frame-Options]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기초]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40373</guid>

					<description><![CDATA[<p>Nginx를 리버스 프록시로, Apache를 백엔드 웹서버로 사용하는 구성 방법 Nginx가 SSL/TLS 처리와 클라이언트 요청을 담당하고, Apache는 WordPress 애플리케이션을 실행 아키텍처 구조 1. WordPress 설정 파일 위치 wp-config.php (WordPress 루트 디렉토리) 설정 목적 Nginx 리버스 프록시 환경에서 WordPress가 HTTPS를 올바르게 인식하도록 설정 코드 추가 위치 /* That's all, stop editing! Happy blogging. */ 주석 위에 다음 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/nginx-apache-reverse-proxy/40373/">Nginx + Apache / Reverse Proxy</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>


				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-ad566142      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#아키텍처-구조" class="uagb-toc-link__trigger">아키텍처 구조</a><li class="uagb-toc__list"><a href="#1-wordpress-설정" class="uagb-toc-link__trigger">1. WordPress 설정</a><li class="uagb-toc__list"><a href="#2-nginx-설정" class="uagb-toc-link__trigger">2. Nginx 설정</a><li class="uagb-toc__list"><a href="#3-apache-설정" class="uagb-toc-link__trigger">3. Apache 설정</a><li class="uagb-toc__list"><a href="#4-전체-설정-흐름" class="uagb-toc-link__trigger">4. 전체 설정 흐름</a><li class="uagb-toc__list"><a href="#5-트러블슈팅" class="uagb-toc-link__trigger">5. 트러블슈팅</a><li class="uagb-toc__list"><a href="#6-보안-체크리스트" class="uagb-toc-link__trigger">6. 보안 체크리스트</a><li class="uagb-toc__list"><a href="#7-성능-최적화-팁" class="uagb-toc-link__trigger">7. 성능 최적화 팁</a><li class="uagb-toc__list"><a href="#참고-사항" class="uagb-toc-link__trigger">참고 사항</a></ol>					</div>
									</div>
				</div>
			


<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Nginx를 리버스 프록시로, Apache를 백엔드 웹서버로 사용하는 구성 방법</p>



<p>Nginx가 SSL/TLS 처리와 클라이언트 요청을 담당하고, Apache는 WordPress 애플리케이션을 실행</p>



<ul class="wp-block-list">
<li><strong>Nginx</strong>: <br>&#8211; 정적 파일(이미지, CSS, JS) 처리에 매우 빠르고 동시 접속 처리에 강함<br>&#8211; Nginx는 Apache보다 훨씬 적은 메모리 사용<br>&#8211; Nginx는 이벤트 기반 구조로 수천 개의 동시 연결을 적은 리소스로 처리</li>



<li><strong>Apache</strong>: PHP 처리와 .htaccess 지원이 우수하고, WordPress 같은 PHP 애플리케이션과 호환성이 좋음</li>
</ul>



<h2 class="wp-block-heading">아키텍처 구조</h2>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">클라이언트 → Nginx (80/443포트) → Apache (5050포트) → WordPress
           ↓
      SSL/TLS 처리
      HTTPS 강제
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">1. WordPress 설정</h2>



<h3 class="wp-block-heading">파일 위치</h3>



<p><code>wp-config.php</code> (WordPress 루트 디렉토리)</p>



<h3 class="wp-block-heading">설정 목적</h3>



<p>Nginx 리버스 프록시 환경에서 WordPress가 HTTPS를 올바르게 인식하도록 설정</p>



<h3 class="wp-block-heading">코드 추가 위치</h3>



<p><code>/* That's all, stop editing! Happy blogging. */</code> 주석 <strong>위에</strong> 다음 코드를 추가</p>



<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Nginx 리버스 프록시 환경에서 HTTPS를 강제 인식시키는 코드
if (
    (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') ||
    (isset($_SERVER['HTTP_X_FORWARDED_SSL']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_SSL'] === 'on')
) {
    $_SERVER['HTTPS'] = 'on';
}
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">설명</h3>



<ul class="wp-block-list">
<li>Nginx가 전달하는 <code>X-Forwarded-Proto</code> 헤더를 확인</li>



<li>HTTPS 요청임을 감지하면 <code>$_SERVER['HTTPS']</code>를 <code>'on'</code>으로 설정</li>



<li>WordPress의 리다이렉트 루프 및 Mixed Content 문제 해결</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">2. Nginx 설정</h2>



<h3 class="wp-block-heading">파일 위치</h3>



<p><code>/etc/nginx/sites-available/test.conf</code></p>



<h3 class="wp-block-heading">주요 명령어</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 문법 검사
sudo nginx -t

# 설정 활성화 (심볼릭 링크 생성)
sudo ln -s /etc/nginx/sites-available/test.conf /etc/nginx/sites-enabled/

# 설정 비활성화 (심볼릭 링크 제거)
sudo rm /etc/nginx/sites-enabled/test.conf

# Nginx 상태 확인
sudo systemctl status nginx

# Nginx 재시작
sudo systemctl restart nginx
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">설정 구조</h3>



<h4 class="wp-block-heading">(1) HTTP → HTTPS 리다이렉트 (포트 80)</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">server {
    listen 80;
    listen [::]:80;
    server_name test.com www.test.com;

    # 모든 HTTP 요청을 HTTPS로 301 영구 이동
    return 301 https://$host$request_uri;
}
</pre>



<p><strong>기능:</strong></p>



<ul class="wp-block-list">
<li>모든 HTTP 요청을 HTTPS로 강제 리다이렉트</li>



<li>SEO 및 보안 향상</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">(2) HTTPS 요청 처리 및 프록시 (포트 443)</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name test.com www.test.com;

    # SSL/TLS 인증서 설정 (Let's Encrypt)
    ssl_certificate /etc/letsencrypt/live/test.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/test.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;

    # 보안 헤더 설정
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
    add_header X-Content-Type-Options nosniff always;
    add_header X-Frame-Options SAMEORIGIN always;

    # Apache로 프록시
    location / {
        proxy_pass http://127.0.0.1:5050;
        
        # 클라이언트 원본 정보 전달
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        
        # HTTPS 정보 전달 (필수)
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port 443;
        
        proxy_redirect off;
    }

    # .ht 파일 보안 차단
    location ~ /\.ht {
        deny all;
    }
}
</pre>



<p><strong>주요 기능:</strong></p>



<ul class="wp-block-list">
<li><strong>SSL/TLS 처리</strong>: Nginx가 HTTPS 암호화/복호화 담당</li>



<li><strong>보안 헤더</strong>: HSTS, XSS 보호, 클릭재킹 방지</li>



<li><strong>프록시 헤더</strong>: Apache가 실제 클라이언트 정보를 알 수 있도록 전달</li>



<li><strong>X-Forwarded-Proto</strong>: WordPress가 HTTPS를 인식하는 데 필수</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">3. Apache 설정</h2>



<h3 class="wp-block-heading">포트 설정</h3>



<p><strong>파일:</strong> <code>/etc/apache2/ports.conf</code></p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Listen 5050
</pre>



<p><strong>설명:</strong></p>



<ul class="wp-block-list">
<li>Apache는 외부 접근 불가능한 내부 포트 5050에서만 대기</li>



<li>Nginx만 이 포트로 요청 전달 가능</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">VirtualHost 설정</h3>



<p><strong>파일:</strong> <code>/etc/apache2/sites-available/test.conf</code></p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:5050>
    ServerName test.com
    ServerAlias www.test.com

    DocumentRoot /path/to/wordpress/

    ErrorLog ${APACHE_LOG_DIR}/test_error_444.log
    CustomLog ${APACHE_LOG_DIR}/test_access_444.log combined
&lt;/VirtualHost>
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">주요 명령어</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 사이트 활성화
sudo a2ensite test.conf

# 사이트 비활성화
sudo a2dissite test.conf

# Apache 설정 다시 로드
sudo systemctl reload apache2
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">4. 전체 설정 흐름</h2>



<h3 class="wp-block-heading">초기 설정 순서</h3>



<ol class="wp-block-list">
<li><strong>Apache 포트 변경</strong> <code>sudo vim /etc/apache2/ports.conf # Listen 5050 추가</code></li>



<li><strong>Apache VirtualHost 생성</strong> <code>sudo vim /etc/apache2/sites-available/test.conf sudo a2ensite test.conf sudo systemctl reload apache2</code></li>



<li><strong>WordPress 설정 수정</strong> <code>sudo vim /path/to/wordpress/wp-config.php # 프록시 인식 코드 추가</code></li>



<li><strong>Nginx 설정 생성</strong> <code>sudo vim /etc/nginx/sites-available/test.conf sudo nginx -t sudo ln -s /etc/nginx/sites-available/test.conf /etc/nginx/sites-enabled/ sudo systemctl restart nginx</code></li>



<li><strong>SSL 인증서 발급 (Let&#8217;s Encrypt)</strong> <code>sudo certbot --nginx -d test.com -d www.test.com</code></li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">5. 트러블슈팅</h2>



<h3 class="wp-block-heading">일반적인 문제</h3>



<h4 class="wp-block-heading">문제 1: WordPress 리다이렉트 루프</h4>



<p><strong>원인:</strong> WordPress가 HTTPS를 인식하지 못함<br><strong>해결:</strong> <code>wp-config.php</code>에 프록시 인식 코드 확인</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">문제 2: Mixed Content 경고</h4>



<p><strong>원인:</strong> HTTP 리소스가 HTTPS 페이지에 로드됨<br><strong>해결:</strong> WordPress 설정 &gt; 사이트 주소를 <code>https://</code>로 변경</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">문제 3: 502 Bad Gateway</h4>



<p><strong>원인:</strong> Apache가 5050 포트에서 실행되지 않음<br><strong>해결:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl status apache2
sudo netstat -tlnp | grep 5050
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">문제 4: SSL 인증서 오류</h4>



<p><strong>원인:</strong> 인증서 경로가 올바르지 않음<br><strong>해결:</strong> Nginx 설정에서 인증서 경로 확인</p>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">6. 보안 체크리스트</h2>



<ul class="wp-block-list">
<li>[ ] HTTP → HTTPS 강제 리다이렉트 작동</li>



<li>[ ] Apache는 localhost(127.0.0.1)에서만 접근 가능</li>



<li>[ ] SSL 인증서 자동 갱신 설정</li>



<li>[ ] 보안 헤더(HSTS, X-Frame-Options 등) 적용</li>



<li>[ ] <code>.ht</code> 파일 접근 차단</li>



<li>[ ] 방화벽에서 5050 포트 외부 차단</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">7. 성능 최적화 팁</h2>



<ol class="wp-block-list">
<li><strong>Nginx 캐싱 활성화</strong>: 정적 파일을 Nginx에서 직접 서빙</li>



<li><strong>Gzip 압축</strong>: 텍스트 기반 콘텐츠 압축</li>



<li><strong>HTTP/2 활성화</strong>: 이미 설정됨 (<code>http2</code> 옵션)</li>



<li><strong>Keep-Alive 설정</strong>: 연결 재사용</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">참고 사항</h2>



<ul class="wp-block-list">
<li><strong>도메인</strong>: 실제 도메인으로 <code>test.com</code> 변경 필요</li>



<li><strong>경로</strong>: WordPress 설치 경로에 맞게 수정</li>



<li><strong>포트</strong>: 5050 포트는 예시이며, 다른 포트 사용 가능 (보안을 위해 비표준 포트 권장)</li>



<li><strong>로그</strong>: 각 설정 파일에 명시된 로그 경로에서 문제 진단 가능</li>
</ul>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/nginx-apache-reverse-proxy/40373/">Nginx + Apache / Reverse Proxy</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/nginx-apache-reverse-proxy/40373/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu에 Gemini CLI 설치</title>
		<link>https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 25 Nov 2025 16:02:48 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[$\text{apt}$]]></category>
		<category><![CDATA[$\text{GEMINI\_API\_KEY}$]]></category>
		<category><![CDATA[$\text{npm install -g}$]]></category>
		<category><![CDATA[$\text{npm uninstall}$]]></category>
		<category><![CDATA[$\text{string-width}$]]></category>
		<category><![CDATA[$v$ flag]]></category>
		<category><![CDATA[$v$ 플래그]]></category>
		<category><![CDATA[AI Assistant]]></category>
		<category><![CDATA[AI Chatbot]]></category>
		<category><![CDATA[AI Tool]]></category>
		<category><![CDATA[AI Workflows]]></category>
		<category><![CDATA[AI 워크플로우]]></category>
		<category><![CDATA[AI 툴]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[API Key]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Clean Up]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[CLI Tips]]></category>
		<category><![CDATA[CLI Tool]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Command Line Interface]]></category>
		<category><![CDATA[Commands]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[Console Application]]></category>
		<category><![CDATA[Dependencies]]></category>
		<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Dev Tips]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Development Environment]]></category>
		<category><![CDATA[environment-variable]]></category>
		<category><![CDATA[Error Fix]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[Full Stack]]></category>
		<category><![CDATA[GCP]]></category>
		<category><![CDATA[Gemini 2.5 Pro]]></category>
		<category><![CDATA[Gemini AI]]></category>
		<category><![CDATA[Gemini CLI]]></category>
		<category><![CDATA[Gemini Pro]]></category>
		<category><![CDATA[Gemini Quick Start]]></category>
		<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[Global Install]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Google Gemini]]></category>
		<category><![CDATA[How to Install]]></category>
		<category><![CDATA[Installation Guide]]></category>
		<category><![CDATA[Invalid regular expression flags]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Large Language Model]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Development]]></category>
		<category><![CDATA[Linux OS]]></category>
		<category><![CDATA[Linux Setup]]></category>
		<category><![CDATA[LLM]]></category>
		<category><![CDATA[Node Version]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Node.js Upgrade]]></category>
		<category><![CDATA[Node.js 호환성]]></category>
		<category><![CDATA[Nodejs v18]]></category>
		<category><![CDATA[Nodejs v20]]></category>
		<category><![CDATA[npm]]></category>
		<category><![CDATA[nvm]]></category>
		<category><![CDATA[NVM Install]]></category>
		<category><![CDATA[NVM 설치]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OS Setup]]></category>
		<category><![CDATA[Package Manager]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Step-by-Step]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[SyntaxError]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tech Trends]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[Ubuntu Development]]></category>
		<category><![CDATA[Ubuntu Guide]]></category>
		<category><![CDATA[Ubuntu Server]]></category>
		<category><![CDATA[Uninstall Node]]></category>
		<category><![CDATA[Version Management]]></category>
		<category><![CDATA[Zsh]]></category>
		<category><![CDATA[개발 트렌드]]></category>
		<category><![CDATA[개발 팁]]></category>
		<category><![CDATA[개발 환경]]></category>
		<category><![CDATA[개발 효율]]></category>
		<category><![CDATA[개발자]]></category>
		<category><![CDATA[거대 언어 모델]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 제미나이]]></category>
		<category><![CDATA[기술]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[단계별 가이드]]></category>
		<category><![CDATA[루트 권한]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리눅스 개발]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[버전 관리]]></category>
		<category><![CDATA[버전 문제]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[빠른 시작]]></category>
		<category><![CDATA[생성형 AI]]></category>
		<category><![CDATA[설치 가이드]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[시스템 정리]]></category>
		<category><![CDATA[오류 해결]]></category>
		<category><![CDATA[오픈소스]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[의존성]]></category>
		<category><![CDATA[인공지능]]></category>
		<category><![CDATA[인공지능 비서]]></category>
		<category><![CDATA[인증]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[전역 설치]]></category>
		<category><![CDATA[정규 표현식]]></category>
		<category><![CDATA[제미나이]]></category>
		<category><![CDATA[챗봇]]></category>
		<category><![CDATA[콘솔 앱]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[튜토리얼]]></category>
		<category><![CDATA[패키지 매니저]]></category>
		<category><![CDATA[패키지 제거]]></category>
		<category><![CDATA[프로그래밍]]></category>
		<category><![CDATA[환경 변수]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40364</guid>

					<description><![CDATA[<p>1단계: Node.js 및 npm 설치 (1) NVM (Node Version Manager)을 이용한 설치 (추천) (2) apt를 통한 기본 설치 2단계: Gemini CLI 설치 3단계: Gemini CLI 실행 및 인증 설치가 완료되면, 터미널에 gemini 명령어를 입력하여 실행 최초 실행 시 다음과 같은 설정 및 인증 과정이 진행됩니다. 인증이 성공적으로 완료되면, Gemini CLI 프롬프트(gemini &#62;)가 나타나며 바로 Gemini를 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/">Ubuntu에 Gemini CLI 설치</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-c8e0bf3e      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1단계-nodejs-및-npm-설치" class="uagb-toc-link__trigger">1단계: Node.js 및 npm 설치</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-nvm-node-version-manager을-이용한-설치-추천" class="uagb-toc-link__trigger">(1) NVM (Node Version Manager)을 이용한 설치 (추천)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-apt를-통한-기본-설치" class="uagb-toc-link__trigger">(2) apt를 통한 기본 설치</a></li></ul></li><li class="uagb-toc__list"><a href="#2단계-gemini-cli-설치" class="uagb-toc-link__trigger">2단계: Gemini CLI 설치</a><li class="uagb-toc__list"><a href="#3단계-gemini-cli-실행-및-인증" class="uagb-toc-link__trigger">3단계: Gemini CLI 실행 및 인증</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">1단계: Node.js 및 npm 설치</h2>



<ul class="wp-block-list">
<li>Gemini CLI는 <strong>Node.js 버전 20 이상</strong>을 권장</li>
</ul>



<h3 class="wp-block-heading">(1) NVM (Node Version Manager)을 이용한 설치 (추천)</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Node.js 20 이상인지 확인
node -v
npm -v

// NVM 설치 (버전 번호는 최신 버전으로 바뀔 수 있음):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

// 터미널 재시작 또는 적용:
source ~/.bashrc 
# 또는 새 터미널 창을 엽니다.

// 최신 LTS Node.js 설치:
nvm install --lts
nvm use --lts</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">(2) <code>apt</code>를 통한 기본 설치</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Node.js 20 이상인지 확인
node -v
npm -v

sudo apt update
sudo apt install -y nodejs npm</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">2단계: Gemini CLI 설치</h2>



<ul class="wp-block-list">
<li>Node.js와 npm이 준비되었다면, npm을 사용하여 Gemini CLI를 <strong>전역으로</strong> 설치</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo npm install -g @google/gemini-cli</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">3단계: Gemini CLI 실행 및 인증</h2>



<p>설치가 완료되면, 터미널에 <code>gemini</code> 명령어를 입력하여 실행</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gemini</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<p>최초 실행 시 다음과 같은 설정 및 인증 과정이 진행됩니다.</p>



<ol start="1" class="wp-block-list">
<li><strong>테마 선택:</strong> 터미널에서 원하는 CLI <strong>테마</strong>를 선택합니다.</li>



<li><strong>인증 방법 선택:</strong>
<ul class="wp-block-list">
<li><strong>Google 로그인 (권장):</strong> <br>개인 Google 계정으로 로그인하여 사용합니다. <br>브라우저 창이 열리면 로그인 및 인증을 완료하세요. <br>무료 등급에서는 Gemini 2.5 Pro 모델에 대한 충분한 요청 횟수(예: 분당 60회, 일일 1,000회)가 제공됩니다.</li>



<li><strong>API 키 사용:</strong> <br>Google AI Studio 등에서 발급받은 <strong>API 키</strong>를 사용하려면 환경 변수로 설정하거나 이 옵션을 선택합니다. <br>(예: <code>export GEMINI_API_KEY="YOUR_API_KEY"</code>)</li>
</ul>
</li>
</ol>



<p>인증이 성공적으로 완료되면, Gemini CLI 프롬프트(<code>gemini &gt;</code>)가 나타나며 바로 Gemini를 사용할 수 있습니다.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1500" height="611" src="https://lycos7560.com/wp-content/uploads/2025/11/image.png" alt="" class="wp-image-40365" srcset="https://lycos7560.com/wp-content/uploads/2025/11/image.png 1500w, https://lycos7560.com/wp-content/uploads/2025/11/image-300x122.png 300w, https://lycos7560.com/wp-content/uploads/2025/11/image-768x313.png 768w" sizes="(max-width: 1500px) 100vw, 1500px" /><figcaption class="wp-element-caption">성공</figcaption></figure>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/">Ubuntu에 Gemini CLI 설치</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Apache Virtual Host Guide (Apache 가상 호스트 설정)</title>
		<link>https://lycos7560.com/ubuntu/apache-%ea%b0%80%ec%83%81%ed%98%b8%ec%8a%a4%ed%8a%b8-%ec%84%a4%ec%a0%95-%ea%b0%80%ec%9d%b4%eb%93%9c/40358/</link>
					<comments>https://lycos7560.com/ubuntu/apache-%ea%b0%80%ec%83%81%ed%98%b8%ec%8a%a4%ed%8a%b8-%ec%84%a4%ec%a0%95-%ea%b0%80%ec%9d%b4%eb%93%9c/40358/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 25 Nov 2025 14:56:56 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[301Redirect]]></category>
		<category><![CDATA[301리다이렉트]]></category>
		<category><![CDATA[403Forbidden]]></category>
		<category><![CDATA[404NotFound]]></category>
		<category><![CDATA[500Error]]></category>
		<category><![CDATA[502Error]]></category>
		<category><![CDATA[503Error]]></category>
		<category><![CDATA[504GatewayTimeout]]></category>
		<category><![CDATA[AccessControl]]></category>
		<category><![CDATA[AccessLog]]></category>
		<category><![CDATA[AllowOverride]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[ApacheModules]]></category>
		<category><![CDATA[ARecord]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[BasicAuth]]></category>
		<category><![CDATA[BestPractices]]></category>
		<category><![CDATA[Brotli]]></category>
		<category><![CDATA[BrowserCache]]></category>
		<category><![CDATA[Caching]]></category>
		<category><![CDATA[Certbot]]></category>
		<category><![CDATA[Cheatsheet]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[Chown]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Clustering]]></category>
		<category><![CDATA[CNAME]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[ConfigTest]]></category>
		<category><![CDATA[CrtFile]]></category>
		<category><![CDATA[CSR]]></category>
		<category><![CDATA[CSRF]]></category>
		<category><![CDATA[Curl]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DirectoryIndex]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[DocumentRoot]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[ErrorLog]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[Flask]]></category>
		<category><![CDATA[FreeSSL]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Gzip]]></category>
		<category><![CDATA[HighAvailability]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[HSTS]]></category>
		<category><![CDATA[htpasswd]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTP2]]></category>
		<category><![CDATA[HTTP3]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Iptables]]></category>
		<category><![CDATA[Journalctl]]></category>
		<category><![CDATA[KeepAlive]]></category>
		<category><![CDATA[KeyFile]]></category>
		<category><![CDATA[LetsEncrypt]]></category>
		<category><![CDATA[LinuxCommands]]></category>
		<category><![CDATA[LinuxServer]]></category>
		<category><![CDATA[LoadBalancing]]></category>
		<category><![CDATA[LoadTest]]></category>
		<category><![CDATA[LogAnalysis]]></category>
		<category><![CDATA[Manual]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[mod_expires]]></category>
		<category><![CDATA[mod_headers]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[mod_ssl]]></category>
		<category><![CDATA[MPM]]></category>
		<category><![CDATA[MPM_Event]]></category>
		<category><![CDATA[MPM_Worker]]></category>
		<category><![CDATA[NameServer]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Nodejs]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[PemFile]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Permission]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[PortForwarding]]></category>
		<category><![CDATA[PrivateKey]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[ProxyPass]]></category>
		<category><![CDATA[ProxyPassReverse]]></category>
		<category><![CDATA[PublicKey]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Redirect]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[RequireAllGranted]]></category>
		<category><![CDATA[Restore]]></category>
		<category><![CDATA[ReverseProxy]]></category>
		<category><![CDATA[Rewrite]]></category>
		<category><![CDATA[RewriteRule]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SelfSigned]]></category>
		<category><![CDATA[ServerConfig]]></category>
		<category><![CDATA[ServerMaintenance]]></category>
		<category><![CDATA[ServerMigration]]></category>
		<category><![CDATA[ServerMonitoring]]></category>
		<category><![CDATA[ServerName]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[SpeedUp]]></category>
		<category><![CDATA[ss]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[subdomain]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[TLS]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[UbuntuServer]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[URLRewrite]]></category>
		<category><![CDATA[Vhost]]></category>
		<category><![CDATA[VirtualHost]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[WAS]]></category>
		<category><![CDATA[WebAdmin]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[WebPerformance]]></category>
		<category><![CDATA[WebSecurity]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[WebSocket]]></category>
		<category><![CDATA[Wget]]></category>
		<category><![CDATA[WSS]]></category>
		<category><![CDATA[XSS]]></category>
		<category><![CDATA[가상호스트]]></category>
		<category><![CDATA[가이드]]></category>
		<category><![CDATA[고가용성]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[권한설정]]></category>
		<category><![CDATA[기본인증]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[네임서버]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데비안]]></category>
		<category><![CDATA[뎁스옵스]]></category>
		<category><![CDATA[도메인]]></category>
		<category><![CDATA[디버깅]]></category>
		<category><![CDATA[레퍼런스]]></category>
		<category><![CDATA[렛츠인크립트]]></category>
		<category><![CDATA[로그분석]]></category>
		<category><![CDATA[로드밸런싱]]></category>
		<category><![CDATA[리눅스명령어]]></category>
		<category><![CDATA[리눅스서버]]></category>
		<category><![CDATA[리다이렉트]]></category>
		<category><![CDATA[리버스프록시]]></category>
		<category><![CDATA[매뉴얼]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[모범사례]]></category>
		<category><![CDATA[무료인증서]]></category>
		<category><![CDATA[문제해결]]></category>
		<category><![CDATA[방화벽]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[백엔드]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[복구]]></category>
		<category><![CDATA[부하테스트]]></category>
		<category><![CDATA[브라우저캐시]]></category>
		<category><![CDATA[사설인증서]]></category>
		<category><![CDATA[사용법]]></category>
		<category><![CDATA[서버모니터링]]></category>
		<category><![CDATA[서버설정]]></category>
		<category><![CDATA[서버유지보수]]></category>
		<category><![CDATA[서버이전]]></category>
		<category><![CDATA[서브도메인]]></category>
		<category><![CDATA[설정확인]]></category>
		<category><![CDATA[성능최적화]]></category>
		<category><![CDATA[속도향상]]></category>
		<category><![CDATA[시스템관리]]></category>
		<category><![CDATA[아파치]]></category>
		<category><![CDATA[아파치2]]></category>
		<category><![CDATA[아파치모듈]]></category>
		<category><![CDATA[압축]]></category>
		<category><![CDATA[액세스로그]]></category>
		<category><![CDATA[에러로그]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[웹개발]]></category>
		<category><![CDATA[웹보안]]></category>
		<category><![CDATA[웹서버]]></category>
		<category><![CDATA[웹성능]]></category>
		<category><![CDATA[웹소켓]]></category>
		<category><![CDATA[웹어드민]]></category>
		<category><![CDATA[웹호스팅]]></category>
		<category><![CDATA[인증서]]></category>
		<category><![CDATA[인프라]]></category>
		<category><![CDATA[접근제어]]></category>
		<category><![CDATA[최적화]]></category>
		<category><![CDATA[치트시트]]></category>
		<category><![CDATA[캐싱]]></category>
		<category><![CDATA[클라우드]]></category>
		<category><![CDATA[클러스터링]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[튜토리얼]]></category>
		<category><![CDATA[포트]]></category>
		<category><![CDATA[포트포워딩]]></category>
		<category><![CDATA[프록시]]></category>
		<category><![CDATA[확장성]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40358</guid>

					<description><![CDATA[<p>기본 설정 확인 Apache 상태 및 설정 검증 필수 모듈 활성화 가상호스트 생성 1. 설정 파일 생성 2. 기본 HTTP 가상호스트 3. HTTP → HTTPS 리다이렉트 4. HTTPS 가상호스트 (정적 파일) 다양한 설정 예제 리버스 프록시 WebSocket 프록시 여러 백엔드로 로드 밸런싱 경로별 다른 백엔드 라우팅 특정 IP만 접근 허용 SSL/HTTPS 설정 Certbot으로 SSL 인증서 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/apache-%ea%b0%80%ec%83%81%ed%98%b8%ec%8a%a4%ed%8a%b8-%ec%84%a4%ec%a0%95-%ea%b0%80%ec%9d%b4%eb%93%9c/40358/">Apache Virtual Host Guide (Apache 가상 호스트 설정)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-692d8850      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#기본-설정-확인" class="uagb-toc-link__trigger">기본 설정 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#apache-상태-및-설정-검증" class="uagb-toc-link__trigger">Apache 상태 및 설정 검증</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#필수-모듈-활성화" class="uagb-toc-link__trigger">필수 모듈 활성화</a></li></ul></li><li class="uagb-toc__list"><a href="#가상호스트-생성" class="uagb-toc-link__trigger">가상호스트 생성</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-설정-파일-생성" class="uagb-toc-link__trigger">1. 설정 파일 생성</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-기본-http-가상호스트" class="uagb-toc-link__trigger">2. 기본 HTTP 가상호스트</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#3-http-https-리다이렉트" class="uagb-toc-link__trigger">3. HTTP → HTTPS 리다이렉트</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#4-https-가상호스트-정적-파일" class="uagb-toc-link__trigger">4. HTTPS 가상호스트 (정적 파일)</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#다양한-설정-예제" class="uagb-toc-link__trigger">다양한 설정 예제</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#리버스-프록시" class="uagb-toc-link__trigger">리버스 프록시</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#websocket-프록시" class="uagb-toc-link__trigger">WebSocket 프록시</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#여러-백엔드로-로드-밸런싱" class="uagb-toc-link__trigger">여러 백엔드로 로드 밸런싱</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#경로별-다른-백엔드-라우팅" class="uagb-toc-link__trigger">경로별 다른 백엔드 라우팅</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#특정-ip만-접근-허용" class="uagb-toc-link__trigger">특정 IP만 접근 허용</a></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#sslhttps-설정" class="uagb-toc-link__trigger">SSL/HTTPS 설정</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#certbot으로-ssl-인증서-발급" class="uagb-toc-link__trigger">Certbot으로 SSL 인증서 발급</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#ssl-설정-최적화" class="uagb-toc-link__trigger">SSL 설정 최적화</a></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#가상호스트-관리" class="uagb-toc-link__trigger">가상호스트 관리</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#활성화비활성화" class="uagb-toc-link__trigger">활성화/비활성화</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#모듈-관리" class="uagb-toc-link__trigger">모듈 관리</a></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#문제-해결" class="uagb-toc-link__trigger">문제 해결</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#로그-확인" class="uagb-toc-link__trigger">로그 확인</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#연결-테스트" class="uagb-toc-link__trigger">연결 테스트</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#포트-및-프로세스-확인" class="uagb-toc-link__trigger">포트 및 프로세스 확인</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#일반적인-문제-해결" class="uagb-toc-link__trigger">일반적인 문제 해결</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#보안-강화" class="uagb-toc-link__trigger">보안 강화</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#보안-헤더-설정" class="uagb-toc-link__trigger">보안 헤더 설정</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#접근-제어" class="uagb-toc-link__trigger">접근 제어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#htpasswd-파일-생성" class="uagb-toc-link__trigger">.htpasswd 파일 생성</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#rate-limiting-mod-ratelimit" class="uagb-toc-link__trigger">Rate Limiting (mod_ratelimit)</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#성능-최적화" class="uagb-toc-link__trigger">성능 최적화</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#캐싱-설정" class="uagb-toc-link__trigger">캐싱 설정</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#gzip-brotli-압축" class="uagb-toc-link__trigger">Gzip &amp; Brotli 압축</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#keepalive-설정" class="uagb-toc-link__trigger">KeepAlive 설정</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#mpm-설정-최적화" class="uagb-toc-link__trigger">MPM 설정 최적화</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#디렉토리-구조" class="uagb-toc-link__trigger">디렉토리 구조</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#apache-설정-파일-구조" class="uagb-toc-link__trigger">Apache 설정 파일 구조</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#웹-컨텐츠-디렉토리" class="uagb-toc-link__trigger">웹 컨텐츠 디렉토리</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#유용한-명령어-모음" class="uagb-toc-link__trigger">유용한 명령어 모음</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#빠른-참조" class="uagb-toc-link__trigger">빠른 참조</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#자주-사용하는-작업" class="uagb-toc-link__trigger">자주 사용하는 작업</a></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#문제-상황별-체크리스트" class="uagb-toc-link__trigger">문제 상황별 체크리스트</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#사이트가-접속되지-않을-때" class="uagb-toc-link__trigger">사이트가 접속되지 않을 때</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#502-bad-gateway-발생-시" class="uagb-toc-link__trigger">502 Bad Gateway 발생 시</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#ssl-인증서-오류-시" class="uagb-toc-link__trigger">SSL 인증서 오류 시</a></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">기본 설정 확인</h2>



<h3 class="wp-block-heading">Apache 상태 및 설정 검증</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Apache 서비스 상태 확인
sudo systemctl status apache2

# 설정 파일 문법 검사
sudo apache2ctl configtest

# 활성화된 가상호스트 목록 확인
sudo apache2ctl -S

# Apache 버전 확인
apache2 -v

# 로드된 모듈 확인
apache2ctl -M
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">필수 모듈 활성화</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 프록시 및 SSL 관련 모듈 활성화
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod headers

# 변경사항 적용
sudo systemctl restart apache2
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">가상호스트 생성</h2>



<h3 class="wp-block-heading">1. 설정 파일 생성</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 새 가상호스트 설정 파일 생성
sudo vim /etc/apache2/sites-available/testdomain.conf
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2. 기본 HTTP 가상호스트</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:80>
    ServerName testdomain.com
    ServerAlias www.testdomain.com
    ServerAdmin admin@testdomain.com
    
    DocumentRoot /var/www/testdomain
    
    &lt;Directory /var/www/testdomain>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    &lt;/Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/testdomain_error.log
    CustomLog ${APACHE_LOG_DIR}/testdomain_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">3. HTTP → HTTPS 리다이렉트</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:80>
    ServerName testdomain.com
    ServerAlias www.testdomain.com
    
    # 모든 HTTP 요청을 HTTPS로 리다이렉트
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    
    ErrorLog ${APACHE_LOG_DIR}/testdomain_http_error.log
    CustomLog ${APACHE_LOG_DIR}/testdomain_http_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">4. HTTPS 가상호스트 (정적 파일)</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName testdomain.com
    ServerAlias www.testdomain.com
    ServerAdmin admin@testdomain.com
    
    DocumentRoot /var/www/testdomain
    
    &lt;Directory /var/www/testdomain>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    &lt;/Directory>
    
    # SSL 설정
    SSLEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/testdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/testdomain.com/privkey.pem
    
    # 보안 헤더
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
    Header always set X-Content-Type-Options nosniff
    Header always set X-Frame-Options SAMEORIGIN
    Header always set X-XSS-Protection "1; mode=block"
    
    ErrorLog ${APACHE_LOG_DIR}/testdomain_https_error.log
    CustomLog ${APACHE_LOG_DIR}/testdomain_https_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">다양한 설정 예제</h2>



<h3 class="wp-block-heading">리버스 프록시 </h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName api.testdomain.com
    
    # SSL 설정
    SSLEngine on
    SSLProxyEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/api.testdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/api.testdomain.com/privkey.pem
    
    # 프록시 설정
    ProxyPreserveHost On
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/
    
    # 프록시 헤더 설정
    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Port "443"
    ProxyAddHeaders On
    
    # 타임아웃 설정
    ProxyTimeout 300
    
    # 요청 크기 제한 해제
    LimitRequestBody 0
    LimitRequestLine 65536
    LimitRequestFieldSize 65536
    
    ErrorLog ${APACHE_LOG_DIR}/api_error.log
    CustomLog ${APACHE_LOG_DIR}/api_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">WebSocket 프록시</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName ws.testdomain.com
    
    SSLEngine on
    SSLProxyEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/ws.testdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/ws.testdomain.com/privkey.pem
    
    # WebSocket 지원을 위한 프록시 설정
    ProxyPreserveHost On
    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule /(.*)           ws://localhost:8080/$1 [P,L]
    RewriteCond %{HTTP:Upgrade} !=websocket [NC]
    RewriteRule /(.*)           http://localhost:8080/$1 [P,L]
    
    ProxyPassReverse / http://localhost:8080/
    
    ErrorLog ${APACHE_LOG_DIR}/ws_error.log
    CustomLog ${APACHE_LOG_DIR}/ws_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">여러 백엔드로 로드 밸런싱</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests</pre>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Proxy balancer://mycluster>
    BalancerMember http://localhost:3001
    BalancerMember http://localhost:3002
    BalancerMember http://localhost:3003
    ProxySet lbmethod=byrequests
&lt;/Proxy>

&lt;VirtualHost *:443>
    ServerName testdomain.com
    
    SSLEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/testdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/testdomain.com/privkey.pem
    
    ProxyPreserveHost On
    ProxyPass / balancer://mycluster/
    ProxyPassReverse / balancer://mycluster/
    
    ErrorLog ${APACHE_LOG_DIR}/testdomain_error.log
    CustomLog ${APACHE_LOG_DIR}/testdomain_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">경로별 다른 백엔드 라우팅</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName testdomain.com
    
    SSLEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/testdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/testdomain.com/privkey.pem
    
    # API 요청은 백엔드 서버로
    ProxyPass /api http://localhost:8000/api
    ProxyPassReverse /api http://localhost:8000/api
    
    # 정적 파일은 직접 제공
    DocumentRoot /var/www/testdomain
    &lt;Directory /var/www/testdomain>
        Require all granted
    &lt;/Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/testdomain_error.log
    CustomLog ${APACHE_LOG_DIR}/testdomain_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">특정 IP만 접근 허용</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName admin.testdomain.com
    
    SSLEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/admin.testdomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/admin.testdomain.com/privkey.pem
    
    DocumentRoot /var/www/admin
    
    &lt;Directory /var/www/admin>
        # 특정 IP만 허용
        Require ip 192.168.1.0/24
        Require ip 10.0.0.5
    &lt;/Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/admin_error.log
    CustomLog ${APACHE_LOG_DIR}/admin_access.log combined
&lt;/VirtualHost>
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">SSL/HTTPS 설정</h2>



<h3 class="wp-block-heading">Certbot으로 SSL 인증서 발급</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 자동 설정 (권장)
sudo certbot --apache -d testdomain.com -d www.testdomain.com

# 인증서만 발급 (수동 설정)
sudo certbot certonly --standalone -d testdomain.com -d www.testdomain.com

# 와일드카드 인증서 발급
sudo certbot certonly --manual --preferred-challenges dns -d testdomain.com -d *.testdomain.com

# 인증서 갱신 테스트
sudo certbot renew --dry-run

# 인증서 강제 갱신
sudo certbot renew --force-renewal

# 인증서 자동 갱신 크론잡 설정
sudo crontab -e
# 매일 새벽 2시에 갱신 확인
0 2 * * * certbot renew --quiet
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">SSL 설정 최적화</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># /etc/letsencrypt/options-ssl-apache.conf 참고
# 또는 직접 설정

SSLEngine on
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder off
SSLSessionTickets off

# OCSP Stapling 활성화
SSLUseStapling on
SSLStaplingCache "shmcb:logs/stapling-cache(150000)"
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">가상호스트 관리</h2>



<h3 class="wp-block-heading">활성화/비활성화</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 가상호스트 활성화
sudo a2ensite testdomain.conf

# 가상호스트 비활성화
sudo a2dissite testdomain.conf

# 기본 사이트 비활성화
sudo a2dissite 000-default.conf

# 설정 적용 (다운타임 없음)
sudo systemctl reload apache2

# 설정 재시작 (다운타임 발생)
sudo systemctl restart apache2
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">모듈 관리</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 모듈 활성화
sudo a2enmod 모듈명

# 모듈 비활성화
sudo a2dismod 모듈명

# 자주 사용하는 모듈들
sudo a2enmod rewrite      # URL 재작성
sudo a2enmod headers      # HTTP 헤더 조작
sudo a2enmod proxy        # 프록시 기능
sudo a2enmod proxy_http   # HTTP 프록시
sudo a2enmod proxy_wstunnel  # WebSocket 프록시
sudo a2enmod ssl          # SSL/TLS
sudo a2enmod deflate      # 압축
sudo a2enmod expires      # 캐시 제어
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">문제 해결</h2>



<h3 class="wp-block-heading">로그 확인</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 실시간 에러 로그 모니터링
sudo tail -f /var/log/apache2/error.log

# 실시간 액세스 로그 모니터링
sudo tail -f /var/log/apache2/access.log

# 특정 가상호스트 로그
sudo tail -f /var/log/apache2/testdomain_error.log

# 마지막 100줄 확인
sudo tail -100 /var/log/apache2/error.log

# 특정 키워드로 검색
sudo grep "testdomain" /var/log/apache2/*.log

# 에러만 필터링
sudo grep "error" /var/log/apache2/error.log

# 최근 에러 (systemd)
sudo journalctl -u apache2 -n 50
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">연결 테스트</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># HTTP 응답 헤더 확인
curl -I http://testdomain.com/

# HTTPS 응답 헤더 확인
curl -I https://testdomain.com/

# 상세 디버깅 정보
curl -v https://testdomain.com/

# POST 요청 테스트
curl -X POST https://testdomain.com/api/endpoint \
  -H "Content-Type: application/json" \
  -d '{"key":"value"}'

# SSL 인증서 정보 확인
openssl s_client -connect testdomain.com:443 -servername testdomain.com &lt; /dev/null

# 백엔드 서비스 테스트
curl -v http://localhost:3000/
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">포트 및 프로세스 확인</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 특정 포트 사용 확인
sudo netstat -tlnp | grep :80
sudo netstat -tlnp | grep :443
sudo netstat -tlnp | grep :3000

# 또는 ss 명령어 사용 (더 빠름)
sudo ss -tlnp | grep :80

# Apache 프로세스 확인
ps aux | grep apache2

# 열린 파일 확인
sudo lsof -i :80
sudo lsof -i :443
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">일반적인 문제 해결</h3>



<h4 class="wp-block-heading">포트 충돌 문제 체크</h4>



<p>Apache + Nginx 동시 사용 시 자주 발생<br>특히 Certbot &#8211;apache 사용 시 충돌할 수 있음.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo ss -tlnp | grep :80
sudo ss -tlnp | grep :443

// 만약 Nginx가 잡고 있다면
sudo systemctl stop nginx
sudo systemctl disable nginx
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">403 Forbidden 오류</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Directory 권한 확인
&lt;Directory /var/www/testdomain>
    Require all granted
    # 또는
    Options +Indexes
&lt;/Directory>

# 파일 시스템 권한 확인
sudo chmod -R 755 /var/www/testdomain
sudo chown -R www-data:www-data /var/www/testdomain
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">500 Internal Server Error</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 설정 문법 오류 확인
sudo apache2ctl configtest

# .htaccess 문제 확인
sudo tail -50 /var/log/apache2/error.log

# SELinux 확인 (CentOS/RHEL)
sudo setenforce 0  # 임시 비활성화
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">SSL 인증서 오류</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 인증서 파일 존재 확인
ls -la /etc/letsencrypt/live/testdomain.com/

# 인증서 유효기간 확인
sudo certbot certificates

# 인증서 갱신
sudo certbot renew

# SSL 인증서 권한 변경 주의
# SSLCertificateFile: file '/etc/letsencrypt/live/.../fullchain.pem' does not exist or is empty // 원인은 보통 인증서 폴더 권한 문제

sudo chmod 755 /etc/letsencrypt/live
sudo chmod 644 /etc/letsencrypt/live/DOMAIN/fullchain.pem
sudo chmod 600 /etc/letsencrypt/live/DOMAIN/privkey.pem

</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">프록시 오류 (502 Bad Gateway)</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 백엔드 서비스 작동 확인
curl http://localhost:3000/

# SELinux 설정 (CentOS/RHEL)
sudo setsebool -P httpd_can_network_connect 1

# 프록시 타임아웃 늘리기
ProxyTimeout 600
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Proxy 헤더 관련 ForwardedHeaders 추가</h4>



<p>ASP.NET Core, Node.js, Django 모두 HTTPS 프록시 환경에서 필수</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Host %{HTTP_HOST}s

# (예시) ASP.NET Core
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">보안 강화</h2>



<h3 class="wp-block-heading">보안 헤더 설정</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName testdomain.com
    
    # ... SSL 설정 ...
    
    # HSTS (HTTP Strict Transport Security)
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
    
    # XSS 방지
    Header always set X-XSS-Protection "1; mode=block"
    
    # MIME 타입 스니핑 방지
    Header always set X-Content-Type-Options "nosniff"
    
    # 클릭재킹 방지
    Header always set X-Frame-Options "SAMEORIGIN"
    
    # Referrer 정책
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    
    # CSP (Content Security Policy)
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';"
    
    # 서버 정보 숨기기
    ServerTokens Prod
    ServerSignature Off
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">접근 제어</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># IP 기반 접근 제어
&lt;Directory /var/www/admin>
    # 특정 IP만 허용
    Require ip 192.168.1.0/24
    Require ip 10.0.0.5
    
    # 또는 특정 IP 차단
    Require all granted
    Require not ip 192.168.1.100
&lt;/Directory>

# HTTP Basic 인증
&lt;Directory /var/www/protected>
    AuthType Basic
    AuthName "Restricted Area"
    AuthUserFile /etc/apache2/.htpasswd
    Require valid-user
&lt;/Directory>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">.htpasswd 파일 생성</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># htpasswd 파일 생성 (첫 사용자)
sudo htpasswd -c /etc/apache2/.htpasswd username

# 추가 사용자 등록 (-c 옵션 제거)
sudo htpasswd /etc/apache2/.htpasswd username2
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Rate Limiting (mod_ratelimit)</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Location /api>
    SetOutputFilter RATE_LIMIT
    SetEnv rate-limit 400
    SetEnv rate-initial-burst 100
&lt;/Location>
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">성능 최적화</h2>



<h3 class="wp-block-heading">캐싱 설정</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;VirtualHost *:443>
    ServerName testdomain.com
    
    # ... 기본 설정 ...
    
    # 정적 파일 캐싱
    &lt;IfModule mod_expires.c>
        ExpiresActive On
        
        # 이미지
        ExpiresByType image/jpg "access plus 1 year"
        ExpiresByType image/jpeg "access plus 1 year"
        ExpiresByType image/gif "access plus 1 year"
        ExpiresByType image/png "access plus 1 year"
        ExpiresByType image/webp "access plus 1 year"
        ExpiresByType image/svg+xml "access plus 1 year"
        
        # CSS/JS
        ExpiresByType text/css "access plus 1 month"
        ExpiresByType application/javascript "access plus 1 month"
        
        # 폰트
        ExpiresByType font/woff2 "access plus 1 year"
        ExpiresByType font/woff "access plus 1 year"
        
        # HTML
        ExpiresByType text/html "access plus 1 hour"
    &lt;/IfModule>
    
    # Cache-Control 헤더
    &lt;FilesMatch "\.(jpg|jpeg|png|gif|webp|svg|css|js|woff|woff2)$">
        Header set Cache-Control "max-age=31536000, public"
    &lt;/FilesMatch>
&lt;/VirtualHost>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Gzip &amp; Brotli 압축</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;IfModule mod_deflate.c>
    # 압축 활성화
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
    AddOutputFilterByType DEFLATE application/javascript application/json
    AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
    AddOutputFilterByType DEFLATE image/svg+xml
    
    # 이미지는 압축 제외 (이미 압축됨)
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|webp)$ no-gzip
&lt;/IfModule>


sudo apt install libapache2-mod-brotli
sudo a2enmod brotli

&lt;IfModule mod_brotli.c>
    BrotliCompressionQuality 5
    AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/css application/javascript application/json image/svg+xml
&lt;/IfModule></pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">KeepAlive 설정</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># /etc/apache2/apache2.conf

# KeepAlive 활성화
KeepAlive On

# 최대 요청 수
MaxKeepAliveRequests 100

# 타임아웃 (초)
KeepAliveTimeout 5
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">MPM 설정 최적화</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># /etc/apache2/mods-available/mpm_event.conf

&lt;IfModule mpm_event_module>
    StartServers             2
    MinSpareThreads          25
    MaxSpareThreads          75
    ThreadLimit              64
    ThreadsPerChild          25
    MaxRequestWorkers        150
    MaxConnectionsPerChild   0
&lt;/IfModule>
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">디렉토리 구조</h2>



<h3 class="wp-block-heading">Apache 설정 파일 구조</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">/etc/apache2/
├── apache2.conf              # 메인 설정 파일
├── ports.conf                # 포트 설정
├── conf-available/           # 사용 가능한 설정
├── conf-enabled/             # 활성화된 설정
├── mods-available/           # 사용 가능한 모듈
├── mods-enabled/             # 활성화된 모듈 (심볼릭 링크)
├── sites-available/          # 사용 가능한 가상호스트
│   ├── 000-default.conf
│   ├── testdomain.conf
│   └── api.testdomain.conf
├── sites-enabled/            # 활성화된 가상호스트 (심볼릭 링크)
│   ├── 000-default.conf -> ../sites-available/000-default.conf
│   └── testdomain.conf -> ../sites-available/testdomain.conf
└── envvars                   # 환경 변수
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">웹 컨텐츠 디렉토리</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">/var/www/
├── html/                     # 기본 DocumentRoot
├── testdomain/               # 가상호스트 디렉토리
│   ├── public/
│   ├── index.html
│   └── .htaccess
└── logs/                     # 로그 (선택사항)
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">유용한 명령어 모음</h2>



<h3 class="wp-block-heading">빠른 참조</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 설정 테스트
sudo apache2ctl configtest

# 가상호스트 목록
sudo apache2ctl -S

# 설정 리로드 (무중단)
sudo systemctl reload apache2

# 재시작
sudo systemctl restart apache2

# 상태 확인
sudo systemctl status apache2

# 로그 실시간 모니터링
sudo tail -f /var/log/apache2/error.log

# 특정 도메인 설정 확인
sudo apache2ctl -D DUMP_VHOSTS | grep testdomain

# 활성화된 모듈 목록
apache2ctl -M

# 설정 파일 문법 체크
sudo apachectl -t
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">자주 사용하는 작업</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 새 가상호스트 생성부터 활성화까지
sudo vim /etc/apache2/sites-available/newsite.conf
sudo a2ensite newsite.conf
sudo apache2ctl configtest
sudo systemctl reload apache2

# SSL 인증서 발급 및 자동 설정
sudo certbot --apache -d newsite.com

# 로그 분석
sudo tail -1000 /var/log/apache2/access.log | grep "POST" | wc -l

# 디스크 사용량 확인
sudo du -sh /var/log/apache2/*

# 오래된 로그 정리
sudo find /var/log/apache2/ -name "*.log.*" -mtime +30 -delete
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">문제 상황별 체크리스트</h2>



<h3 class="wp-block-heading">사이트가 접속되지 않을 때</h3>



<ul class="wp-block-list">
<li>[ ] Apache 서비스 작동 확인: <code>sudo systemctl status apache2</code></li>



<li>[ ] 포트 리스닝 확인: <code>sudo netstat -tlnp | grep :80</code></li>



<li>[ ] 방화벽 확인: <code>sudo ufw status</code></li>



<li>[ ] DNS 설정 확인: <code>nslookup testdomain.com</code></li>



<li>[ ] 가상호스트 활성화 확인: <code>sudo apache2ctl -S</code></li>



<li>[ ] 설정 문법 확인: <code>sudo apache2ctl configtest</code></li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">502 Bad Gateway 발생 시</h3>



<ul class="wp-block-list">
<li>[ ] 백엔드 서비스 작동 확인: <code>curl http://localhost:3000/</code></li>



<li>[ ] 프록시 설정 확인: ProxyPass, ProxyPassReverse</li>



<li>[ ] SELinux 설정 확인 (CentOS/RHEL)</li>



<li>[ ] 타임아웃 설정 확인: ProxyTimeout</li>



<li>[ ] 에러 로그 확인: <code>sudo tail -50 /var/log/apache2/error.log</code></li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">SSL 인증서 오류 시</h3>



<ul class="wp-block-list">
<li>[ ] 인증서 파일 존재 확인</li>



<li>[ ] 인증서 유효기간 확인: <code>sudo certbot certificates</code></li>



<li>[ ] 인증서 경로 확인</li>



<li>[ ] 포트 443 리스닝 확인</li>



<li>[ ] SSL 모듈 활성화 확인: <code>apache2ctl -M | grep ssl</code></li>
</ul>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/apache-%ea%b0%80%ec%83%81%ed%98%b8%ec%8a%a4%ed%8a%b8-%ec%84%a4%ec%a0%95-%ea%b0%80%ec%9d%b4%eb%93%9c/40358/">Apache Virtual Host Guide (Apache 가상 호스트 설정)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/apache-%ea%b0%80%ec%83%81%ed%98%b8%ec%8a%a4%ed%8a%b8-%ec%84%a4%ec%a0%95-%ea%b0%80%ec%9d%b4%eb%93%9c/40358/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[Linux] 리눅스 커널 및 버전 정보 확인 명령어</title>
		<link>https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/</link>
					<comments>https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/#comments</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 14 Oct 2025 20:33:58 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[/etc/issue]]></category>
		<category><![CDATA[/etc/os-release]]></category>
		<category><![CDATA[/proc]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[ArchLinux]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[armv7l]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Boot]]></category>
		<category><![CDATA[boot_messages]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[CPU_info]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[diagnostics]]></category>
		<category><![CDATA[disk_info]]></category>
		<category><![CDATA[dmesg]]></category>
		<category><![CDATA[dnf]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[hardware_info]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[hostnamectl]]></category>
		<category><![CDATA[i386]]></category>
		<category><![CDATA[info_script]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[kernel_release]]></category>
		<category><![CDATA[kernel_version]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux_commands]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[lsb_release]]></category>
		<category><![CDATA[lscpu]]></category>
		<category><![CDATA[memory_info]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[network_info]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[OS_info]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[platform]]></category>
		<category><![CDATA[Processor]]></category>
		<category><![CDATA[procfs]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[SUSE]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[system_check]]></category>
		<category><![CDATA[system_information]]></category>
		<category><![CDATA[system_logs]]></category>
		<category><![CDATA[system_script]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[uname]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[x86_64]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[가상화]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[관리자]]></category>
		<category><![CDATA[권한]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데스크탑]]></category>
		<category><![CDATA[로그인]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[릴리스]]></category>
		<category><![CDATA[메모리]]></category>
		<category><![CDATA[메모리정보]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[문제해결]]></category>
		<category><![CDATA[버전]]></category>
		<category><![CDATA[부팅]]></category>
		<category><![CDATA[부팅메시지]]></category>
		<category><![CDATA[서버]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[스토리지]]></category>
		<category><![CDATA[시스템관리]]></category>
		<category><![CDATA[시스템로그]]></category>
		<category><![CDATA[시스템점검]]></category>
		<category><![CDATA[시스템정보]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[운영체제]]></category>
		<category><![CDATA[운영체제정보]]></category>
		<category><![CDATA[진단]]></category>
		<category><![CDATA[커널]]></category>
		<category><![CDATA[커널릴리스]]></category>
		<category><![CDATA[커널버전]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[패키지]]></category>
		<category><![CDATA[프로세서]]></category>
		<category><![CDATA[플랫폼]]></category>
		<category><![CDATA[하드웨어]]></category>
		<category><![CDATA[호스트명]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40334</guid>

					<description><![CDATA[<p>🔥[Linux] 리눅스 커널 및 버전 정보 확인 명령어 1️⃣ 커널 버전 확인 uname 명령어 리눅스 시스템과 커널 정보를 확인할 때 쓰이는 아주 기본적인 도구 옵션 정리 옵션 설명 예시 -r 커널 버전만 출력 (release) 5.15.0-88-generic -v 커널 릴리스 정보 출력 (version) #90-Ubuntu SMP Fri Jul 14 00:44:00 UTC 2023 -s 커널 이름 출력 (system) Linux [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/">[Linux] 리눅스 커널 및 버전 정보 확인 명령어</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-3e20bc5d      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#linux-리눅스-커널-및-버전-정보-확인-명령어" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" />[Linux] 리눅스 커널 및 버전 정보 확인 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-커널-버전-확인" class="uagb-toc-link__trigger">1&#x20e3; 커널 버전 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#uname-명령어" class="uagb-toc-link__trigger">uname 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#옵션-정리" class="uagb-toc-link__trigger">옵션 정리</a></li></ul><li class="uagb-toc__list"><a href="#cat-procversion" class="uagb-toc-link__trigger">cat /proc/version</a></li></ul><li class="uagb-toc__list"><a href="#2-배포판-정보-확인" class="uagb-toc-link__trigger">2&#x20e3; 배포판 정보 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#etcos-release-파일" class="uagb-toc-link__trigger">/etc/os-release 파일</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주요-필드-설명" class="uagb-toc-link__trigger">주요 필드 설명</a></li></ul><li class="uagb-toc__list"><a href="#lsb-release-명령어" class="uagb-toc-link__trigger">lsb_release 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#hostnamectl-명령어" class="uagb-toc-link__trigger">hostnamectl 명령어</a></li></ul><li class="uagb-toc__list"><a href="#3-상세-시스템-정보" class="uagb-toc-link__trigger">3&#x20e3; 상세 시스템 정보</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#etcissue-파일" class="uagb-toc-link__trigger">/etc/issue 파일</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#dmesg-명령어" class="uagb-toc-link__trigger">dmesg 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#procsyskernel-디렉토리" class="uagb-toc-link__trigger">/proc/sys/kernel/ 디렉토리</a></li></ul><li class="uagb-toc__list"><a href="#4-하드웨어-아키텍처-확인" class="uagb-toc-link__trigger">4&#x20e3; 하드웨어 아키텍처 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주요-아키텍처-타입" class="uagb-toc-link__trigger">주요 아키텍처 타입</a></li></ul><li class="uagb-toc__list"><a href="#5-배포판별-특수-명령어" class="uagb-toc-link__trigger">5&#x20e3; 배포판별 특수 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#red-hat-centos-fedora" class="uagb-toc-link__trigger">Red Hat / CentOS / Fedora</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#debian-ubuntu" class="uagb-toc-link__trigger">Debian / Ubuntu</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#suse-opensuse" class="uagb-toc-link__trigger">SUSE / openSUSE</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#arch-linux" class="uagb-toc-link__trigger">Arch Linux</a></li></ul><li class="uagb-toc__list"><a href="#6-종합-정보-확인-스크립트" class="uagb-toc-link__trigger">6&#x20e3; 종합 정보 확인 스크립트</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#빠른-참조표" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 빠른 참조표</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#가장-많이-사용하는-명령어" class="uagb-toc-link__trigger">가장 많이 사용하는 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#상황별-추천-명령어" class="uagb-toc-link__trigger">상황별 추천 명령어</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h1 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" />[Linux] 리눅스 커널 및 버전 정보 확인 명령어</h1>



<h2 class="wp-block-heading">1&#x20e3; 커널 버전 확인</h2>



<h3 class="wp-block-heading">uname 명령어</h3>



<p>리눅스 시스템과 커널 정보를 확인할 때 쓰이는 아주 기본적인 도구</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 커널 버전만 출력
uname -r

# 모든 시스템 정보 출력
uname -a

# 커널 이름 출력
uname -s

# 커널 릴리스 정보
uname -v
</pre>



<div style="height:15px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">옵션 정리</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>옵션</th><th>설명</th><th>예시</th></tr></thead><tbody><tr><td><code>-r</code></td><td>커널 버전만 출력 (release)</td><td><code>5.15.0-88-generic</code></td></tr><tr><td><code>-v</code></td><td>커널 릴리스 정보 출력 (version)</td><td><code>#90-Ubuntu SMP Fri Jul 14 00:44:00 UTC 2023</code></td></tr><tr><td><code>-s</code></td><td>커널 이름 출력 (system)</td><td><code>Linux</code></td></tr><tr><td><code>-n</code></td><td>호스트 이름 출력 (node)</td><td><code>myserver</code></td></tr><tr><td><code>-m</code></td><td>하드웨어 아키텍처 출력 (machine)</td><td><code>x86_64</code></td></tr><tr><td><code>-p</code></td><td>프로세서 종류 출력 (processor)</td><td><code>x86_64</code></td></tr><tr><td><code>-i</code></td><td>하드웨어 플랫폼 출력 (platform)</td><td><code>x86_64</code></td></tr><tr><td><code>-o</code></td><td>운영체제 이름 출력 (operating system)</td><td><code>GNU/Linux</code></td></tr><tr><td><code>-a</code></td><td>모든 정보 출력 (all)</td><td><code>Linux myserver 5.15.0-88-generic #90-Ubuntu SMP x86_64 GNU/Linux</code></td></tr></tbody></table></figure>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">cat /proc/version</h3>



<p><code>/proc</code>은 리눅스 커널이 제공하는 가상 파일 시스템 (<code>procfs</code>)로 실제 디스크에 존재하는 파일이 아니라, 커널 메모리 정보를 텍스트 파일 형태로 보여주는 인터페이스</p>



<p><code>/proc/version</code>은 커널 버전과 빌드 정보가 들어있는 파일로 <code>cat</code> 명령어로 내용을 읽어서 출력</p>



<ul class="wp-block-list">
<li>uname: 커널 런타임 정보</li>



<li>proc/version: 커널 빌드 정보 포함</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cat /proc/version
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Linux version 5.15.0-91-generic (buildd@lcy02-amd64-047) (gcc version 11.4.0)
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">2&#x20e3; 배포판 정보 확인</h2>



<h3 class="wp-block-heading">/etc/os-release 파일</h3>



<p><code>/etc/os-release</code>는 리눅스 배포판 정보가 들어있는 설정 파일로 커널 정보가 아니라 운영체제(OS) 배포판 정보를 담고 있음</p>



<p>대부분의 최신 리눅스 배포판에서 사용 가능하며 시스템 환경, 버전, 이름, ID, URL 등을 확인할 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cat /etc/os-release
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">NAME="Ubuntu"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
ID=ubuntu
VERSION_ID="22.04"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주요 필드 설명</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>필드</th><th>설명</th><th>예시</th></tr></thead><tbody><tr><td><code>NAME</code></td><td>배포판 이름</td><td><code>Ubuntu</code></td></tr><tr><td><code>VERSION</code></td><td>배포판 버전</td><td><code>22.04.3 LTS (Jammy Jellyfish)</code></td></tr><tr><td><code>ID</code></td><td>배포판 식별자</td><td><code>ubuntu</code></td></tr><tr><td><code>VERSION_ID</code></td><td>버전 번호</td><td><code>22.04</code></td></tr><tr><td><code>PRETTY_NAME</code></td><td>사람이 읽기 쉬운 전체 이름</td><td><code>Ubuntu 22.04.3 LTS</code></td></tr><tr><td><code>HOME_URL</code></td><td>배포판 홈페이지</td><td><code>https://www.ubuntu.com/</code></td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">lsb_release 명령어</h3>



<p>LSB(Linux Standard Base) 정보를 표시하는 명령어로, 배포판의 표준화된 정보를 제공</p>



<p>일부 시스템에서는 <code>lsb-release</code> 패키지 설치가 필요할 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 모든 정보 출력
lsb_release -a

# 배포판 설명만 출력
lsb_release -d

# 버전만 출력
lsb_release -r

# 배포판 ID만 출력
lsb_release -i
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">hostnamectl 명령어</h3>



<p>systemd 기반 시스템에서 호스트명과 함께 운영체제 정보를 확인할 수 있는 명령어</p>



<p>시스템 관리에 유용하며 호스트명, 운영체제, 커널, 아키텍처 등을 한눈에 볼 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">hostnamectl
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">   Static hostname: myserver
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 1234567890abcdef1234567890abcdef
           Boot ID: abcdef1234567890abcdef1234567890
    Virtualization: kvm
  Operating System: Ubuntu 22.04.3 LTS
            Kernel: Linux 5.15.0-91-generic
      Architecture: x86-64
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">3&#x20e3; 상세 시스템 정보</h2>



<h3 class="wp-block-heading">/etc/issue 파일</h3>



<p>로그인 전 터미널에 표시되는 시스템 식별 정보를 담고 있는 파일</p>



<p>배포판에 따라 다른 내용을 표시하며, 간단한 배포판 정보를 빠르게 확인할 때 유용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cat /etc/issue
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Ubuntu 22.04.3 LTS \n \l
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">dmesg 명령어</h3>



<p>커널 링 버퍼에 있는 메시지를 출력하는 명령어로, 부팅 시 커널이 출력한 메시지를 확인할 수 있음</p>



<p>시스템 부팅 과정과 하드웨어 인식 상태를 파악하는 데 유용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 커널 버전 정보만 필터링
dmesg | grep "Linux version"

# 부팅 메시지 전체 확인
dmesg | less
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">[    0.000000] Linux version 5.15.0-91-generic (buildd@lcy02-amd64-047)
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">/proc/sys/kernel/ 디렉토리</h3>



<p>커널 파라미터와 설정 정보가 있는 디렉토리</p>



<p>실시간으로 커널 설정을 확인하고 필요시 변경할 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 커널 버전
cat /proc/sys/kernel/osrelease

# 커널 타입
cat /proc/sys/kernel/ostype

# 호스트 이름
cat /proc/sys/kernel/hostname
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">5.15.0-91-generic
Linux
myserver
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">4&#x20e3; 하드웨어 아키텍처 확인</h2>



<p>시스템의 하드웨어 아키텍처 정보를 확인하는 명령어들</p>



<p>소프트웨어 호환성 확인이나 패키지 설치 시 필요한 정보</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 아키텍처 정보 (가장 많이 사용)
uname -m

# 프로세서 정보
uname -p

# 하드웨어 플랫폼
uname -i

# CPU 상세 정보
lscpu
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주요 아키텍처 타입</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>아키텍처</th><th>설명</th></tr></thead><tbody><tr><td><code>x86_64</code></td><td>64비트 인텔/AMD 프로세서</td></tr><tr><td><code>i386</code>, <code>i686</code></td><td>32비트 인텔 프로세서</td></tr><tr><td><code>aarch64</code></td><td>64비트 ARM 프로세서</td></tr><tr><td><code>armv7l</code></td><td>32비트 ARM 프로세서</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">5&#x20e3; 배포판별 특수 명령어</h2>



<h3 class="wp-block-heading">Red Hat / CentOS / Fedora</h3>



<p>Red Hat 계열 배포판에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Red Hat 릴리스 정보
cat /etc/redhat-release

# CentOS 릴리스 패키지 정보
rpm -q centos-release

# Fedora 버전 확인
cat /etc/fedora-release
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">CentOS Linux release 7.9.2009 (Core)
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Debian / Ubuntu</h3>



<p>Debian 계열 배포판에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Debian 버전
cat /etc/debian_version

# Ubuntu 버전 (os-release 사용 권장)
cat /etc/lsb-release
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">12.5
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">SUSE / openSUSE</h3>



<p>SUSE 계열 배포판에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># SUSE 릴리스 정보 (구버전)
cat /etc/SuSE-release

# openSUSE 버전 (최신)
cat /etc/os-release
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Arch Linux</h3>



<p>Arch Linux에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Arch 릴리스 정보
cat /etc/arch-release

# 상세 정보
cat /etc/os-release
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">6&#x20e3; 종합 정보 확인 스크립트</h2>



<p>여러 명령어를 한 번에 실행하여 시스템의 전체 정보를 확인할 수 있는 스크립트</p>



<p>시스템 진단이나 문서화 작업 시 유용하게 활용 가능</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#!/bin/bash

echo "=========================================="
echo "  시스템 정보 확인"
echo "=========================================="

echo ""
echo "=== 커널 버전 ==="
uname -r

echo ""
echo "=== 전체 시스템 정보 ==="
uname -a

echo ""
echo "=== 배포판 정보 ==="
cat /etc/os-release | head -5

echo ""
echo "=== 아키텍처 ==="
uname -m

echo ""
echo "=== 호스트 정보 ==="
hostnamectl | grep -E "hostname|Operating|Kernel|Architecture"

echo ""
echo "=========================================="
</pre>



<p><strong>실행 방법:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 실행 권한 부여
chmod +x system_info.sh

# 스크립트 실행
./system_info.sh
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 빠른 참조표</h2>



<h3 class="wp-block-heading">가장 많이 사용하는 명령어</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>목적</th><th>명령어</th><th>설명</th></tr></thead><tbody><tr><td>커널 버전</td><td><code>uname -r</code></td><td>가장 빠르고 간단</td></tr><tr><td>전체 시스템 정보</td><td><code>uname -a</code></td><td>한 줄로 모든 정보</td></tr><tr><td>배포판 정보</td><td><code>cat /etc/os-release</code></td><td>표준 방식</td></tr><tr><td>상세 시스템 정보</td><td><code>hostnamectl</code></td><td>systemd 기반 시스템</td></tr><tr><td>아키텍처</td><td><code>uname -m</code></td><td>CPU 아키텍처 확인</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">상황별 추천 명령어</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>상황</th><th>추천 명령어</th></tr></thead><tbody><tr><td>처음 서버 접속</td><td><code>uname -a &amp;&amp; cat /etc/os-release</code></td></tr><tr><td>패키지 설치 전</td><td><code>uname -m &amp;&amp; cat /etc/os-release</code></td></tr><tr><td>문제 해결</td><td><code>dmesg | grep -i error</code></td></tr><tr><td>빠른 확인</td><td><code>uname -r</code></td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<p></p>
<p>The post <a href="https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/">[Linux] 리눅스 커널 및 버전 정보 확인 명령어</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL 서비스 관리 명령어 (Ubuntu)</title>
		<link>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/</link>
					<comments>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Wed, 13 Aug 2025 11:50:10 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[3306]]></category>
		<category><![CDATA[ALTER USER]]></category>
		<category><![CDATA[ALTERUSER]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[configuration file]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data Backup]]></category>
		<category><![CDATA[data migration]]></category>
		<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[data security]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database list]]></category>
		<category><![CDATA[database management]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Development Environment]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Disk]]></category>
		<category><![CDATA[error resolution]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[GRANT]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[iptables.]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[listening]]></category>
		<category><![CDATA[local access]]></category>
		<category><![CDATA[Manual]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[my.cnf]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL account]]></category>
		<category><![CDATA[MySQL backup]]></category>
		<category><![CDATA[MySQL client]]></category>
		<category><![CDATA[MySQL configuration]]></category>
		<category><![CDATA[MySQL installation]]></category>
		<category><![CDATA[MySQL monitoring]]></category>
		<category><![CDATA[MySQL recovery]]></category>
		<category><![CDATA[MySQL setup]]></category>
		<category><![CDATA[MySQL status]]></category>
		<category><![CDATA[MySQL tips]]></category>
		<category><![CDATA[MySQL tutorial]]></category>
		<category><![CDATA[MySQL version]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[MySQL계정]]></category>
		<category><![CDATA[MySQL모니터링]]></category>
		<category><![CDATA[MySQL백업]]></category>
		<category><![CDATA[MySQL버전]]></category>
		<category><![CDATA[MySQL복구]]></category>
		<category><![CDATA[MySQL상태]]></category>
		<category><![CDATA[MySQL서비스]]></category>
		<category><![CDATA[MySQL설정]]></category>
		<category><![CDATA[MySQL설치]]></category>
		<category><![CDATA[MySQL클라이언트]]></category>
		<category><![CDATA[MySQL튜토리얼]]></category>
		<category><![CDATA[MySQL팁]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[Port Number]]></category>
		<category><![CDATA[privilege management]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[PROCESSLIST]]></category>
		<category><![CDATA[Production Environment]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[remote connection]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[REVOKE]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[running queries]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[security settings]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server administration]]></category>
		<category><![CDATA[server operation]]></category>
		<category><![CDATA[service management]]></category>
		<category><![CDATA[service restart]]></category>
		<category><![CDATA[service start]]></category>
		<category><![CDATA[service stop]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Shell스크립트]]></category>
		<category><![CDATA[SHOW STATUS]]></category>
		<category><![CDATA[SHOW VARIABLES]]></category>
		<category><![CDATA[SHOWSTATUS]]></category>
		<category><![CDATA[SHOWVARIABLES]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL query]]></category>
		<category><![CDATA[SQL쿼리]]></category>
		<category><![CDATA[status check]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[superuser]]></category>
		<category><![CDATA[system engineer]]></category>
		<category><![CDATA[system management]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[TABLE STATUS]]></category>
		<category><![CDATA[TABLESTATUS]]></category>
		<category><![CDATA[tech info]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[user list]]></category>
		<category><![CDATA[User Management]]></category>
		<category><![CDATA[version check]]></category>
		<category><![CDATA[가이드]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[개발자]]></category>
		<category><![CDATA[개발환경]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[관리]]></category>
		<category><![CDATA[권한]]></category>
		<category><![CDATA[권한관리]]></category>
		<category><![CDATA[기술정보]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[데이터]]></category>
		<category><![CDATA[데이터마이그레이션]]></category>
		<category><![CDATA[데이터백업]]></category>
		<category><![CDATA[데이터베이스]]></category>
		<category><![CDATA[데이터베이스관리]]></category>
		<category><![CDATA[데이터베이스관리자]]></category>
		<category><![CDATA[데이터베이스목록]]></category>
		<category><![CDATA[데이터보안]]></category>
		<category><![CDATA[데이터복구]]></category>
		<category><![CDATA[디스크]]></category>
		<category><![CDATA[로그분석]]></category>
		<category><![CDATA[로컬접속]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리모트접속]]></category>
		<category><![CDATA[리소스]]></category>
		<category><![CDATA[리스닝]]></category>
		<category><![CDATA[마이SQL]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[매뉴얼]]></category>
		<category><![CDATA[메모리]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[문제해결]]></category>
		<category><![CDATA[방화벽]]></category>
		<category><![CDATA[배치]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[버전확인]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안설정]]></category>
		<category><![CDATA[복구]]></category>
		<category><![CDATA[비밀번호]]></category>
		<category><![CDATA[사용자관리]]></category>
		<category><![CDATA[사용자목록]]></category>
		<category><![CDATA[상태확인]]></category>
		<category><![CDATA[서버]]></category>
		<category><![CDATA[서버관리]]></category>
		<category><![CDATA[서버구축]]></category>
		<category><![CDATA[서버마이그레이션]]></category>
		<category><![CDATA[서버운영]]></category>
		<category><![CDATA[서비스관리]]></category>
		<category><![CDATA[서비스시작]]></category>
		<category><![CDATA[서비스재시작]]></category>
		<category><![CDATA[서비스중지]]></category>
		<category><![CDATA[설정파일]]></category>
		<category><![CDATA[성능튜닝]]></category>
		<category><![CDATA[센토스]]></category>
		<category><![CDATA[쉘]]></category>
		<category><![CDATA[슈퍼유저]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[스토리지]]></category>
		<category><![CDATA[시스템]]></category>
		<category><![CDATA[시스템관리]]></category>
		<category><![CDATA[시스템로그]]></category>
		<category><![CDATA[시스템엔지니어]]></category>
		<category><![CDATA[실행중인쿼리]]></category>
		<category><![CDATA[예약작업]]></category>
		<category><![CDATA[오류해결]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[운영]]></category>
		<category><![CDATA[운영환경]]></category>
		<category><![CDATA[원격접속]]></category>
		<category><![CDATA[유지보수]]></category>
		<category><![CDATA[일반사용자]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[정보]]></category>
		<category><![CDATA[커맨드라인]]></category>
		<category><![CDATA[쿼리]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[튜닝]]></category>
		<category><![CDATA[튜토리얼]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[패스워드]]></category>
		<category><![CDATA[포트]]></category>
		<category><![CDATA[포트번호]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[프로세스]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40254</guid>

					<description><![CDATA[<p>MySQL 서비스 관리 명령어 상태 확인 서비스 시작 서비스 재시작 서비스 중지 부팅 시 자동 시작 설정 파일 추가 유용한 명령어 백업 및 복구</p>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/">MySQL 서비스 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-2c60eeae      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#mysql-서비스-관리-명령어" class="uagb-toc-link__trigger">MySQL 서비스 관리 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#상태-확인" class="uagb-toc-link__trigger">상태 확인</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-시작" class="uagb-toc-link__trigger">서비스 시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-재시작" class="uagb-toc-link__trigger">서비스 재시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-중지" class="uagb-toc-link__trigger">서비스 중지</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#부팅-시-자동-시작" class="uagb-toc-link__trigger">부팅 시 자동 시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#설정-파일" class="uagb-toc-link__trigger">설정 파일</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#추가-유용한-명령어" class="uagb-toc-link__trigger">추가 유용한 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#백업-및-복구" class="uagb-toc-link__trigger">백업 및 복구</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">MySQL 서비스 관리 명령어</h2>



<h3 class="wp-block-heading">상태 확인</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl status mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl start mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 재시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 설정 변경 후 MySQL 재시작 필요
sudo systemctl restart mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 중지</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl stop mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">부팅 시 자동 시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 부팅 시 자동 시작 활성화
sudo systemctl enable mysql

# 부팅 시 자동 시작 비활성화
sudo systemctl disable mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">설정 파일</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo cat /etc/mysql/my.cnf

# 현재 상태 정보 확인
mysql -u root -p -e "SHOW STATUS;"

# MySQL 클라이언트로 현재 설정 값 확인
mysql -u root -p -e "SHOW VARIABLES;"

# 특정 설정 값만 필터링해서 보기 (예: buffer_pool_size)
mysql -u root -p -e "SHOW VARIABLES LIKE '%buffer_pool_size%';"</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">추가 유용한 명령어</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># MySQL 프로세스 확인
ps aux | grep mysql

# MySQL 버전 확인
mysql -V
mysql -u root -p -e "SELECT version();"

# 사용자 목록 확인
mysql -u root -p -e "SELECT user, host FROM mysql.user;"

# 데이터베이스 목록 확인
mysql -u root -p -e "SHOW DATABASES;"

# 테이블 상태 확인
mysql -u root -p -e "SHOW TABLE STATUS;"

# 실행 중인 쿼리 확인
mysql -u root -p -e "SHOW PROCESSLIST;"</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">백업 및 복구</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 전체 데이터베이스 백업
sudo mysqldump -u root -p --all-databases > full_backup.sql

# 특정 데이터베이스 백업
sudo mysqldump -u root -p database_name > db_backup.sql

# 백업 파일로 복구
mysql -u root -p &lt; full_backup.sql</pre>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/">MySQL 서비스 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu export 명령어 (.NET)</title>
		<link>https://lycos7560.com/ubuntu/ubuntu-export-%eb%aa%85%eb%a0%b9%ec%96%b4-net/40241/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu-export-%eb%aa%85%eb%a0%b9%ec%96%b4-net/40241/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Fri, 08 Aug 2025 06:21:42 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[app-config]]></category>
		<category><![CDATA[appsettings]]></category>
		<category><![CDATA[appsettings.development.json]]></category>
		<category><![CDATA[appsettings.json]]></category>
		<category><![CDATA[appsettings.production.json]]></category>
		<category><![CDATA[appsettings.staging.json]]></category>
		<category><![CDATA[asp-net-core]]></category>
		<category><![CDATA[aspnetcore]]></category>
		<category><![CDATA[aspnetcore-environment]]></category>
		<category><![CDATA[aspnetcore-urls]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash_profile]]></category>
		<category><![CDATA[bashrc]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[child-process]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[connection-string-env]]></category>
		<category><![CDATA[connection-strings]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[database-config]]></category>
		<category><![CDATA[database-connection]]></category>
		<category><![CDATA[db-connection]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[dotnet-config]]></category>
		<category><![CDATA[dotnet-core]]></category>
		<category><![CDATA[dotnet-environment]]></category>
		<category><![CDATA[dotnet-environment-variable]]></category>
		<category><![CDATA[dotnet-publish]]></category>
		<category><![CDATA[dotnet-run]]></category>
		<category><![CDATA[dotnet-settings]]></category>
		<category><![CDATA[env]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[environment-config]]></category>
		<category><![CDATA[environment-example]]></category>
		<category><![CDATA[environment-variable]]></category>
		<category><![CDATA[environment-variable-setup]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[export-command]]></category>
		<category><![CDATA[export-example]]></category>
		<category><![CDATA[export-variable]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux-dotnet]]></category>
		<category><![CDATA[linux-export]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[port-config]]></category>
		<category><![CDATA[printenv]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[prod]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[production-server]]></category>
		<category><![CDATA[publish]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[secrets]]></category>
		<category><![CDATA[secure-environment-variable]]></category>
		<category><![CDATA[server-config]]></category>
		<category><![CDATA[server-environment]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell-variable]]></category>
		<category><![CDATA[stage]]></category>
		<category><![CDATA[Staging]]></category>
		<category><![CDATA[staging-server]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[system-environment]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[systemd-service]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[test-environment]]></category>
		<category><![CDATA[ubuntu-dotnet]]></category>
		<category><![CDATA[ubuntu-dotnet-deploy]]></category>
		<category><![CDATA[url-binding]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[개발서버]]></category>
		<category><![CDATA[개발환경]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[닷넷]]></category>
		<category><![CDATA[닷넷코어]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[민감정보]]></category>
		<category><![CDATA[배포]]></category>
		<category><![CDATA[배포서버]]></category>
		<category><![CDATA[배포환경]]></category>
		<category><![CDATA[서버환경]]></category>
		<category><![CDATA[설정파일]]></category>
		<category><![CDATA[쉘]]></category>
		<category><![CDATA[스테이징]]></category>
		<category><![CDATA[스테이징환경]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[운영환경]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[테스트서버]]></category>
		<category><![CDATA[테스트환경]]></category>
		<category><![CDATA[포트설정]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[프로덕션환경]]></category>
		<category><![CDATA[프로세스]]></category>
		<category><![CDATA[환경변수]]></category>
		<category><![CDATA[환경변수보안]]></category>
		<category><![CDATA[환경설정]]></category>
		<category><![CDATA[환경설정파일]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40241</guid>

					<description><![CDATA[<p>📄 Ubuntu export 명령어 1️⃣ 개요 export 명령어는 현재 셸 환경에 환경 변수를 등록하거나 수정하는 데 사용 등록된 변수는 현재 셸과 그 자식 프로세스에서 사용할 수 있음 2️⃣ 기본 문법 3️⃣ 특징 4️⃣ 확인 방법 💡 .NET에서의 사용 예시 1️⃣ ASP.NET Core에서 환경 지정 프로젝트 유형 권장 환경 변수 이유 ASP.NET Core 웹앱 ASPNETCORE_ENVIRONMENT 웹 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-export-%eb%aa%85%eb%a0%b9%ec%96%b4-net/40241/">Ubuntu export 명령어 (.NET)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-b32ec816      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#ubuntu-export-명령어" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c4.png" alt="📄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Ubuntu export 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-개요" class="uagb-toc-link__trigger">1&#x20e3; 개요</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-기본-문법" class="uagb-toc-link__trigger">2&#x20e3; 기본 문법</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#3-특징" class="uagb-toc-link__trigger">3&#x20e3; 특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#4-확인-방법" class="uagb-toc-link__trigger">4&#x20e3; 확인 방법</a></li></ul></li><li class="uagb-toc__list"><a href="#net에서의-사용-예시" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> .NET에서의 사용 예시</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-aspnet-core에서-환경-지정" class="uagb-toc-link__trigger">1&#x20e3; ASP.NET Core에서 환경 지정</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-net에서-특정-포트로-실행" class="uagb-toc-link__trigger">2&#x20e3; .NET에서 특정 포트로 실행</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#3-영구-설정" class="uagb-toc-link__trigger">3&#x20e3; 영구 설정</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c4.png" alt="📄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Ubuntu export 명령어</h2>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">1&#x20e3; 개요</h3>



<p><code>export</code> 명령어는 <strong>현재 셸 환경에 환경 변수를 등록하거나 수정</strong>하는 데 사용</p>



<p>등록된 변수는 <strong>현재 셸과 그 자식 프로세스</strong>에서 사용할 수 있음</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2&#x20e3; 기본 문법</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">export 변수명=값

또는

export 변수명</pre>



<ul class="wp-block-list">
<li><code>변수명=값</code> : 새 환경 변수를 만들거나 기존 변수 값을 변경</li>



<li><code>변수명</code> : 이미 선언된 변수를 환경 변수로 승격</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">3&#x20e3; 특징</h3>



<ul class="wp-block-list">
<li>환경 변수는 <strong>프로세스 간 전달</strong> 가능 (부모 → 자식).</li>



<li><code>export</code>로 설정한 변수는 <strong>현재 세션</strong>에서만 유효.</li>



<li>영구적으로 유지하려면 <code>~/.bashrc</code> 또는 <code>~/.bash_profile</code>에 추가해야 함.</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">4&#x20e3; 확인 방법</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">echo $변수명       # 변수 값 출력
printenv 변수명    # 환경 변수 확인
env                # 전체 환경 변수 목록
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> .NET에서의 사용 예시</h2>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">1&#x20e3; ASP.NET Core에서 환경 지정</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">export ASPNETCORE_ENVIRONMENT=Development
export ASPNETCORE_ENVIRONMENT=Staging
export ASPNETCORE_ENVIRONMENT=Production

export DOTNET_ENVIRONMENT=Development
export DOTNET_ENVIRONMENT=Staging // 실제 운영 환경(Production)과 거의 동일하지만, 사용자에게는 서비스되지 않는 사전 검증용 환경
export DOTNET_ENVIRONMENT=Production

dotnet run</pre>



<ul class="wp-block-list">
<li>예를 들어 <code>Development</code>로 설정하면, 개발 모드 환경 설정(<code>appsettings.Development.json</code>)을 자동으로 사용</li>
</ul>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>프로젝트 유형</th><th>권장 환경 변수</th><th>이유</th></tr></thead><tbody><tr><td>ASP.NET Core 웹앱</td><td>ASPNETCORE_ENVIRONMENT</td><td>웹 호스팅에 최적화된 공식 표준이며 <code>DOTNET_ENVIRONMENT</code>보다 <strong>우선순위가 높</strong></td></tr><tr><td>Worker Service</td><td>DOTNET_ENVIRONMENT</td><td>웹과 관련 없는 일반적인 .NET 호스팅 환경을 위한 표준 변수</td></tr><tr><td>콘솔 앱</td><td>DOTNET_ENVIRONMENT</td><td>범용적 사용</td></tr><tr><td>Blazor</td><td>ASPNETCORE_ENVIRONMENT</td><td>ASP.NET Core 호스팅 모델을 기반으로 하므로 웹 앱과 동일한 기준</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2&#x20e3; .NET에서 특정 포트로 실행</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 5005번 포트로 애플리케이션 실행
export ASPNETCORE_URLS="http://localhost:5005"

dotnet run</pre>



<ul class="wp-block-list">
<li><code>ASPNETCORE_URLS</code> 환경 변수를 이용해 실행 시 포트를 변경할 수 있음</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">3&#x20e3; 영구 설정</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 1. .bashrc 파일에 환경 변수 설정 명령어를 추가
echo 'export DOTNET_ENVIRONMENT=Production' >> ~/.bashrc

# 2. 수정된 .bashrc 설정을 현재 터미널 세션에 바로 적용
source ~/.bashrc

# 3. 설정 확인
echo $DOTNET_ENVIRONMENT</pre>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-export-%eb%aa%85%eb%a0%b9%ec%96%b4-net/40241/">Ubuntu export 명령어 (.NET)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu-export-%eb%aa%85%eb%a0%b9%ec%96%b4-net/40241/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SMTP, 우분투 Postfix</title>
		<link>https://lycos7560.com/ubuntu/smtp-%ec%9a%b0%eb%b6%84%ed%88%ac-postfix/40162/</link>
					<comments>https://lycos7560.com/ubuntu/smtp-%ec%9a%b0%eb%b6%84%ed%88%ac-postfix/40162/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Fri, 23 May 2025 13:09:05 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[우분투]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40162</guid>

					<description><![CDATA[<p>✅ SMTP? SMTP(Simple Mail Transfer Protocol)는 이메일을 전송하기 위해 사용되는 표준 통신 프로토콜 인터넷 상에서 이메일 클라이언트 ↔ 메일 서버 ↔ 수신자 메일 서버 간에 텍스트 기반 명령어를 통해 메시지를 전송합니다. 📌 SMTP의 역할 📦 SMTP 흐름 요약 ✅ SMTP 기본 포트 포트 용도 설명 25 기본 SMTP 포트 서버 간 메일 전송 (많이 차단됨) [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/smtp-%ec%9a%b0%eb%b6%84%ed%88%ac-postfix/40162/">SMTP, 우분투 Postfix</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-908bbcff      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP?</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp의-역할" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP의 역할</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp-흐름-요약" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e6.png" alt="📦" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 흐름 요약</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp-기본-포트" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 기본 포트</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp-주요-명령어-명령-기반-프로토콜" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c4.png" alt="📄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 주요 명령어 (명령 기반 프로토콜)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp-보안-방식" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f510.png" alt="🔐" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 보안 방식</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp-클라이언트-구성-요소-개발-시" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f6e0.png" alt="🛠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 클라이언트 구성 요소 (개발 시)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#smtp와-관련된-주요-용어" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4eb.png" alt="📫" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP와 관련된 주요 용어</a></li></ul></li><li class="uagb-toc__list"><a href="#pop3란" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3란?</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3-기본-특징" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e6.png" alt="📦" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 기본 특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3-동작-흐름" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e5.png" alt="📥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 동작 흐름</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3-주요-명령어" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c4.png" alt="📄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 주요 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3-포트-및-암호화" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f510.png" alt="🔐" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 포트 및 암호화</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3-vs-imap" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f19a.png" alt="🆚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 vs IMAP</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#실제-메일-서비스의-pop3-설정-예시" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e7.png" alt="📧" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 실제 메일 서비스의 POP3 설정 예시</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3를-사용할-수-있는-클라이언트환경" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e7.png" alt="📧" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3를 사용할 수 있는 클라이언트/환경</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#pop3-사용-시-주의사항" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 사용 시 주의사항</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#정리-요약" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4da.png" alt="📚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 정리 요약</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#우분투-메일서버-구축-추가-자료-동영상" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4eb.png" alt="📫" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 우분투 메일서버 구축 추가 자료 동영상</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#우분투-postfix-설치" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 우분투 Postfix 설치</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP?</h2>



<p><strong>SMTP</strong>(Simple Mail Transfer Protocol)는 이메일을 <strong>전송</strong>하기 위해 사용되는 <strong>표준 통신 프로토콜</strong></p>



<p>인터넷 상에서 <strong>이메일 클라이언트 <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2194.png" alt="↔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 메일 서버 <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2194.png" alt="↔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 수신자 메일 서버</strong> 간에 <strong>텍스트 기반 명령어</strong>를 통해 메시지를 전송합니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP의 역할</h3>



<ul class="wp-block-list">
<li>이메일 <strong>작성자 → 서버 전송 (Client to Server)</strong></li>



<li>이메일 <strong>서버 → 수신자 서버 전송 (Server to Server)</strong></li>



<li><strong>전송만 가능</strong>, <strong>수신은 불가능</strong> (수신은 POP3 또는 IMAP 프로토콜이 담당)</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e6.png" alt="📦" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 흐름 요약</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="724" height="318" src="https://lycos7560.com/wp-content/uploads/2025/07/image-17.png" alt="" class="wp-image-40163" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-17.png 724w, https://lycos7560.com/wp-content/uploads/2025/07/image-17-300x132.png 300w" sizes="(max-width: 724px) 100vw, 724px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=96inHerdQhA&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=51" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=96inHerdQhA&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=51</a></figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">[보낸 사람]
    ↓ SMTP
[보낸 사람 메일 서버]
    ↓ SMTP
[받는 사람 메일 서버]
    ↓ IMAP 또는 POP3
[받는 사람]</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 기본 포트</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>포트</th><th>용도</th><th>설명</th></tr></thead><tbody><tr><td>25</td><td>기본 SMTP 포트</td><td>서버 간 메일 전송 (많이 차단됨)</td></tr><tr><td>465</td><td>SMTP over SSL (암호화)</td><td>구식이나 일부 서비스에서 사용</td></tr><tr><td>587</td><td>SMTP with STARTTLS</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 현재 권장되는 전송 방식</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c4.png" alt="📄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 주요 명령어 (명령 기반 프로토콜)</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>명령어</th><th>설명</th></tr></thead><tbody><tr><td><code>HELO</code> / <code>EHLO</code></td><td>클라이언트가 서버에게 자신을 소개</td></tr><tr><td><code>MAIL FROM:</code></td><td>발신자 이메일 주소</td></tr><tr><td><code>RCPT TO:</code></td><td>수신자 이메일 주소</td></tr><tr><td><code>DATA</code></td><td>본문 시작 (제목, 본문 등 포함)</td></tr><tr><td><code>QUIT</code></td><td>연결 종료</td></tr></tbody></table></figure>



<p>SMTP는 사람이 타이핑할 수도 있을 정도로 단순한 텍스트 프로토콜입니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f510.png" alt="🔐" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 보안 방식</h3>



<p>SMTP는 원래 <strong>암호화되지 않은 상태</strong>로 설계되었기 때문에, 현대에서는 보안 강화가 필요합니다.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>보안방식</th><th>설명</th></tr></thead><tbody><tr><td>STARTTLS</td><td>일반 연결을 TLS로 승격 (587번 포트에서 사용)</td></tr><tr><td>SMTPS (SSL)</td><td>암호화된 SMTP (465번 포트)</td></tr><tr><td>인증 필요 (AUTH)</td><td>대부분의 SMTP 서버는 사용자 인증 필수</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f6e0.png" alt="🛠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP 클라이언트 구성 요소 (개발 시)</h3>



<ul class="wp-block-list">
<li><strong>SMTP 서버 주소</strong>: ex) <code>smtp.gmail.com</code>, <code>smtp.naver.com</code></li>



<li><strong>포트 번호</strong>: 보통 587 (STARTTLS) 또는 465 (SSL)</li>



<li><strong>이메일 계정 정보</strong>: 인증을 위한 ID / 앱 비밀번호</li>



<li><strong>TLS/SSL 설정</strong>: 암호화 전송 필요</li>



<li><strong>보낸 사람, 받는 사람, 제목, 본문, 첨부파일 등</strong></li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4eb.png" alt="📫" class="wp-smiley" style="height: 1em; max-height: 1em;" /> SMTP와 관련된 주요 용어</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>용어</th><th>설명</th></tr></thead><tbody><tr><td>MUA (Mail User Agent)</td><td>이메일 클라이언트 (ex. Outlook, Gmail 앱 등)</td></tr><tr><td>MTA (Mail Transfer Agent)</td><td>메일 전송 서버 (SMTP 서버)</td></tr><tr><td>MDA (Mail Delivery Agent)</td><td>메일 수신 및 보관 서버 (POP3/IMAP 서버)</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--60)"/>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3란?</h2>



<p>POP3 (Post Office Protocol version 3)는 <strong>원격 메일 서버에 저장된 이메일을 다운로드해서 로컬에 저장하는 수신 프로토콜</strong>입니다.</p>



<ul class="wp-block-list">
<li><strong>SMTP</strong>가 &#8220;이메일을 보내는&#8221; 프로토콜이라면</li>



<li><strong>POP3</strong>는 &#8220;이메일을 받아오는&#8221; 데 사용됩니다.</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e6.png" alt="📦" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 기본 특징</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>설명</th></tr></thead><tbody><tr><td>프로토콜 목적</td><td>메일 수신 (다운로드)</td></tr><tr><td>기본 포트</td><td><code>110</code> (일반), <code>995</code> (SSL)</td></tr><tr><td>메시지 저장 방식</td><td>메일을 <strong>로컬로 다운로드하고 서버에서 삭제</strong> (기본 동작)</td></tr><tr><td>연결 방식</td><td>단방향 (서버 → 클라이언트)</td></tr><tr><td>프로토콜 상태</td><td>상태 유지 없음 (Stateless)</td></tr><tr><td>대안 프로토콜</td><td>IMAP (보다 동기화 중심)</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e5.png" alt="📥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 동작 흐름</h3>



<ol class="wp-block-list">
<li>메일 클라이언트(Outlook, Thunderbird 등)가 POP3 서버에 연결</li>



<li>사용자 인증 (ID/PW)</li>



<li>서버에 저장된 메일을 다운로드</li>



<li>다운로드 후 서버에서 메일 삭제 (옵션: 서버에 복사본 유지 가능)</li>



<li>연결 종료</li>
</ol>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c4.png" alt="📄" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 주요 명령어</h3>



<p>POP3는 <strong>텍스트 기반 명령어</strong>로 동작합니다 (Telnet 등으로 직접 테스트 가능).</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>명령어</th><th>설명</th></tr></thead><tbody><tr><td><code>USER username</code></td><td>사용자 이름 입력</td></tr><tr><td><code>PASS password</code></td><td>비밀번호 입력</td></tr><tr><td><code>STAT</code></td><td>메시지 개수, 전체 크기 확인</td></tr><tr><td><code>LIST</code></td><td>메시지 목록 확인</td></tr><tr><td><code>RETR n</code></td><td>n번째 메시지 다운로드</td></tr><tr><td><code>DELE n</code></td><td>n번째 메시지 삭제 요청</td></tr><tr><td><code>QUIT</code></td><td>연결 종료 및 삭제 적용</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f510.png" alt="🔐" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 포트 및 암호화</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>포트</th><th>설명</th></tr></thead><tbody><tr><td>110</td><td>일반 POP3 (암호화 없음)</td></tr><tr><td>995</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 over SSL (보안 연결)</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f19a.png" alt="🆚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 vs IMAP</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>POP3</th><th>IMAP</th></tr></thead><tbody><tr><td>메일 저장 위치</td><td>클라이언트 (로컬)</td><td>서버 (중앙 저장)</td></tr><tr><td>디바이스 동기화</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 불가능</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 가능</td></tr><tr><td>폴더 지원</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 없음</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 있음</td></tr><tr><td>서버에서 삭제</td><td>기본적으로 삭제</td><td>기본적으로 유지</td></tr><tr><td>사용 대상</td><td>단일 장치에서 메일 확인</td><td>여러 기기에서 메일 동기화</td></tr></tbody></table></figure>



<p><strong>POP3는 단일 장치 기반</strong>, <strong>IMAP은 클라우드 기반 메일 관리</strong>에 더 적합합니다.</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e7.png" alt="📧" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 실제 메일 서비스의 POP3 설정 예시</h3>



<ul class="wp-block-list">
<li>Gmail POP3 설정</li>
</ul>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>값</th></tr></thead><tbody><tr><td>서버 주소</td><td><code>pop.gmail.com</code></td></tr><tr><td>포트</td><td><code>995</code></td></tr><tr><td>보안</td><td>SSL 필수</td></tr><tr><td>인증 필요</td><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ID, 앱 비밀번호 필요</td></tr></tbody></table></figure>



<p>설정 경로: Gmail 설정 → 전달 및 POP/IMAP → POP 사용 설정</p>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4e7.png" alt="📧" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3를 사용할 수 있는 클라이언트/환경</h3>



<ul class="wp-block-list">
<li>데스크탑: Outlook, Thunderbird, Windows Mail</li>



<li>모바일: 대부분의 이메일 앱에서 설정 가능</li>



<li>.NET 또는 다른 언어에서 직접 구현 가능 (<code>MailKit</code>, <code>OpenPop.NET</code> 등 라이브러리 사용)</li>
</ul>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> POP3 사용 시 주의사항</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>설명</th></tr></thead><tbody><tr><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 서버 저장 유무 설정</td><td>대부분 클라이언트에서 &#8220;서버에 복사본 유지&#8221; 옵션 있음</td></tr><tr><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 여러 기기 동시 사용 어려움</td><td>한 번 내려받으면 다른 기기에서 확인 어려움</td></tr><tr><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f510.png" alt="🔐" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 보안 필수</td><td>항상 SSL 포트를 사용해야 함 (995)</td></tr><tr><td><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f511.png" alt="🔑" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 앱 비밀번호 사용</td><td>Gmail/Naver 등은 앱 비밀번호 요구</td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4da.png" alt="📚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 정리 요약</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>항목</th><th>POP3 요약</th></tr></thead><tbody><tr><td>목적</td><td>메일 수신 (다운로드 방식)</td></tr><tr><td>특징</td><td>클라이언트 중심, 단방향</td></tr><tr><td>기본 포트</td><td>110 (일반), 995 (SSL)</td></tr><tr><td>대체 프로토콜</td><td>IMAP (동기화 중심)</td></tr><tr><td>적합한 경우</td><td>단일 디바이스, 오프라인 사용 중심 환경</td></tr></tbody></table></figure>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4eb.png" alt="📫" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 우분투 메일서버 구축 추가 자료 동영상</h3>



<div class="wp-block-uagb-container uagb-block-4a2b8e98 alignfull uagb-is-root-container"><div class="uagb-container-inner-blocks-wrap">
<div class="wp-block-uagb-container uagb-block-282be809">
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="[우분투 리눅스 기초 강의] 50강. 메일 서버 ① | 개념과 환경 구성도" width="1778" height="1000" src="https://www.youtube.com/embed/96inHerdQhA?list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
</div>



<div class="wp-block-uagb-container uagb-block-07b60996">
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="[우분투 리눅스 기초 강의] 51강. 메일 서버 ② | 메일 서버를 위한 네임 서버 구현" width="1778" height="1000" src="https://www.youtube.com/embed/tiqgmVpqeLw?list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
</div>



<div class="wp-block-uagb-container uagb-block-e79e4ef4">
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="[우분투 리눅스 기초 강의] 52강. 메일 서버 ③ | 메일 서버 구현" width="1778" height="1000" src="https://www.youtube.com/embed/E5ZhskvAx64?list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
</div>



<div class="wp-block-uagb-container uagb-block-446193d1">
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="[우분투 리눅스 기초 강의] 53강. 메일 서버 ④ | 웹 메일 설치" width="1778" height="1000" src="https://www.youtube.com/embed/agx1hrLYS9E?list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
</div>
</div></div>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 우분투 Postfix 설치</h2>



<p>Sendmail은 복잡하고 보안에 취약해서, 보통은 <strong>Postfix</strong>를 많이 사용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt update
sudo apt install postfix
sudo apt install mailutils</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Postfix가 설치되면 </p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">설정
/etc/postfix/main.cf 

포트 변경
sudo vim /etc/postfix/master.cf

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       -       smtpd
3512      inet  n       -       y       -       -       smtpd

# 25번(smtp) 포트를 유지하면서 3512 포트를 추가</pre>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/smtp-%ec%9a%b0%eb%b6%84%ed%88%ac-postfix/40162/">SMTP, 우분투 Postfix</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/smtp-%ec%9a%b0%eb%b6%84%ed%88%ac-postfix/40162/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu MSSQL &#8216;liblber-2.5.so.0&#8217; Error</title>
		<link>https://lycos7560.com/ubuntu/ubuntu-mssql-liblber-2-5-so-0-error/40104/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu-mssql-liblber-2-5-so-0-error/40104/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 17 Dec 2024 18:41:36 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[liblber-2.5.so.0]]></category>
		<category><![CDATA[libldap]]></category>
		<category><![CDATA[libldap-dev]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[MSSQL 2022]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Ubuntu MSSQL 'liblber-2.5.so.0' Error]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기초]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40104</guid>

					<description><![CDATA[<p>https://medium.com/@mncubeharmony/resolving-sql-server-startup-issues-on-linux-missing-ldap-libraries-efc5b25e6063 우분투에서 Microsoft SQL Server를 시작하는 데 문제가 발생 SQL Server의 기능에 필수적인 LDAP 라이브러리가 누락된 것이 주된 원인 LDAP 라이브러리는 Lightweight Directory Access Protocol (LDAP)이라는 통신 프로토콜을 사용하기 위한 소프트웨어 구성 요소들을 의미 즉, LDAP 서버와 통신하고 데이터를 주고받는 데 필요한 도구 모음 해결책 1단계: libldap-2.5-0 다운로드 필요한 버전의 libldap-2.5-0을 다운로드하려면 다음 명령을 사용 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-mssql-liblber-2-5-so-0-error/40104/">Ubuntu MSSQL &#8216;liblber-2.5.so.0&#8217; Error</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://medium.com/@mncubeharmony/resolving-sql-server-startup-issues-on-linux-missing-ldap-libraries-efc5b25e6063" target="_blank" rel="noreferrer noopener">https://medium.com/@mncubeharmony/resolving-sql-server-startup-issues-on-linux-missing-ldap-libraries-efc5b25e6063</a></p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">/opt/mssql/bin/sqlservr: error while loading shared libraries: liblber-2.5.so.0: cannot open shared object file: No such file or directory</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1389" height="77" src="https://lycos7560.com/wp-content/uploads/2025/07/image-10.png" alt="" class="wp-image-40105" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-10.png 1389w, https://lycos7560.com/wp-content/uploads/2025/07/image-10-300x17.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-10-768x43.png 768w" sizes="(max-width: 1389px) 100vw, 1389px" /></figure>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>우분투에서 Microsoft SQL Server를 시작하는 데 문제가 발생</p>



<p>SQL Server의 기능에 필수적인 LDAP 라이브러리가 누락된 것이 주된 원인</p>



<p><strong>LDAP 라이브러리</strong>는 Lightweight Directory Access Protocol (LDAP)이라는 통신 프로토콜을 사용하기 위한 소프트웨어 구성 요소들을 의미</p>



<p>즉, <strong>LDAP 서버와 통신하고 데이터를 주고받는 데 필요한 도구 모음</strong></p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">해결책</h3>



<h4 class="wp-block-heading">1단계: libldap-2.5-0 다운로드</h4>



<p>필요한 버전의 <code>libldap-2.5-0</code>을 다운로드하려면 다음 명령을 사용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">curl -O http://debian.mirror.ac.za/debian/pool/main/o/openldap/libldap-2.5-0_2.5.13+dfsg-5_amd64.deb</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">2단계: libldap-2.5-0 설치</h4>



<p>다운로드한 패키지를 패키지 관리자를 사용하여 설치</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo dpkg -i libldap-2.5-0_2.5.13+dfsg-5_amd64.deb</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">3단계: libldap-dev 다운로드</h4>



<p>이제 라이브러리의 개발 버전을 다운로드</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">curl -O http://debian.mirror.ac.za/debian/pool/main/o/openldap/libldap-dev_2.5.13+dfsg-5_amd64.deb
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">4단계: libldap-dev 설치</h4>



<p>패키지 관리자를 사용하여 개발 패키지를 설치</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo dpkg -i libldap-dev_2.5.13+dfsg-5_amd64.deb
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">수정 사항 확인</h3>



<p>누락된 라이브러리를 설치한 후, SQL Server 서비스 상태 명령을 실행하여 서비스가 문제없이 시작되는지 확인</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">systemctl status mssql-server --no-pager</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="958" height="287" src="https://lycos7560.com/wp-content/uploads/2025/07/image-11.png" alt="" class="wp-image-40107" srcset="https://lycos7560.com/wp-content/uploads/2025/07/image-11.png 958w, https://lycos7560.com/wp-content/uploads/2025/07/image-11-300x90.png 300w, https://lycos7560.com/wp-content/uploads/2025/07/image-11-768x230.png 768w" sizes="(max-width: 958px) 100vw, 958px" /></figure>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-mssql-liblber-2-5-so-0-error/40104/">Ubuntu MSSQL &#8216;liblber-2.5.so.0&#8217; Error</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu-mssql-liblber-2-5-so-0-error/40104/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Quota (쿼터)</title>
		<link>https://lycos7560.com/ubuntu/quota-%ec%bf%bc%ed%84%b0/39116/</link>
					<comments>https://lycos7560.com/ubuntu/quota-%ec%bf%bc%ed%84%b0/39116/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Fri, 06 Dec 2024 12:21:16 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Add User]]></category>
		<category><![CDATA[adduser]]></category>
		<category><![CDATA[Auto Mount]]></category>
		<category><![CDATA[Create Partition]]></category>
		<category><![CDATA[Create Test File]]></category>
		<category><![CDATA[daemon reload]]></category>
		<category><![CDATA[Disk Limitation]]></category>
		<category><![CDATA[Disk Management]]></category>
		<category><![CDATA[Disk Space Limit]]></category>
		<category><![CDATA[Disk Space Management]]></category>
		<category><![CDATA[Disk Space Monitoring]]></category>
		<category><![CDATA[Disk Space Optimization]]></category>
		<category><![CDATA[Disk Usage Limit]]></category>
		<category><![CDATA[edquota]]></category>
		<category><![CDATA[Enforcement Action]]></category>
		<category><![CDATA[fallocate]]></category>
		<category><![CDATA[File Count Limit]]></category>
		<category><![CDATA[File System]]></category>
		<category><![CDATA[File System Creation]]></category>
		<category><![CDATA[File System Format]]></category>
		<category><![CDATA[Grace Period]]></category>
		<category><![CDATA[Group Quota]]></category>
		<category><![CDATA[Group Quota Setup]]></category>
		<category><![CDATA[Hard Limit]]></category>
		<category><![CDATA[Inode]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mkfs.ext4]]></category>
		<category><![CDATA[Mount Folder]]></category>
		<category><![CDATA[Package Installation]]></category>
		<category><![CDATA[Quota]]></category>
		<category><![CDATA[Quota Package]]></category>
		<category><![CDATA[Quota 패키지]]></category>
		<category><![CDATA[quotaon]]></category>
		<category><![CDATA[repquota]]></category>
		<category><![CDATA[Soft Limit]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[system performance]]></category>
		<category><![CDATA[tune2fs]]></category>
		<category><![CDATA[User Home Directory]]></category>
		<category><![CDATA[User Quota]]></category>
		<category><![CDATA[User Quota Setup]]></category>
		<category><![CDATA[Warning Message]]></category>
		<category><![CDATA[Warning System]]></category>
		<category><![CDATA[강제 조치]]></category>
		<category><![CDATA[경고 메시지]]></category>
		<category><![CDATA[경고 시스템]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[그레이스 기간]]></category>
		<category><![CDATA[그룹 제한]]></category>
		<category><![CDATA[그룹 쿼터 설정]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[디스크 공간 관리]]></category>
		<category><![CDATA[디스크 공간 모니터링]]></category>
		<category><![CDATA[디스크 공간 최적화]]></category>
		<category><![CDATA[디스크 관리]]></category>
		<category><![CDATA[디스크 사용량 제한]]></category>
		<category><![CDATA[디스크 용량 제한]]></category>
		<category><![CDATA[디스크 제한]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[사용자 제한]]></category>
		<category><![CDATA[사용자 추가]]></category>
		<category><![CDATA[사용자 쿼터 설정]]></category>
		<category><![CDATA[사용자 홈 디렉토리]]></category>
		<category><![CDATA[소프트 한도]]></category>
		<category><![CDATA[시스템 관리]]></category>
		<category><![CDATA[시스템 성능]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[인오드]]></category>
		<category><![CDATA[자동 마운트]]></category>
		<category><![CDATA[쿼터]]></category>
		<category><![CDATA[테스트 파일 생성]]></category>
		<category><![CDATA[파일 개수 제한]]></category>
		<category><![CDATA[파일 시스템]]></category>
		<category><![CDATA[파일 시스템 생성]]></category>
		<category><![CDATA[파일 시스템 포맷]]></category>
		<category><![CDATA[파티션 생성]]></category>
		<category><![CDATA[패키지 설치]]></category>
		<category><![CDATA[폴더 마운트]]></category>
		<category><![CDATA[하드 한도]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=39116</guid>

					<description><![CDATA[<p>Quota (쿼터) 리눅스에서 쿼터(Quota)는 사용자 또는 그룹이 사용할 수 있는 디스크 공간 및 파일 개수를 제한하는 시스템 관리 도구 디스크 자원을 효율적으로 관리하고, 특정 사용자가 시스템 디스크 자원을 과도하게 사용하는 것을 방지 파일 시스템을 &#8220;/&#8221; (root) 로 지정하는 것보다는, 별도의 파일시스템을 지정해서 해당 부분을 쓰도록 하는 것이 좋음 &#8220;/&#8221; (root)을 동시에 여러 사용자가 사용하게되면, 우분투 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/quota-%ec%bf%bc%ed%84%b0/39116/">Quota (쿼터)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-1c50404f      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#quota-쿼터" class="uagb-toc-link__trigger">Quota (쿼터)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#quota-기능" class="uagb-toc-link__trigger">Quota 기능</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#quota-개념" class="uagb-toc-link__trigger">Quota 개념</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#quota-실습" class="uagb-toc-link__trigger">Quota 실습</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Quota (쿼터)</h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>리눅스에서 <strong>쿼터(Quota)</strong>는 사용자 또는 그룹이 사용할 수 있는 디스크 공간 및 파일 개수를 제한하는 시스템 관리 도구</p>



<p>디스크 자원을 효율적으로 관리하고, 특정 사용자가 시스템 디스크 자원을 과도하게 사용하는 것을 방지</p>



<p>파일 시스템을 &#8220;/&#8221; (root) 로 지정하는 것보다는, 별도의 파일시스템을 지정해서 해당 부분을 쓰도록 하는 것이 좋음</p>



<p> &#8220;/&#8221; (root)을 동시에 여러 사용자가 사용하게되면, 우분투 서버를 운영하기 위해서 </p>



<p>디스크를 읽고 쓰는 작업과 일반 사용자가 디스크를 읽고 쓰는 작업이 동시에 발생하므로 전반적으로 시스템의 성능이 저하됨</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><strong>Quota</strong> <strong>기능</strong></h3>



<ol class="wp-block-list">
<li><strong>디스크 용량 제한</strong>
<ul class="wp-block-list">
<li>사용자별 또는 그룹별 디스크 사용량 제한 설정</li>
</ul>
</li>



<li><strong>파일 개수 제한</strong>
<ul class="wp-block-list">
<li>사용자가 생성할 수 있는 파일(인오드)의 최대 개수 제한</li>
</ul>
</li>



<li><strong>경고 및 강제 조치</strong>
<ul class="wp-block-list">
<li>사용량이 한도를 초과하면 경고 메시지 출력</li>



<li>설정에 따라 일정 시간을 초과하면 파일 생성/쓰기 제한</li>
</ul>
</li>
</ol>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><strong>Quota 개념</strong></h3>



<ol class="wp-block-list">
<li><strong>하드 한도 (Hard Limit)</strong>
<ul class="wp-block-list">
<li>사용자가 절대 초과할 수 없는 디스크 용량이나 파일 개수 한도</li>
</ul>
</li>



<li><strong>소프트 한도 (Soft Limit)</strong>
<ul class="wp-block-list">
<li>사용자가 초과할 수 있지만, 제한된 기간(그레이스 기간) 동안만 허용되는 한도</li>
</ul>
</li>



<li><strong>그레이스 기간 (Grace Period)</strong>
<ul class="wp-block-list">
<li>소프트 한도를 초과했을 때, 허용되는 유예 기간</li>



<li>유예 기간 내에 사용량을 줄이지 않으면 하드 한도가 적용됨</li>
</ul>
</li>
</ol>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Quota 실습</h3>



<p class="wp-embed-aspect-16-9 wp-has-aspect-ratio"><a href="https://www.youtube.com/watch?v=vOzw5usBw4M&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=41" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=vOzw5usBw4M&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=41</a></p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1157" height="637" src="https://lycos7560.com/wp-content/uploads/2024/12/image-188.png" alt="" class="wp-image-39118" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-188.png 1157w, https://lycos7560.com/wp-content/uploads/2024/12/image-188-300x165.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-188-768x423.png 768w" sizes="(max-width: 1157px) 100vw, 1157px" /><figcaption class="wp-element-caption">10GB 가상의 디스크로 실습0GB 가상의 디스크로 실습</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# 파티션 생성
fdisk /dev/sdb

# 파일시스템 생성 및 포맷
mkfs.ext4 /dev/sdb1
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="888" height="887" src="https://lycos7560.com/wp-content/uploads/2024/12/image-189.png" alt="" class="wp-image-39119" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-189.png 888w, https://lycos7560.com/wp-content/uploads/2024/12/image-189-300x300.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-189-150x150.png 150w, https://lycos7560.com/wp-content/uploads/2024/12/image-189-768x767.png 768w" sizes="(max-width: 888px) 100vw, 888px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1036" height="281" src="https://lycos7560.com/wp-content/uploads/2024/12/image-190.png" alt="" class="wp-image-39120" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-190.png 1036w, https://lycos7560.com/wp-content/uploads/2024/12/image-190-300x81.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-190-768x208.png 768w" sizes="(max-width: 1036px) 100vw, 1036px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# 사용자의 홈 폴더를 이곳으로 설정
# 폴더 생성 후 마운트
mkdir /userHome

# 재부팅 후 자동 마운트 등록
gedit /etc/fstab

/dev/sdb1 /userhome ext4 defaults 0 0 

# daemon reload
systemctl daemon-reload</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1193" height="515" src="https://lycos7560.com/wp-content/uploads/2024/12/image-191.png" alt="" class="wp-image-39121" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-191.png 1193w, https://lycos7560.com/wp-content/uploads/2024/12/image-191-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-191-768x332.png 768w" sizes="(max-width: 1193px) 100vw, 1193px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# sdb1을 quota로 사용 준비
tune2fs -O quota /dev/sdb1</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="845" height="219" src="https://lycos7560.com/wp-content/uploads/2024/12/image-192.png" alt="" class="wp-image-39122" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-192.png 845w, https://lycos7560.com/wp-content/uploads/2024/12/image-192-300x78.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-192-768x199.png 768w" sizes="(max-width: 845px) 100vw, 845px" /><figcaption class="wp-element-caption">마운트 전에 실행해야함</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="746" height="179" src="https://lycos7560.com/wp-content/uploads/2024/12/image-196.png" alt="" class="wp-image-39126" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-196.png 746w, https://lycos7560.com/wp-content/uploads/2024/12/image-196-300x72.png 300w" sizes="(max-width: 746px) 100vw, 746px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# 사용자 추가 karina, winter
adduser --home /userHome/karina karina
adduser --home /userHome/winter winter</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="864" height="965" src="https://lycos7560.com/wp-content/uploads/2024/12/image-193.png" alt="" class="wp-image-39123" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-193.png 864w, https://lycos7560.com/wp-content/uploads/2024/12/image-193-269x300.png 269w, https://lycos7560.com/wp-content/uploads/2024/12/image-193-768x858.png 768w" sizes="(max-width: 864px) 100vw, 864px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="628" height="193" src="https://lycos7560.com/wp-content/uploads/2024/12/image-194.png" alt="" class="wp-image-39124" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-194.png 628w, https://lycos7560.com/wp-content/uploads/2024/12/image-194-300x92.png 300w" sizes="(max-width: 628px) 100vw, 628px" /><figcaption class="wp-element-caption">개인 폴더가 생성됨</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
#  quota 패키지 설치
sudo apt update
sudo apt install quota
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="937" height="439" src="https://lycos7560.com/wp-content/uploads/2024/12/image-195.png" alt="" class="wp-image-39125" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-195.png 937w, https://lycos7560.com/wp-content/uploads/2024/12/image-195-300x141.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-195-768x360.png 768w" sizes="(max-width: 937px) 100vw, 937px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# quota 시작 
quotaon -va
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="874" height="184" src="https://lycos7560.com/wp-content/uploads/2024/12/image-197.png" alt="" class="wp-image-39127" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-197.png 874w, https://lycos7560.com/wp-content/uploads/2024/12/image-197-300x63.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-197-768x162.png 768w" sizes="(max-width: 874px) 100vw, 874px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# karina / soft 한도 40MB / Hard 한도 50MB 
edquota -u karina</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1202" height="326" src="https://lycos7560.com/wp-content/uploads/2024/12/image-198.png" alt="" class="wp-image-39128" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-198.png 1202w, https://lycos7560.com/wp-content/uploads/2024/12/image-198-300x81.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-198-768x208.png 768w" sizes="(max-width: 1202px) 100vw, 1202px" /><figcaption class="wp-element-caption">ctrl + x 로 저장</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# karina에서 확인
su - karina 

# 테스트용 더미 파일 생성
fallocate -l 10M /userHome/karina/dummyfile.txt</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="811" height="593" src="https://lycos7560.com/wp-content/uploads/2024/12/image-199.png" alt="" class="wp-image-39129" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-199.png 811w, https://lycos7560.com/wp-content/uploads/2024/12/image-199-300x219.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-199-768x562.png 768w" sizes="(max-width: 811px) 100vw, 811px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# quota 명령어로 확인 가능
quota
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1036" height="131" src="https://lycos7560.com/wp-content/uploads/2024/12/image-200.png" alt="" class="wp-image-39130" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-200.png 1036w, https://lycos7560.com/wp-content/uploads/2024/12/image-200-300x38.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-200-768x97.png 768w" sizes="(max-width: 1036px) 100vw, 1036px" /><figcaption class="wp-element-caption">약 6일 정도 후에 Soft로 인하여 손상될 수 있음</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# root
su root

# quota 확인
repquota /userHome/</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="609" height="269" src="https://lycos7560.com/wp-content/uploads/2024/12/image-201.png" alt="" class="wp-image-39131" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-201.png 609w, https://lycos7560.com/wp-content/uploads/2024/12/image-201-300x133.png 300w" sizes="(max-width: 609px) 100vw, 609px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># karina의 기준은 winter 에게 적용
edquota -p karina winter

# quota 확인
repquota /userHome/</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="866" height="546" src="https://lycos7560.com/wp-content/uploads/2024/12/image-202.png" alt="" class="wp-image-39132" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-202.png 866w, https://lycos7560.com/wp-content/uploads/2024/12/image-202-300x189.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-202-768x484.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></figure>
<p>The post <a href="https://lycos7560.com/ubuntu/quota-%ec%bf%bc%ed%84%b0/39116/">Quota (쿼터)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/quota-%ec%bf%bc%ed%84%b0/39116/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu &#8211; RAID 0, 1, 5 실습</title>
		<link>https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 05 Dec 2024 11:27:22 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Boot]]></category>
		<category><![CDATA[Data Integrity]]></category>
		<category><![CDATA[Data Protection]]></category>
		<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[Data Redundancy]]></category>
		<category><![CDATA[Disk]]></category>
		<category><![CDATA[Disk Failure]]></category>
		<category><![CDATA[File System]]></category>
		<category><![CDATA[Hardware RAID]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Linear RAID]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[Mirroring]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Parity]]></category>
		<category><![CDATA[Partition]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Performance Degradation]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[RAID 0]]></category>
		<category><![CDATA[RAID 1]]></category>
		<category><![CDATA[RAID 5]]></category>
		<category><![CDATA[RAID 6]]></category>
		<category><![CDATA[Read Speed]]></category>
		<category><![CDATA[Recovery Time]]></category>
		<category><![CDATA[Reliability]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Software RAID]]></category>
		<category><![CDATA[Space Efficiency]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[storage management]]></category>
		<category><![CDATA[Storage Space]]></category>
		<category><![CDATA[Striping]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[System Configuration]]></category>
		<category><![CDATA[Ubuntu - RAID]]></category>
		<category><![CDATA[Write Speed]]></category>
		<category><![CDATA[고가용성]]></category>
		<category><![CDATA[공간 효율성]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[데이터 무결성]]></category>
		<category><![CDATA[데이터 보호]]></category>
		<category><![CDATA[데이터 복구]]></category>
		<category><![CDATA[데이터 중복성]]></category>
		<category><![CDATA[디스크]]></category>
		<category><![CDATA[디스크 손상]]></category>
		<category><![CDATA[레이드]]></category>
		<category><![CDATA[레이드 0]]></category>
		<category><![CDATA[레이드 1]]></category>
		<category><![CDATA[레이드 5]]></category>
		<category><![CDATA[레이드 6]]></category>
		<category><![CDATA[미러링]]></category>
		<category><![CDATA[복구 시간]]></category>
		<category><![CDATA[부팅]]></category>
		<category><![CDATA[성능]]></category>
		<category><![CDATA[성능 저하]]></category>
		<category><![CDATA[소프트웨어 RAID]]></category>
		<category><![CDATA[스토리지]]></category>
		<category><![CDATA[스토리지 관리]]></category>
		<category><![CDATA[스트라이핑]]></category>
		<category><![CDATA[시스템 관리]]></category>
		<category><![CDATA[시스템 설정]]></category>
		<category><![CDATA[쓰기 속도]]></category>
		<category><![CDATA[안정성]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[운영 체제]]></category>
		<category><![CDATA[읽기 속도]]></category>
		<category><![CDATA[저장 공간]]></category>
		<category><![CDATA[파일 시스템]]></category>
		<category><![CDATA[파티션]]></category>
		<category><![CDATA[패리티]]></category>
		<category><![CDATA[하드웨어 RAID]]></category>
		<category><![CDATA[확장성]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38964</guid>

					<description><![CDATA[<p>1. 하드 7개 추가 2. RAID 0 구축 2. RAID 1 구축 3. RAID 5 구축 (3개) 4. RAID 0 1 5 장치 고장 내기 각 RAID의 장치 하나씩을 제거하여 고장과 같은 상황을 만듬 5. RAID 0 1 5 복구 제거한 하드 3개 추가</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/">Ubuntu &#8211; RAID 0, 1, 5 실습</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-b2b5ecf1      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-하드-7개-추가" class="uagb-toc-link__trigger">1. 하드 7개 추가</a><li class="uagb-toc__list"><a href="#2-raid-0-구축" class="uagb-toc-link__trigger">2. RAID 0 구축</a><li class="uagb-toc__list"><a href="#2-raid-1-구축" class="uagb-toc-link__trigger">2. RAID 1 구축</a><li class="uagb-toc__list"><a href="#3-raid-5-구축-3개" class="uagb-toc-link__trigger">3. RAID 5 구축 (3개)</a><li class="uagb-toc__list"><a href="#4-raid-0-1-5-장치-고장-내기" class="uagb-toc-link__trigger">4. RAID 0 1 5 장치 고장 내기</a><li class="uagb-toc__list"><a href="#5-raid-0-1-5-복구" class="uagb-toc-link__trigger">5. RAID 0 1 5 복구</a></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-embed is-type-wp-embed"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="3rFZaQu4Nv"><a href="https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/">Ubuntu &#8211; Hard disk management (Add Disk)</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Ubuntu &#8211; Hard disk management (Add Disk)&#8221; &#8212; 어제와 내일의 나 그 사이의 이야기" src="https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/embed/#?secret=tOdDx8CaMS#?secret=3rFZaQu4Nv" data-secret="3rFZaQu4Nv" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div><figcaption class="wp-element-caption">사전 작업이 필요함</figcaption></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">1. 하드 7개 추가</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="417" height="454" src="https://lycos7560.com/wp-content/uploads/2024/12/image-73.png" alt="" class="wp-image-38965" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-73.png 417w, https://lycos7560.com/wp-content/uploads/2024/12/image-73-276x300.png 276w" sizes="(max-width: 417px) 100vw, 417px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=stRWo6sPGyI&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=35">https://www.youtube.com/watch?v=stRWo6sPGyI&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=35</a></figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="754" height="728" src="https://lycos7560.com/wp-content/uploads/2024/12/image-74.png" alt="" class="wp-image-38966" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-74.png 754w, https://lycos7560.com/wp-content/uploads/2024/12/image-74-300x290.png 300w" sizes="(max-width: 754px) 100vw, 754px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="754" height="728" src="https://lycos7560.com/wp-content/uploads/2024/12/image-75.png" alt="" class="wp-image-38968" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-75.png 754w, https://lycos7560.com/wp-content/uploads/2024/12/image-75-300x290.png 300w" sizes="(max-width: 754px) 100vw, 754px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="757" height="731" src="https://lycos7560.com/wp-content/uploads/2024/12/image-76.png" alt="" class="wp-image-38969" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-76.png 757w, https://lycos7560.com/wp-content/uploads/2024/12/image-76-300x290.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="747" height="724" src="https://lycos7560.com/wp-content/uploads/2024/12/image-77.png" alt="" class="wp-image-38970" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-77.png 747w, https://lycos7560.com/wp-content/uploads/2024/12/image-77-300x291.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="757" height="731" src="https://lycos7560.com/wp-content/uploads/2024/12/image-78.png" alt="" class="wp-image-38971" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-78.png 757w, https://lycos7560.com/wp-content/uploads/2024/12/image-78-300x290.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="743" height="441" src="https://lycos7560.com/wp-content/uploads/2024/12/image-79.png" alt="" class="wp-image-38972" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-79.png 743w, https://lycos7560.com/wp-content/uploads/2024/12/image-79-300x178.png 300w" sizes="(max-width: 743px) 100vw, 743px" /><figcaption class="wp-element-caption">위의 과정을 반복</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="748" height="730" src="https://lycos7560.com/wp-content/uploads/2024/12/image-80.png" alt="" class="wp-image-38973" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-80.png 748w, https://lycos7560.com/wp-content/uploads/2024/12/image-80-300x293.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1265" height="261" src="https://lycos7560.com/wp-content/uploads/2024/12/image-81.png" alt="" class="wp-image-38974" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-81.png 1265w, https://lycos7560.com/wp-content/uploads/2024/12/image-81-300x62.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-81-768x158.png 768w" sizes="(max-width: 1265px) 100vw, 1265px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1199" height="672" src="https://lycos7560.com/wp-content/uploads/2024/12/image-82.png" alt="" class="wp-image-38975" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-82.png 1199w, https://lycos7560.com/wp-content/uploads/2024/12/image-82-300x168.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-82-768x430.png 768w" sizes="(max-width: 1199px) 100vw, 1199px" /><figcaption class="wp-element-caption">fdisk를 이용하여 파티셔닝 / RAID를 위해서 Linx -&gt; Linux raid auto 로 변경해야함</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="625" height="348" src="https://lycos7560.com/wp-content/uploads/2024/12/image-83.png" alt="" class="wp-image-38977" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-83.png 625w, https://lycos7560.com/wp-content/uploads/2024/12/image-83-300x167.png 300w" sizes="(max-width: 625px) 100vw, 625px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1207" height="744" src="https://lycos7560.com/wp-content/uploads/2024/12/image-84.png" alt="" class="wp-image-38978" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-84.png 1207w, https://lycos7560.com/wp-content/uploads/2024/12/image-84-300x185.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-84-768x473.png 768w" sizes="(max-width: 1207px) 100vw, 1207px" /><figcaption class="wp-element-caption">m을 이용하여 도움말 확인 t를 이용하여 파티션 타입 변경</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1176" height="756" src="https://lycos7560.com/wp-content/uploads/2024/12/image-85.png" alt="" class="wp-image-38979" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-85.png 1176w, https://lycos7560.com/wp-content/uploads/2024/12/image-85-300x193.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-85-768x494.png 768w" sizes="(max-width: 1176px) 100vw, 1176px" /><figcaption class="wp-element-caption">fd : Linux raid auto</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1253" height="488" src="https://lycos7560.com/wp-content/uploads/2024/12/image-86.png" alt="" class="wp-image-38980" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-86.png 1253w, https://lycos7560.com/wp-content/uploads/2024/12/image-86-300x117.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-86-768x299.png 768w" sizes="(max-width: 1253px) 100vw, 1253px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="744" height="243" src="https://lycos7560.com/wp-content/uploads/2024/12/image-87.png" alt="" class="wp-image-38981" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-87.png 744w, https://lycos7560.com/wp-content/uploads/2024/12/image-87-300x98.png 300w" sizes="(max-width: 744px) 100vw, 744px" /><figcaption class="wp-element-caption">w: write로 저장</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1275" height="252" src="https://lycos7560.com/wp-content/uploads/2024/12/image-88.png" alt="" class="wp-image-38982" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-88.png 1275w, https://lycos7560.com/wp-content/uploads/2024/12/image-88-300x59.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-88-768x152.png 768w" sizes="(max-width: 1275px) 100vw, 1275px" /><figcaption class="wp-element-caption">위의 과정을 반복</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># RAID 패키지
sudo apt update
sudo apt -y install mdadm
</pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2. RAID 0 구축</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="618" height="321" src="https://lycos7560.com/wp-content/uploads/2024/12/image-89.png" alt="" class="wp-image-38983" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-89.png 618w, https://lycos7560.com/wp-content/uploads/2024/12/image-89-300x156.png 300w" sizes="(max-width: 618px) 100vw, 618px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=k50nGEIKL2g&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=36" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=k50nGEIKL2g&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=36</a></figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1213" height="655" src="https://lycos7560.com/wp-content/uploads/2024/12/image-90.png" alt="" class="wp-image-38984" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-90.png 1213w, https://lycos7560.com/wp-content/uploads/2024/12/image-90-300x162.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-90-768x415.png 768w" sizes="(max-width: 1213px) 100vw, 1213px" /><figcaption class="wp-element-caption">fdisk로 확인</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdb1 /dev/sdc1

# mdadm: 리눅스에서 소프트웨어 RAID를 관리하기 위한 유틸리티
# --create: 새로운 RAID 배열을 생성하기 위한 옵션
# /dev/md0: 생성할 RAID 배열의 장치 이름
# --level=0: RAID 레벨을 지정, 여기서는 RAID 0(스트라이핑) 레벨을 사용
# --raid-devices=2: RAID 배열에 사용할 디스크 장치의 수를 지정, 여기서는 2개의 디스크를 사용
# /dev/sdb1 /dev/sdc1: RAID 배열에 포함될 디스크 파티션, 여기서는 /dev/sdb1과 /dev/sdc1 두 개의 파티션을 사용</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1208" height="196" src="https://lycos7560.com/wp-content/uploads/2024/12/image-91.png" alt="" class="wp-image-38985" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-91.png 1208w, https://lycos7560.com/wp-content/uploads/2024/12/image-91-300x49.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-91-768x125.png 768w" sizes="(max-width: 1208px) 100vw, 1208px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 모든 RAID 배열에 대한 상세 정보를 출력
sudo mdadm --detail --scan</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1224" height="218" src="https://lycos7560.com/wp-content/uploads/2024/12/image-92.png" alt="" class="wp-image-38986" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-92.png 1224w, https://lycos7560.com/wp-content/uploads/2024/12/image-92-300x53.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-92-768x137.png 768w" sizes="(max-width: 1224px) 100vw, 1224px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># /dev/md0 장치에 ext4 파일 시스템을 생성
# RAID 배열을 생성한 후, 파일 시스템을 초기화하여 사용할 수 있게 하는 중요한 단계
mkfs.ext4 /dev/md0
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1155" height="388" src="https://lycos7560.com/wp-content/uploads/2024/12/image-93.png" alt="" class="wp-image-38987" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-93.png 1155w, https://lycos7560.com/wp-content/uploads/2024/12/image-93-300x101.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-93-768x258.png 768w" sizes="(max-width: 1155px) 100vw, 1155px" /><figcaption class="wp-element-caption">mkfs.ext4 /dev/md0 </figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1091" height="303" src="https://lycos7560.com/wp-content/uploads/2024/12/image-94.png" alt="" class="wp-image-38988" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-94.png 1091w, https://lycos7560.com/wp-content/uploads/2024/12/image-94-300x83.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-94-768x213.png 768w" sizes="(max-width: 1091px) 100vw, 1091px" /><figcaption class="wp-element-caption">/raid0 위치로 mount</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1225" height="421" src="https://lycos7560.com/wp-content/uploads/2024/12/image-95.png" alt="" class="wp-image-38989" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-95.png 1225w, https://lycos7560.com/wp-content/uploads/2024/12/image-95-300x103.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-95-768x264.png 768w" sizes="(max-width: 1225px) 100vw, 1225px" /><figcaption class="wp-element-caption">/etc/fstab에 등록</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">/dev/md0 /raid0 ext4 defaults 0 0</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># mdadm.conf 등록
sudo mdadm --detail --scan /dev/md0 >> /etc/mdadm/mdadm.conf

# 업데이트
sudo update-initramfs -u</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1075" height="597" src="https://lycos7560.com/wp-content/uploads/2024/12/image-98.png" alt="" class="wp-image-38992" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-98.png 1075w, https://lycos7560.com/wp-content/uploads/2024/12/image-98-300x167.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-98-768x427.png 768w" sizes="(max-width: 1075px) 100vw, 1075px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">systemctl daemon-reload</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="936" height="57" src="https://lycos7560.com/wp-content/uploads/2024/12/image-96.png" alt="" class="wp-image-38990" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-96.png 936w, https://lycos7560.com/wp-content/uploads/2024/12/image-96-300x18.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-96-768x47.png 768w" sizes="(max-width: 936px) 100vw, 936px" /><figcaption class="wp-element-caption">등록 후 데몬 재시작</figcaption></figure>



<p></p>



<figure class="wp-block-image"><img decoding="async" width="1157" height="750" src="https://lycos7560.com/wp-content/uploads/2024/12/image-97.png" alt="" class="wp-image-38991" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-97.png 1157w, https://lycos7560.com/wp-content/uploads/2024/12/image-97-300x194.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-97-768x498.png 768w" sizes="(max-width: 1157px) 100vw, 1157px" /><figcaption class="wp-element-caption">mdadm &#8211;detail /dev/md0 를 이용하여 정보 확인</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="629" height="628" src="https://lycos7560.com/wp-content/uploads/2024/12/image-99.png" alt="" class="wp-image-38993" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-99.png 629w, https://lycos7560.com/wp-content/uploads/2024/12/image-99-300x300.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-99-150x150.png 150w" sizes="(max-width: 629px) 100vw, 629px" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">2. RAID 1 구축</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># RAID Disk 정보 확인
fdisk -l /dev/sdd
fdisk -l /dev/sde
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1189" height="535" src="https://lycos7560.com/wp-content/uploads/2024/12/image-100.png" alt="" class="wp-image-38994" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-100.png 1189w, https://lycos7560.com/wp-content/uploads/2024/12/image-100-300x135.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-100-768x346.png 768w" sizes="(max-width: 1189px) 100vw, 1189px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdd1 /dev/sde1

# mdadm: 리눅스에서 소프트웨어 RAID를 관리하기 위한 유틸리티
# --create: 새로운 RAID 배열을 생성하기 위한 옵션
# /dev/md1: 생성할 RAID 배열의 장치 이름
# --level=1: RAID 레벨을 지정, 여기서는 RAID 1 레벨을 사용
# --raid-devices=2: RAID 배열에 사용할 디스크 장치의 수를 지정, 여기서는 2개의 디스크를 사용
# /dev/sdd1 /dev/sde1: RAID 배열에 포함될 디스크 파티션, 여기서는 /dev/sdd1과 /dev/sde1 두 개의 파티션을 사용</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="926" height="209" src="https://lycos7560.com/wp-content/uploads/2024/12/image-101.png" alt="" class="wp-image-38995" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-101.png 926w, https://lycos7560.com/wp-content/uploads/2024/12/image-101-300x68.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-101-768x173.png 768w" sizes="(max-width: 926px) 100vw, 926px" /><figcaption class="wp-element-caption">부팅장치로 사용이 불가능하다는 의미 y로 넘어가자</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Raid 정보 확인
mdadm --detail /dev/md1</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="947" height="638" src="https://lycos7560.com/wp-content/uploads/2024/12/image-102.png" alt="" class="wp-image-38996" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-102.png 947w, https://lycos7560.com/wp-content/uploads/2024/12/image-102-300x202.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-102-768x517.png 768w" sizes="(max-width: 947px) 100vw, 947px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 마운트할 폴더 생성
sudo mkdir /raid1

# mdadm.conf 등록
sudo mdadm --detail --scan /dev/md1 >> /etc/mdadm/mdadm.conf

# 업데이트
sudo update-initramfs -u

#등록 확인 
cat /etc/mdadm/mdadm.conf</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="700" height="555" src="https://lycos7560.com/wp-content/uploads/2024/12/image-103.png" alt="" class="wp-image-38997" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-103.png 700w, https://lycos7560.com/wp-content/uploads/2024/12/image-103-300x238.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># /dev/md1 장치에 ext4 파일 시스템을 생성
# RAID 배열을 생성한 후, 파일 시스템을 초기화하여 사용할 수 있게 하는 중요한 단계
mkfs.ext4 /dev/md1
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="727" height="278" src="https://lycos7560.com/wp-content/uploads/2024/12/image-104.png" alt="" class="wp-image-38998" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-104.png 727w, https://lycos7560.com/wp-content/uploads/2024/12/image-104-300x115.png 300w" sizes="(max-width: 727px) 100vw, 727px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># raid1 으로 mount
mount /dev/md1 /raid1

#마운트 확인
df</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1183" height="224" src="https://lycos7560.com/wp-content/uploads/2024/12/image-105.png" alt="" class="wp-image-38999" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-105.png 1183w, https://lycos7560.com/wp-content/uploads/2024/12/image-105-300x57.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-105-768x145.png 768w" sizes="(max-width: 1183px) 100vw, 1183px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># /etc/fstab 에 등록 (부팅 시 마운트)
echo '/dev/md1 /raid1 ext4 defaults 0 0' | sudo tee -a /etc/fstab

# 등록 확인
cat /etc/fstab

#데몬 재시작
systemctl daemon-reload</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1169" height="378" src="https://lycos7560.com/wp-content/uploads/2024/12/image-106.png" alt="" class="wp-image-39001" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-106.png 1169w, https://lycos7560.com/wp-content/uploads/2024/12/image-106-300x97.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-106-768x248.png 768w" sizes="(max-width: 1169px) 100vw, 1169px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="532" height="213" src="https://lycos7560.com/wp-content/uploads/2024/12/image-107.png" alt="" class="wp-image-39002" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-107.png 532w, https://lycos7560.com/wp-content/uploads/2024/12/image-107-300x120.png 300w" sizes="(max-width: 532px) 100vw, 532px" /><figcaption class="wp-element-caption">재부팅 후 확인</figcaption></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">3. RAID 5 구축 (3개)</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="475" height="327" src="https://lycos7560.com/wp-content/uploads/2024/12/image-110.png" alt="" class="wp-image-39005" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-110.png 475w, https://lycos7560.com/wp-content/uploads/2024/12/image-110-300x207.png 300w" sizes="(max-width: 475px) 100vw, 475px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=k50nGEIKL2g&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=36" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=k50nGEIKL2g&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=36</a></figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># RAID Disk 정보 확인
fdisk -l /dev/sdf
fdisk -l /dev/sdg
fdisk -l /dev/sdh
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1015" height="406" src="https://lycos7560.com/wp-content/uploads/2024/12/image-108.png" alt="" class="wp-image-39003" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-108.png 1015w, https://lycos7560.com/wp-content/uploads/2024/12/image-108-300x120.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-108-768x307.png 768w" sizes="(max-width: 1015px) 100vw, 1015px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="573" height="183" src="https://lycos7560.com/wp-content/uploads/2024/12/image-109.png" alt="" class="wp-image-39004" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-109.png 573w, https://lycos7560.com/wp-content/uploads/2024/12/image-109-300x96.png 300w" sizes="(max-width: 573px) 100vw, 573px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sdf1 /dev/sdg1 /dev/sdh1</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="926" height="113" src="https://lycos7560.com/wp-content/uploads/2024/12/image-111.png" alt="" class="wp-image-39006" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-111.png 926w, https://lycos7560.com/wp-content/uploads/2024/12/image-111-300x37.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-111-768x94.png 768w" sizes="(max-width: 926px) 100vw, 926px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mdadm --detail /dev/md5
</pre>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="666" height="575" src="https://lycos7560.com/wp-content/uploads/2024/12/image-112.png" alt="" class="wp-image-39007" style="width:666px;height:auto" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-112.png 666w, https://lycos7560.com/wp-content/uploads/2024/12/image-112-300x259.png 300w" sizes="(max-width: 666px) 100vw, 666px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mkfs.ext4 /dev/md5
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="497" height="245" src="https://lycos7560.com/wp-content/uploads/2024/12/image-113.png" alt="" class="wp-image-39009" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-113.png 497w, https://lycos7560.com/wp-content/uploads/2024/12/image-113-300x148.png 300w" sizes="(max-width: 497px) 100vw, 497px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo mkdir /raid5

sudo mdadm --detail --scan /dev/md5 >> /etc/mdadm/mdadm.conf

sudo update-initramfs -u

cat /etc/mdadm/mdadm.conf
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1130" height="557" src="https://lycos7560.com/wp-content/uploads/2024/12/image-114.png" alt="" class="wp-image-39010" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-114.png 1130w, https://lycos7560.com/wp-content/uploads/2024/12/image-114-300x148.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-114-768x379.png 768w" sizes="(max-width: 1130px) 100vw, 1130px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mount /dev/md5 /raid5
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="313" height="60" src="https://lycos7560.com/wp-content/uploads/2024/12/image-115.png" alt="" class="wp-image-39011" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-115.png 313w, https://lycos7560.com/wp-content/uploads/2024/12/image-115-300x58.png 300w" sizes="(max-width: 313px) 100vw, 313px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">df
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="620" height="218" src="https://lycos7560.com/wp-content/uploads/2024/12/image-116.png" alt="" class="wp-image-39012" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-116.png 620w, https://lycos7560.com/wp-content/uploads/2024/12/image-116-300x105.png 300w" sizes="(max-width: 620px) 100vw, 620px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">echo '/dev/md5 /raid5 ext4 defaults 0 0' | sudo tee -a /etc/fstab

cat /etc/fstab

systemctl daemon-reload
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="846" height="339" src="https://lycos7560.com/wp-content/uploads/2024/12/image-117.png" alt="" class="wp-image-39013" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-117.png 846w, https://lycos7560.com/wp-content/uploads/2024/12/image-117-300x120.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-117-768x308.png 768w" sizes="(max-width: 846px) 100vw, 846px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="795" height="290" src="https://lycos7560.com/wp-content/uploads/2024/12/image-118.png" alt="" class="wp-image-39014" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-118.png 795w, https://lycos7560.com/wp-content/uploads/2024/12/image-118-300x109.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-118-768x280.png 768w" sizes="(max-width: 795px) 100vw, 795px" /><figcaption class="wp-element-caption">재부팅 후 확인</figcaption></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">4. RAID 0 1 5 장치 고장 내기</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="863" height="525" src="https://lycos7560.com/wp-content/uploads/2024/12/image-119.png" alt="" class="wp-image-39019" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-119.png 863w, https://lycos7560.com/wp-content/uploads/2024/12/image-119-300x183.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-119-768x467.png 768w" sizes="(max-width: 863px) 100vw, 863px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 각 폴더에 더미파일 생성
fallocate -l 100M /raid0/dummy_file.img
fallocate -l 100M /raid1/dummy_file.img
fallocate -l 100M /raid5/dummy_file.img
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1072" height="257" src="https://lycos7560.com/wp-content/uploads/2024/12/image-122.png" alt="" class="wp-image-39022" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-122.png 1072w, https://lycos7560.com/wp-content/uploads/2024/12/image-122-300x72.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-122-768x184.png 768w" sizes="(max-width: 1072px) 100vw, 1072px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>각 RAID의 장치 하나씩을 제거하여 고장과 같은 상황을 만듬</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1044" height="720" src="https://lycos7560.com/wp-content/uploads/2024/12/image-120.png" alt="" class="wp-image-39020" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-120.png 1044w, https://lycos7560.com/wp-content/uploads/2024/12/image-120-300x207.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-120-768x530.png 768w" sizes="(max-width: 1044px) 100vw, 1044px" /><figcaption class="wp-element-caption">하드디스크를 제거</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1002" height="170" src="https://lycos7560.com/wp-content/uploads/2024/12/image-121.png" alt="" class="wp-image-39021" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-121.png 1002w, https://lycos7560.com/wp-content/uploads/2024/12/image-121-300x51.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-121-768x130.png 768w" sizes="(max-width: 1002px) 100vw, 1002px" /><figcaption class="wp-element-caption">ctrl + D로 넘어가기 </figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="678" height="219" src="https://lycos7560.com/wp-content/uploads/2024/12/image-123.png" alt="" class="wp-image-39023" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-123.png 678w, https://lycos7560.com/wp-content/uploads/2024/12/image-123-300x97.png 300w" sizes="(max-width: 678px) 100vw, 678px" /><figcaption class="wp-element-caption">ctrl + D로 넘어가기 </figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="736" height="210" src="https://lycos7560.com/wp-content/uploads/2024/12/image-124.png" alt="" class="wp-image-39024" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-124.png 736w, https://lycos7560.com/wp-content/uploads/2024/12/image-124-300x86.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# 확인
mdadm --detail /dev/md0
mdadm --detail /dev/md1
mdadm --detail /dev/md5
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1172" height="688" src="https://lycos7560.com/wp-content/uploads/2024/12/image-125.png" alt="" class="wp-image-39025" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-125.png 1172w, https://lycos7560.com/wp-content/uploads/2024/12/image-125-300x176.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-125-768x451.png 768w" sizes="(max-width: 1172px) 100vw, 1172px" /><figcaption class="wp-element-caption">RAID가 비활성화 되어있음</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1149" height="402" src="https://lycos7560.com/wp-content/uploads/2024/12/image-126.png" alt="" class="wp-image-39026" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-126.png 1149w, https://lycos7560.com/wp-content/uploads/2024/12/image-126-300x105.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-126-768x269.png 768w" sizes="(max-width: 1149px) 100vw, 1149px" /><figcaption class="wp-element-caption">RAID가 비활성화 되어있음</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
#장치 확인
ls -l /dev/sd*

df
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="951" height="336" src="https://lycos7560.com/wp-content/uploads/2024/12/image-127.png" alt="" class="wp-image-39027" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-127.png 951w, https://lycos7560.com/wp-content/uploads/2024/12/image-127-300x106.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-127-768x271.png 768w" sizes="(max-width: 951px) 100vw, 951px" /><figcaption class="wp-element-caption">새로 이름이 부여가 된 것을 확인 할 수 있다.</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="543" height="174" src="https://lycos7560.com/wp-content/uploads/2024/12/image-128.png" alt="" class="wp-image-39028" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-128.png 543w, https://lycos7560.com/wp-content/uploads/2024/12/image-128-300x96.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
RAID 확
mdadm --detail --scan
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="940" height="188" src="https://lycos7560.com/wp-content/uploads/2024/12/image-129.png" alt="" class="wp-image-39029" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-129.png 940w, https://lycos7560.com/wp-content/uploads/2024/12/image-129-300x60.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-129-768x154.png 768w" sizes="(max-width: 940px) 100vw, 940px" /><figcaption class="wp-element-caption">전부 비활성화 되어있음</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#시작 
mdadm --run /dev/md0
mdadm --run /dev/md1
mdadm --run /dev/md5

mdadm --detail --scan</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="761" height="169" src="https://lycos7560.com/wp-content/uploads/2024/12/image-131.png" alt="" class="wp-image-39031" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-131.png 761w, https://lycos7560.com/wp-content/uploads/2024/12/image-131-300x67.png 300w" sizes="(max-width: 761px) 100vw, 761px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="952" height="220" src="https://lycos7560.com/wp-content/uploads/2024/12/image-130.png" alt="" class="wp-image-39030" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-130.png 952w, https://lycos7560.com/wp-content/uploads/2024/12/image-130-300x69.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-130-768x177.png 768w" sizes="(max-width: 952px) 100vw, 952px" /><figcaption class="wp-element-caption">RAID 0은 작동 X</figcaption></figure>



<figure class="wp-block-image"><img decoding="async" width="431" height="91" src="https://lycos7560.com/wp-content/uploads/2024/12/image-132.png" alt="" class="wp-image-39032" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-132.png 431w, https://lycos7560.com/wp-content/uploads/2024/12/image-132-300x63.png 300w" sizes="(max-width: 431px) 100vw, 431px" /><figcaption class="wp-element-caption">다시 mount</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="541" height="183" src="https://lycos7560.com/wp-content/uploads/2024/12/image-133.png" alt="" class="wp-image-39033" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-133.png 541w, https://lycos7560.com/wp-content/uploads/2024/12/image-133-300x101.png 300w" sizes="(max-width: 541px) 100vw, 541px" /><figcaption class="wp-element-caption">파일은 살아있</figcaption></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 변경 후
gedit /etc/fstab

# 데몬 재시작
systemctl daeon-reload</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1183" height="687" src="https://lycos7560.com/wp-content/uploads/2024/12/image-134.png" alt="" class="wp-image-39034" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-134.png 1183w, https://lycos7560.com/wp-content/uploads/2024/12/image-134-300x174.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-134-768x446.png 768w" sizes="(max-width: 1183px) 100vw, 1183px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="403" height="110" src="https://lycos7560.com/wp-content/uploads/2024/12/image-135.png" alt="" class="wp-image-39035" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-135.png 403w, https://lycos7560.com/wp-content/uploads/2024/12/image-135-300x82.png 300w" sizes="(max-width: 403px) 100vw, 403px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# 수정
sudo gedit /etc/mdadm/mdadm.conf

sudo update-initramfs -u
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="931" height="672" src="https://lycos7560.com/wp-content/uploads/2024/12/image-136.png" alt="" class="wp-image-39036" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-136.png 931w, https://lycos7560.com/wp-content/uploads/2024/12/image-136-300x217.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-136-768x554.png 768w" sizes="(max-width: 931px) 100vw, 931px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mdadm --detail /dev/md1
mdadm --detail /dev/md5</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1146" height="650" src="https://lycos7560.com/wp-content/uploads/2024/12/image-137.png" alt="" class="wp-image-39037" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-137.png 1146w, https://lycos7560.com/wp-content/uploads/2024/12/image-137-300x170.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-137-768x436.png 768w" sizes="(max-width: 1146px) 100vw, 1146px" /><figcaption class="wp-element-caption">mdadm &#8211;detail /dev/md1</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1135" height="727" src="https://lycos7560.com/wp-content/uploads/2024/12/image-138.png" alt="" class="wp-image-39038" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-138.png 1135w, https://lycos7560.com/wp-content/uploads/2024/12/image-138-300x192.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-138-768x492.png 768w" sizes="(max-width: 1135px) 100vw, 1135px" /><figcaption class="wp-element-caption">mdadm &#8211;detail /dev/md5</figcaption></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">5. RAID 0 1 5 복구</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="512" height="516" src="https://lycos7560.com/wp-content/uploads/2024/12/image-139.png" alt="" class="wp-image-39039" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-139.png 512w, https://lycos7560.com/wp-content/uploads/2024/12/image-139-298x300.png 298w, https://lycos7560.com/wp-content/uploads/2024/12/image-139-150x150.png 150w" sizes="(max-width: 512px) 100vw, 512px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=QnyVr_peYx8&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=38" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=QnyVr_peYx8&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=38</a></figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>제거한 하드 3개 추가</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1050" height="771" src="https://lycos7560.com/wp-content/uploads/2024/12/image-140.png" alt="" class="wp-image-39040" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-140.png 1050w, https://lycos7560.com/wp-content/uploads/2024/12/image-140-300x220.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-140-768x564.png 768w" sizes="(max-width: 1050px) 100vw, 1050px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="893" height="779" src="https://lycos7560.com/wp-content/uploads/2024/12/image-141.png" alt="" class="wp-image-39041" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-141.png 893w, https://lycos7560.com/wp-content/uploads/2024/12/image-141-300x262.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-141-768x670.png 768w" sizes="(max-width: 893px) 100vw, 893px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1050" height="804" src="https://lycos7560.com/wp-content/uploads/2024/12/image-142.png" alt="" class="wp-image-39042" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-142.png 1050w, https://lycos7560.com/wp-content/uploads/2024/12/image-142-300x230.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-142-768x588.png 768w" sizes="(max-width: 1050px) 100vw, 1050px" /><figcaption class="wp-element-caption">SCSI 확인 후 2개 더 추가 생성</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1376" height="701" src="https://lycos7560.com/wp-content/uploads/2024/12/image-143.png" alt="" class="wp-image-39043" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-143.png 1376w, https://lycos7560.com/wp-content/uploads/2024/12/image-143-300x153.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-143-768x391.png 768w" sizes="(max-width: 1376px) 100vw, 1376px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 추가된 목록 확인
ls -l /dev/sd*</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="806" height="473" src="https://lycos7560.com/wp-content/uploads/2024/12/image-144.png" alt="" class="wp-image-39044" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-144.png 806w, https://lycos7560.com/wp-content/uploads/2024/12/image-144-300x176.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-144-768x451.png 768w" sizes="(max-width: 806px) 100vw, 806px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 새로운 파티션 생성 (리눅스 오토 fd)
fdisk /dev/sdc
fdisk /dev/sde
fdisk /dev/sdg</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1177" height="729" src="https://lycos7560.com/wp-content/uploads/2024/12/image-145.png" alt="" class="wp-image-39045" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-145.png 1177w, https://lycos7560.com/wp-content/uploads/2024/12/image-145-300x186.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-145-768x476.png 768w" sizes="(max-width: 1177px) 100vw, 1177px" /><figcaption class="wp-element-caption">나머지 2개도 반복</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="736" height="458" src="https://lycos7560.com/wp-content/uploads/2024/12/image-147.png" alt="" class="wp-image-39048" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-147.png 736w, https://lycos7560.com/wp-content/uploads/2024/12/image-147-300x187.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# ext4 파일 시스템 생성
mkfs.ext4 /dev/sdc1
mkfs.ext4 /dev/sde1
mkfs.ext4 /dev/sdg1
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1122" height="742" src="https://lycos7560.com/wp-content/uploads/2024/12/image-146.png" alt="" class="wp-image-39047" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-146.png 1122w, https://lycos7560.com/wp-content/uploads/2024/12/image-146-300x198.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-146-768x508.png 768w" sizes="(max-width: 1122px) 100vw, 1122px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">- RAID 0 재생성 -

# 확인
mdadm --detail --scan

# 상세확인 (Raid 0이 md127로 변경됨)
mdadm --detail /dev/md127

# RAID 중지
mdadm --stop /dev/md127

# RAID 재생성
mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdb1 /dev/sdc1</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1064" height="680" src="https://lycos7560.com/wp-content/uploads/2024/12/image-148.png" alt="" class="wp-image-39049" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-148.png 1064w, https://lycos7560.com/wp-content/uploads/2024/12/image-148-300x192.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-148-768x491.png 768w" sizes="(max-width: 1064px) 100vw, 1064px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># UUID 수정
sudo gedit /etc/mdadm/mdadm.conf

sudo update-initramfs -u

sudo mount /dev/md0 /raid0

gedit /etc/fstab

systemctl daeon-reload</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1183" height="655" src="https://lycos7560.com/wp-content/uploads/2024/12/image-149.png" alt="" class="wp-image-39061" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-149.png 1183w, https://lycos7560.com/wp-content/uploads/2024/12/image-149-300x166.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-149-768x425.png 768w" sizes="(max-width: 1183px) 100vw, 1183px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1187" height="168" src="https://lycos7560.com/wp-content/uploads/2024/12/image-150.png" alt="" class="wp-image-39051" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-150.png 1187w, https://lycos7560.com/wp-content/uploads/2024/12/image-150-300x42.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-150-768x109.png 768w" sizes="(max-width: 1187px) 100vw, 1187px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="950" height="568" src="https://lycos7560.com/wp-content/uploads/2024/12/image-151.png" alt="" class="wp-image-39052" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-151.png 950w, https://lycos7560.com/wp-content/uploads/2024/12/image-151-300x179.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-151-768x459.png 768w" sizes="(max-width: 950px) 100vw, 950px" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">- RAID 1 은 재생성이 아닌 추가 -

# 상세 확인
mdadm --detail /dev/md1
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="825" height="653" src="https://lycos7560.com/wp-content/uploads/2024/12/image-152.png" alt="" class="wp-image-39053" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-152.png 825w, https://lycos7560.com/wp-content/uploads/2024/12/image-152-300x237.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-152-768x608.png 768w" sizes="(max-width: 825px) 100vw, 825px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
# Raid에 추가
mdadm /dev/md1 --add /dev/sde1

# Raid 확인
mdadm --detail /dev/md1

# 파일 확인
ls -l /raid1</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1022" height="689" src="https://lycos7560.com/wp-content/uploads/2024/12/image-153.png" alt="" class="wp-image-39054" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-153.png 1022w, https://lycos7560.com/wp-content/uploads/2024/12/image-153-300x202.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-153-768x518.png 768w" sizes="(max-width: 1022px) 100vw, 1022px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="856" height="176" src="https://lycos7560.com/wp-content/uploads/2024/12/image-154.png" alt="" class="wp-image-39055" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-154.png 856w, https://lycos7560.com/wp-content/uploads/2024/12/image-154-300x62.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-154-768x158.png 768w" sizes="(max-width: 856px) 100vw, 856px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">- RAID 5 는 재생성이 아닌 추가 -

# 상세 확인
mdadm --detail /dev/md5
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1119" height="716" src="https://lycos7560.com/wp-content/uploads/2024/12/image-155.png" alt="" class="wp-image-39056" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-155.png 1119w, https://lycos7560.com/wp-content/uploads/2024/12/image-155-300x192.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-155-768x491.png 768w" sizes="(max-width: 1119px) 100vw, 1119px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Raid에 추가
mdadm /dev/md5 --add /dev/sdg1

# Raid 확인
mdadm --detail /dev/md5

# 파일 확인
ls -l /raid5</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1177" height="692" src="https://lycos7560.com/wp-content/uploads/2024/12/image-156.png" alt="" class="wp-image-39057" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-156.png 1177w, https://lycos7560.com/wp-content/uploads/2024/12/image-156-300x176.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-156-768x452.png 768w" sizes="(max-width: 1177px) 100vw, 1177px" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="784" height="174" src="https://lycos7560.com/wp-content/uploads/2024/12/image-157.png" alt="" class="wp-image-39058" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-157.png 784w, https://lycos7560.com/wp-content/uploads/2024/12/image-157-300x67.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-157-768x170.png 768w" sizes="(max-width: 784px) 100vw, 784px" /></figure>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Raid 전부 확인
mdadm --detail --scan</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="674" height="120" src="https://lycos7560.com/wp-content/uploads/2024/12/image-158.png" alt="" class="wp-image-39059" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-158.png 674w, https://lycos7560.com/wp-content/uploads/2024/12/image-158-300x53.png 300w" sizes="(max-width: 674px) 100vw, 674px" /></figure>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/">Ubuntu &#8211; RAID 0, 1, 5 실습</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
