<?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>우분투 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/%ec%9a%b0%eb%b6%84%ed%88%ac/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Mon, 26 Jan 2026 07:08:58 +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>우분투 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MySQL 사용자 관리 명령어 (Ubuntu)</title>
		<link>https://lycos7560.com/ubuntu/mysql-%ec%82%ac%ec%9a%a9%ec%9e%90-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40258/</link>
					<comments>https://lycos7560.com/ubuntu/mysql-%ec%82%ac%ec%9a%a9%ec%9e%90-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40258/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Mon, 26 Jan 2026 07:08:55 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[127.0.0.1]]></category>
		<category><![CDATA[alter_user]]></category>
		<category><![CDATA[bind-address]]></category>
		<category><![CDATA[create_user]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[drop_user]]></category>
		<category><![CDATA[flush_privileges]]></category>
		<category><![CDATA[grant명령어]]></category>
		<category><![CDATA[IP주소]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql_secure_installation]]></category>
		<category><![CDATA[mysql_upgrade]]></category>
		<category><![CDATA[mysql.user]]></category>
		<category><![CDATA[mysqld_safe]]></category>
		<category><![CDATA[mysqld.cnf]]></category>
		<category><![CDATA[RBAC]]></category>
		<category><![CDATA[revoke명령어]]></category>
		<category><![CDATA[root계정]]></category>
		<category><![CDATA[set_password]]></category>
		<category><![CDATA[show_grants]]></category>
		<category><![CDATA[skip-grant-tables]]></category>
		<category><![CDATA[SQL인젝션방지]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[tail명령어]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[with_grant_option]]></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>
		<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=40258</guid>

					<description><![CDATA[<p>MySQL 서비스 상태 확인 및 관리 MySQL 접속 로컬 접속 원격 접속 사용자 계정 관리 사용자 생성 사용자 목록 조회 사용자 삭제 계정 잠금/해제 웹 애플리케이션용 사용자 생성 읽기 전용 사용자 생성 백업 전용 사용자 생성 비밀번호 관리 비밀번호 변경 root 비밀번호 초기화 권한 관리 권한 부여 권한 조회 권한 제거 권한 적용 주요 권한 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%82%ac%ec%9a%a9%ec%9e%90-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40258/">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-06e23be1      "
					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><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></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 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><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="#root-비밀번호-초기화" class="uagb-toc-link__trigger">root 비밀번호 초기화</a></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 class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주요-권한-종류" class="uagb-toc-link__trigger">주요 권한 종류</a></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">MySQL 서비스 상태 확인 및 관리</h2>



<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 mysql

# MySQL 서비스 시작
sudo systemctl start mysql

# MySQL 서비스 중지
sudo systemctl stop mysql

# MySQL 서비스 재시작
sudo systemctl restart mysql

# 부팅 시 자동 시작 설정
sudo systemctl enable mysql

# 자동 시작 해제
sudo systemctl disable mysql</pre>



<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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># root 사용자로 접속
sudo mysql -u root -p

# 특정 사용자로 접속
mysql -u username -p

# 데이터베이스 지정하여 접속
mysql -u username -p database_name</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 원격 서버 접속
mysql -h hostname_or_ip -u username -p

# 포트 지정 접속
mysql -h hostname_or_ip -P 3306 -u username -p</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="">-- 로컬 접속만 허용하는 사용자 생성
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

-- 특정 IP에서만 접속 허용
CREATE USER 'username'@'192.168.1.100' IDENTIFIED BY 'password';

-- 특정 도메인에서만 접속 허용
CREATE USER 'username'@'%.example.com' IDENTIFIED BY 'password';

-- 모든 호스트에서 접속 허용 (보안상 주의)
CREATE USER 'username'@'%' IDENTIFIED BY 'password';

-- 패스워드 없는 사용자 생성
CREATE USER 'username'@'localhost';</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 모든 사용자 조회
SELECT user, host FROM mysql.user;

-- 특정 사용자 조회
SELECT user, host FROM mysql.user WHERE user = 'username';

-- 현재 접속 중인 사용자 확인
SELECT USER();
SELECT CURRENT_USER();

-- 사용자의 권한 정보와 함께 조회
SELECT user, host, password_expired, account_locked FROM mysql.user;</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 사용자 삭제
DROP USER 'username'@'host';

-- 여러 사용자 동시 삭제
DROP USER 'user1'@'localhost', 'user2'@'%';

-- 존재하지 않을 수도 있는 사용자 삭제 (에러 방지)
DROP USER IF EXISTS 'username'@'localhost';</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 계정 잠금
ALTER USER 'username'@'host' ACCOUNT LOCK;

-- 계정 해제
ALTER USER 'username'@'host' ACCOUNT UNLOCK;

-- 잠금 상태 확인
SELECT user, host, account_locked FROM mysql.user WHERE user = 'username';</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 데이터베이스 생성
CREATE DATABASE webapp_db;

-- 사용자 생성 및 권한 부여
CREATE USER 'webapp_user'@'localhost' IDENTIFIED BY 'secure_password123';
GRANT SELECT, INSERT, UPDATE, DELETE ON webapp_db.* TO 'webapp_user'@'localhost';
FLUSH PRIVILEGES;</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 읽기 전용 사용자
CREATE USER 'readonly_user'@'%' IDENTIFIED BY 'readonly_password';
GRANT SELECT ON *.* TO 'readonly_user'@'%';
FLUSH PRIVILEGES;</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 백업 사용자 생성
CREATE USER 'backup_user'@'localhost' IDENTIFIED BY 'backup_password';
GRANT SELECT, LOCK TABLES, SHOW VIEW, EVENT, TRIGGER ON *.* TO 'backup_user'@'localhost';
FLUSH PRIVILEGES;</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="">-- 현재 사용자의 비밀번호 변경
ALTER USER USER() IDENTIFIED BY 'new_password';

-- 특정 사용자의 비밀번호 변경 (MySQL 8.0 이상 권장)
ALTER USER 'username'@'host' IDENTIFIED BY 'new_password';

-- 이전 버전의 MySQL
SET PASSWORD FOR 'username'@'host' = PASSWORD('new_password');</pre>



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



<h3 class="wp-block-heading">root 비밀번호 초기화</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. MySQL 서비스 중지
sudo systemctl stop mysql

# 2. 권한 테이블 없이 MySQL 시작
sudo mysqld_safe --skip-grant-tables &amp;

# 3. root로 비밀번호 없이 접속
mysql -u root

# 4. MySQL 내부에서 비밀번호 변경 (MySQL 8.0 기준)
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

# 5. MySQL 종료 후 정상 재시작
mysql> exit
sudo systemctl restart mysql</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="">-- 모든 데이터베이스 목록 보기
SHOW DATABASES;

-- 특정 사용자의 권한이 있는 데이터베이스 확인
SHOW GRANTS FOR 'username'@'host';

-- 모든 데이터베이스에 모든 권한 부여
GRANT ALL PRIVILEGES ON *.* TO 'username'@'host';

-- 특정 데이터베이스에 모든 권한 부여
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'host';

-- 특정 테이블에 권한 부여
GRANT SELECT, INSERT, UPDATE ON database_name.table_name TO 'username'@'host';

-- 읽기 전용 권한
GRANT SELECT ON database_name.* TO 'username'@'host';

-- 특정 컬럼에만 권한 부여
GRANT SELECT (column1, column2) ON database_name.table_name TO 'username'@'host';

-- WITH GRANT OPTION (다른 사용자에게 권한 부여 가능)
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'host' WITH GRANT OPTION;</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 특정 사용자의 권한 조회
SHOW GRANTS FOR 'username'@'host';

-- 현재 사용자의 권한 조회
SHOW GRANTS;

-- 모든 사용자의 권한 요약
SELECT user, host, Select_priv, Insert_priv, Update_priv, Delete_priv 
FROM mysql.user;</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 특정 권한 제거
REVOKE INSERT, UPDATE ON database_name.* FROM 'username'@'host';

-- 모든 권한 제거
REVOKE ALL PRIVILEGES ON *.* FROM 'username'@'host';

-- GRANT OPTION 제거
REVOKE GRANT OPTION ON database_name.* FROM 'username'@'host';</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="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">-- 권한 변경사항 즉시 적용
-- 권한 관련 오류 시 권한 테이블 새로고침
FLUSH PRIVILEGES;</pre>



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



<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>ALL PRIVILEGES</td><td>모든 권한</td></tr><tr><td>SELECT</td><td>데이터 조회</td></tr><tr><td>INSERT</td><td>데이터 삽입</td></tr><tr><td>UPDATE</td><td>데이터 수정</td></tr><tr><td>DELETE</td><td>데이터 삭제</td></tr><tr><td>CREATE</td><td>테이블/데이터베이스 생성</td></tr><tr><td>DROP</td><td>테이블/데이터베이스 삭제</td></tr><tr><td>ALTER</td><td>테이블 구조 변경</td></tr><tr><td>INDEX</td><td>인덱스 생성/삭제</td></tr><tr><td>LOCK TABLES</td><td>테이블 잠금</td></tr><tr><td>CREATE USER</td><td>사용자 생성</td></tr><tr><td>RELOAD</td><td>권한 새로고침</td></tr><tr><td>SHUTDOWN</td><td>서버 종료</td></tr></tbody></table></figure>



<p></p>



<p></p>



<p></p>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%82%ac%ec%9a%a9%ec%9e%90-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40258/">MySQL 사용자 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/mysql-%ec%82%ac%ec%9a%a9%ec%9e%90-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40258/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>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>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>
		<item>
		<title>RAID (Redundant Array of Independent/Inexpensive Disks)</title>
		<link>https://lycos7560.com/ubuntu/raid-redundant-array-of-independent-inexpensive-disks/38954/</link>
					<comments>https://lycos7560.com/ubuntu/raid-redundant-array-of-independent-inexpensive-disks/38954/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 05 Dec 2024 06:13:25 +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[Hard Disk]]></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[System Administration]]></category>
		<category><![CDATA[System Configuration]]></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[패리티]]></category>
		<category><![CDATA[하드 디스크]]></category>
		<category><![CDATA[하드웨어 RAID]]></category>
		<category><![CDATA[확장성]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38954</guid>

					<description><![CDATA[<p>RAID RAID의 정의 RAID(Redundant Array of Independent/Inexpensive Disks) 여러 개의 하드 드라이브를 하나의 논리적 스토리지 단위로 결합하여 성능, 안정성, 또는 데이터 중복성을 향상시키는 기술 RAID는 데이터 저장 방식을 통해 디스크 오류로 인한 데이터 손실 가능성을 중이고, 읽기/쓰기 성능을 향상시키는 데 사용 하드웨어 / 소프트웨어 RAID RAID 사용하는 이유 데이터 중복성: 중요한 데이터를 보호하기 위해 백업과 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/raid-redundant-array-of-independent-inexpensive-disks/38954/">RAID (Redundant Array of Independent/Inexpensive Disks)</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-a5af20b5      "
					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="#raid" class="uagb-toc-link__trigger">RAID</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#raid의-정의" class="uagb-toc-link__trigger">RAID의 정의</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#하드웨어-소프트웨어-raid" class="uagb-toc-link__trigger">하드웨어 / 소프트웨어 RAID</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#raid-사용하는-이유" class="uagb-toc-link__trigger">RAID 사용하는 이유</a></li></ul></li><li class="uagb-toc__list"><a href="#각-raid-방식의-비교-software" class="uagb-toc-link__trigger">각 RAID 방식의 비교 &#8211; Software</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#linear-raid" class="uagb-toc-link__trigger">Linear RAID</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#raid-0" class="uagb-toc-link__trigger">RAID 0</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#raid-1" class="uagb-toc-link__trigger">RAID 1</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#raid-5" class="uagb-toc-link__trigger">RAID 5</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#raid-6" class="uagb-toc-link__trigger">RAID 6</a></ul></ul></ol>					</div>
									</div>
				</div>
			


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



<h2 class="wp-block-heading">RAID</h2>



<h3 class="wp-block-heading">RAID의 정의</h3>



<p>RAID(Redundant Array of Independent/Inexpensive Disks)</p>



<p>여러 개의 하드 드라이브를 하나의 논리적 스토리지 단위로 결합하여 성능, 안정성, 또는 데이터 중복성을 향상시키는 기술</p>



<p>RAID는 데이터 저장 방식을 통해 디스크 오류로 인한 데이터 손실 가능성을 중이고, 읽기/쓰기 성능을 향상시키는 데 사용</p>



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



<h3 class="wp-block-heading">하드웨어 / 소프트웨어 RAID</h3>



<ul class="wp-block-list">
<li>Hardware RAID : 하드웨어 제조업체에서 여러 개의 하드디스크를 가지고 장비를 만들어서 공급 [안정적 / 고비용]</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="723" height="402" src="https://lycos7560.com/wp-content/uploads/2024/12/image-67.jpg" alt="" class="wp-image-38955" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-67.jpg 723w, https://lycos7560.com/wp-content/uploads/2024/12/image-67-300x167.jpg 300w" sizes="(max-width: 723px) 100vw, 723px" /><figcaption class="wp-element-caption"><a href="https://www.stevenjlee.net/2020/03/01/%EC%9D%B4%ED%95%B4%ED%95%98%EA%B8%B0-raid-%EA%B5%AC%ED%98%84-%EB%B0%A9%EC%8B%9D%EA%B3%BC-%EC%A2%85%EB%A5%98%EC%97%90-%EB%8C%80%ED%95%98%EC%97%AC/" target="_blank" rel="noreferrer noopener">https://www.stevenjlee.net/2020/03/01/%EC%9D%B4%ED%95%B4%ED%95%98%EA%B8%B0-raid-%EA%B5%AC%ED%98%84-%EB%B0%A9%EC%8B%9D%EA%B3%BC-%EC%A2%85%EB%A5%98%EC%97%90-%EB%8C%80%ED%95%98%EC%97%AC/</a></figcaption></figure>



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



<ul class="wp-block-list">
<li>Software RAID : 운영체제에서 RAID를 지원하는 방식, 리눅스 운영체제에서 지원 [저비용]</li>
</ul>



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



<h3 class="wp-block-heading">RAID 사용하는 이유</h3>



<p>데이터 중복성: 중요한 데이터를 보호하기 위해 백업과 유사한 역할을 수행</p>



<p>성능 향상: 병렬 데이터 접근으로 읽기/쓰기 속도를 증가</p>



<p>확장성: 단일 대용량 디스크 대신 여러 디스크를 사용해 유연성을 제공</p>



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



<h2 class="wp-block-heading"> 각 RAID 방식의 비교 &#8211; Software </h2>



<figure class="wp-block-image size-full"><img decoding="async" width="774" height="493" src="https://lycos7560.com/wp-content/uploads/2024/12/image-67-1.jpg" alt="" class="wp-image-38956" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-67-1.jpg 774w, https://lycos7560.com/wp-content/uploads/2024/12/image-67-1-300x191.jpg 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-67-1-768x489.jpg 768w" sizes="(max-width: 774px) 100vw, 774px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34</a></figcaption></figure>



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



<h3 class="wp-block-heading">Linear RAID</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="154" height="384" src="https://lycos7560.com/wp-content/uploads/2024/12/image-67.png" alt="" class="wp-image-38957" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-67.png 154w, https://lycos7560.com/wp-content/uploads/2024/12/image-67-120x300.png 120w" sizes="(max-width: 154px) 100vw, 154px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34</a></figcaption></figure>



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



<p>여러 개의 디스크를 <strong>하나의 논리적인 단일 디스크</strong>로 병합하는 RAID 방식</p>



<p>데이터를 디스크에 <strong>순차적</strong>으로 저장하는 방식으로 동작</p>



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



<h4 class="wp-block-heading">Linear RAID의 주요 특징</h4>



<ol class="wp-block-list">
<li><strong>순차적인 데이터 저장</strong>
<ul class="wp-block-list">
<li>첫 번째 디스크가 가득 차면 다음 디스크에 데이터를 계속 저장합니다.</li>



<li>데이터를 병렬로 분산(스트라이핑)하지 않습니다.</li>
</ul>
</li>



<li><strong>중복성 없음</strong>
<ul class="wp-block-list">
<li>Linear RAID는 데이터 복제나 중복성을 제공하지 않기 때문에 디스크 하나라도 손상되면 전체 데이터가 손실될 가능성이 높습니다.</li>
</ul>
</li>



<li><strong>성능</strong>
<ul class="wp-block-list">
<li>읽기/쓰기 속도가 병렬 처리되지 않아 단일 디스크와 동일한 수준의 성능을 가집니다.</li>
</ul>
</li>



<li><strong>디스크 공간 효율</strong>
<ul class="wp-block-list">
<li>모든 디스크 용량이 결합되므로 전체 디스크 용량을 100% 활용할 수 있습니다.</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">Linear RAID의 장점</h4>



<ol class="wp-block-list">
<li><strong>구성 간단</strong>
<ul class="wp-block-list">
<li>복잡한 설정이나 전용 하드웨어가 필요하지 않음</li>



<li>소프트웨어 RAID 도구(e.g., <code>mdadm</code>)를 사용하여 쉽게 구성 가능.</li>
</ul>
</li>



<li><strong>저렴한 비용</strong>
<ul class="wp-block-list">
<li>모든 디스크를 그대로 사용할 수 있어 비용 효율적</li>
</ul>
</li>



<li><strong>유연성</strong>
<ul class="wp-block-list">
<li>서로 다른 크기의 디스크를 결합(예: 1TB + 500GB 디스크 = 1.5TB)</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">Linear RAID의 단점</h4>



<ol class="wp-block-list">
<li><strong>데이터 안정성 부족</strong>
<ul class="wp-block-list">
<li>하나의 디스크라도 손상되면 전체 볼륨이 손실</li>



<li>데이터 중복성이 없으므로 RAID 1이나 RAID 5처럼 복구 기능을 제공하지 않음</li>
</ul>
</li>



<li><strong>성능 향상 없음</strong>
<ul class="wp-block-list">
<li>데이터를 병렬로 읽거나 쓰지 않으므로 읽기/쓰기 성능이 향상되지 않음</li>
</ul>
</li>



<li><strong>확장성 문제</strong>
<ul class="wp-block-list">
<li>기존 Linear RAID 배열에 새 디스크를 추가하기 어려움. 추가하려면 배열을 다시 구성해야함</li>
</ul>
</li>
</ol>



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



<h3 class="wp-block-heading">RAID 0</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="166" height="387" src="https://lycos7560.com/wp-content/uploads/2024/12/image-68.png" alt="" class="wp-image-38958" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-68.png 166w, https://lycos7560.com/wp-content/uploads/2024/12/image-68-129x300.png 129w" sizes="(max-width: 166px) 100vw, 166px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34</a></figcaption></figure>



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



<p><strong>스트라이핑(Striping)</strong> 기술을 사용하는 RAID의 한 유형으로, 데이터를 여러 디스크에 분산 저장하여 <strong>성능 향상</strong>에 중점을 둔 구성</p>



<p>중복성이나 데이터 복구 기능은 없지만, 빠른 읽기/쓰기 속도를 제공</p>



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



<h4 class="wp-block-heading">RAID 0의 주요 특징</h4>



<ol class="wp-block-list">
<li><strong>스트라이핑(Striping)</strong>
<ul class="wp-block-list">
<li>데이터를 작은 단위(스트라이프)로 나누어 여러 디스크에 병렬로 저장</li>



<li>예: 4KB 데이터를 2개의 디스크에 2KB씩 나누어 저장</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>



<li><strong>디스크 용량 효율</strong>
<ul class="wp-block-list">
<li>디스크의 용량을 100% 활용 가능</li>



<li>예: 1TB + 1TB 디스크 → RAID 0 용량 = 2TB</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 0의 장점</h4>



<ol class="wp-block-list">
<li><strong>최대 성능 제공</strong>
<ul class="wp-block-list">
<li>병렬 작업 덕분에 읽기 및 쓰기 성능이 매우 뛰어남</li>



<li>특히 대용량 데이터 전송이나 비디오 편집과 같은 고속 처리 작업에 적합</li>
</ul>
</li>



<li><strong>디스크 용량의 100% 사용</strong>
<ul class="wp-block-list">
<li>RAID 1처럼 일부 용량이 중복성에 사용되지 않으므로 모든 디스크 용량을 활용</li>
</ul>
</li>



<li><strong>구성이 간단</strong>
<ul class="wp-block-list">
<li>하드웨어 RAID 컨트롤러나 소프트웨어 RAID로 쉽게 설정 가능</li>
</ul>
</li>
</ol>



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



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



<h4 class="wp-block-heading">RAID 0의 단점</h4>



<ol class="wp-block-list">
<li><strong>데이터 손실 위험</strong>
<ul class="wp-block-list">
<li>하나의 디스크라도 손상되면 전체 데이터가 손실</li>



<li>디스크 수가 많아질수록 고장 확률도 높아짐</li>
</ul>
</li>



<li><strong>데이터 복구 불가</strong>
<ul class="wp-block-list">
<li>RAID 1, 5, 6과 달리 복구 기능이 없어, 별도의 백업이 필수적</li>
</ul>
</li>
</ol>



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



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



<h3 class="wp-block-heading">RAID 1</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="186" height="319" src="https://lycos7560.com/wp-content/uploads/2024/12/image-69.png" alt="" class="wp-image-38959" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-69.png 186w, https://lycos7560.com/wp-content/uploads/2024/12/image-69-175x300.png 175w" sizes="(max-width: 186px) 100vw, 186px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34</a></figcaption></figure>



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



<p><strong>미러링(Mirroring)</strong> 기술을 사용하는 RAID 레벨로, 동일한 데이터를 두 개 이상의 디스크에 복제하여 <strong>데이터 중복성</strong>과 <strong>안정성</strong>을 보장</p>



<p>하나의 디스크에 문제가 발생해도 나머지 디스크에서 데이터를 읽어올 수 있어 고가용성을 제공</p>



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



<h4 class="wp-block-heading">RAID 1의 주요 특징</h4>



<ol class="wp-block-list">
<li><strong>미러링(Mirroring)</strong>
<ul class="wp-block-list">
<li>모든 데이터를 동일하게 두 개 이상의 디스크에 복사</li>



<li>디스크가 여러 개라도 용량은 하나의 디스크 용량으로 제한(디스크 하나는 복제본 역할)</li>
</ul>
</li>



<li><strong>높은 데이터 안정성</strong>
<ul class="wp-block-list">
<li>디스크 하나가 손상되더라도 데이터 손실 없이 복구 가능</li>



<li>RAID 0과 달리 높은 신뢰성을 제공</li>
</ul>
</li>



<li><strong>디스크 용량 효율</strong>
<ul class="wp-block-list">
<li>전체 디스크 용량의 50%만 사용 가능(나머지 50%는 복제본에 사용).</li>
</ul>
</li>



<li><strong>성능</strong>
<ul class="wp-block-list">
<li><strong>읽기 속도</strong>는 여러 디스크에서 데이터를 병렬로 읽을 수 있어 성능 향상이 가능</li>



<li><strong>쓰기 속도</strong>는 데이터를 모든 디스크에 복제해야 하므로 단일 디스크보다 약간 느릴 수 있음</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 1의 장점</h4>



<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>
</ul>
</li>



<li><strong>구성이 간단</strong>
<ul class="wp-block-list">
<li>설정과 관리가 비교적 쉬운 편</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 1의 단점</h4>



<ol class="wp-block-list">
<li><strong>디스크 용량 효율 저하</strong>
<ul class="wp-block-list">
<li>2개의 디스크를 사용하더라도 실제로는 1개의 디스크 용량만 사용할 수 있음</li>
</ul>
</li>



<li><strong>비용 증가</strong>
<ul class="wp-block-list">
<li>동일 데이터를 저장하려면 2배의 디스크가 필요하므로 비용이 증가</li>
</ul>
</li>



<li><strong>쓰기 성능</strong>
<ul class="wp-block-list">
<li>모든 디스크에 데이터를 복제해야 하므로 쓰기 작업은 약간 느릴 수 있음</li>
</ul>
</li>
</ol>



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



<h3 class="wp-block-heading">RAID 5</h3>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="578" height="312" src="https://lycos7560.com/wp-content/uploads/2024/12/image-70.png" alt="" class="wp-image-38960" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-70.png 578w, https://lycos7560.com/wp-content/uploads/2024/12/image-70-300x162.png 300w" sizes="(max-width: 578px) 100vw, 578px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34</a></figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="514" height="306" src="https://lycos7560.com/wp-content/uploads/2024/12/image-71.png" alt="" class="wp-image-38961" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-71.png 514w, https://lycos7560.com/wp-content/uploads/2024/12/image-71-300x179.png 300w" sizes="(max-width: 514px) 100vw, 514px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=0mRb3g8Gs18&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=34</a></figcaption></figure>
</div>
</div>



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



<p>데이터를 스트라이핑(Striping) 방식으로 저장하면서, 각 디스크에 <strong>패리티(Parity)</strong> 정보를 분산 저장하는 RAID 레벨</p>



<p>성능과 데이터 안정성의 균형을 제공하며, <strong>최소 3개의 디스크</strong>가 필요</p>



<p>디스크 하나가 손상되더라도 패리티를 사용해 데이터를 복구할 수 있음</p>



<p>RAID 5가 RAID 2 ~ 4의 장점 및 특징을 가지고 있음</p>



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



<h4 class="wp-block-heading">RAID 5의 주요 특징</h4>



<ol class="wp-block-list">
<li><strong>스트라이핑과 패리티</strong>
<ul class="wp-block-list">
<li>데이터를 스트라이핑(디스크 간 병렬로 나눠 저장)하여 성능 향상</li>



<li>디스크마다 <strong>패리티 정보</strong>를 분산 저장하여 데이터 복구 가능</li>



<li>예: 3개의 디스크 중 2개는 데이터 저장, 1개는 패리티 저장(순환 방식)</li>
</ul>
</li>



<li><strong>데이터 안정성</strong>
<ul class="wp-block-list">
<li>하나의 디스크가 손상되더라도 나머지 디스크와 패리티를 사용해 데이터 복구 가능</li>



<li>두 개 이상의 디스크가 손상되면 복구 불가</li>
</ul>
</li>



<li><strong>디스크 용량 효율</strong>
<ul class="wp-block-list">
<li>전체 디스크 중 하나의 디스크 용량은 패리티에 사용되므로, 총 용량 = (N &#8211; 1) x 단일 디스크 크기(N = 디스크 개수).</li>



<li>예: 4TB 디스크 4개 → RAID 5 용량 = 12TB (4TB는 패리티로 사용).</li>
</ul>
</li>



<li><strong>성능</strong>
<ul class="wp-block-list">
<li>읽기 작업: 스트라이핑 덕분에 빠름</li>



<li>쓰기 작업: 패리티 계산으로 인해 약간의 성능 저하 발생</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 5의 장점</h4>



<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>RAID 1보다 디스크 사용 효율이 높음</li>
</ul>
</li>



<li><strong>확장성</strong>
<ul class="wp-block-list">
<li>추가 디스크를 쉽게 추가할 수 있어 용량 확장 가능</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 5의 단점</h4>



<ol class="wp-block-list">
<li><strong>복구 시간 증가</strong>
<ul class="wp-block-list">
<li>디스크가 손상되었을 때 복구에 시간이 오래 걸릴 수 있음</li>



<li>복구 중 추가 디스크 손상 시 전체 데이터 손실</li>
</ul>
</li>



<li><strong>쓰기 성능 저하</strong>
<ul class="wp-block-list">
<li>패리티 계산 때문에 RAID 0보다 쓰기 속도가 느림</li>
</ul>
</li>



<li><strong>복잡한 구성</strong>
<ul class="wp-block-list">
<li>하드웨어 RAID 컨트롤러나 소프트웨어 RAID를 통해 구현해야 함</li>
</ul>
</li>
</ol>



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



<h3 class="wp-block-heading">RAID 6</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="513" height="266" src="https://lycos7560.com/wp-content/uploads/2024/12/image-72.png" alt="" class="wp-image-38962" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-72.png 513w, https://lycos7560.com/wp-content/uploads/2024/12/image-72-300x156.png 300w" sizes="(max-width: 513px) 100vw, 513px" /><figcaption class="wp-element-caption"><a href="https://coolenjoy.net/bbs/review/476595" target="_blank" rel="noreferrer noopener">https://coolenjoy.net/bbs/review/476595</a></figcaption></figure>



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



<p><strong>RAID 6</strong>는 데이터를 스트라이핑(Striping) 방식으로 저장하면서, <strong>두 개의 패리티(Parity)</strong> 정보를 사용하여 <strong>최대 2개의 디스크가 동시에 손상</strong>되어도 데이터를 복구할 수 있는 고안정성 RAID 레벨</p>



<p>RAID 5와 비슷하지만, 패리티 블록을 두 개로 늘려 더 높은 안정성을 제공하며 <strong>최소 4개의 디스크</strong>가 필요</p>



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



<h4 class="wp-block-heading">RAID 6의 주요 특징</h4>



<ol class="wp-block-list">
<li><strong>스트라이핑과 이중 패리티</strong>
<ul class="wp-block-list">
<li>데이터를 여러 디스크에 스트라이핑 방식으로 분산 저장</li>



<li>각 디스크에 두 개의 패리티를 저장하여, 디스크 두 개가 동시에 고장 나더라도 데이터를 복구 가능</li>
</ul>
</li>



<li><strong>높은 데이터 안정성</strong>
<ul class="wp-block-list">
<li>RAID 5보다 더 높은 안정성을 제공하며, 데이터 손실 가능성이 낮음</li>
</ul>
</li>



<li><strong>디스크 용량 효율</strong>
<ul class="wp-block-list">
<li>전체 디스크 중 2개는 패리티 저장에 사용되므로, 총 용량 = (N &#8211; 2) x 단일 디스크 크기(N = 디스크 개수)</li>



<li>예: 4TB 디스크 6개 → RAID 6 용량 = 16TB (8TB는 패리티에 사용)</li>
</ul>
</li>



<li><strong>성능</strong>
<ul class="wp-block-list">
<li>읽기 성능: 스트라이핑 덕분에 RAID 5 수준으로 빠름</li>



<li>쓰기 성능: 두 개의 패리티 계산으로 인해 RAID 5보다 느림</li>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 6의 장점</h4>



<ol class="wp-block-list">
<li><strong>높은 안정성</strong>
<ul class="wp-block-list">
<li>동시에 두 개의 디스크가 고장 나더라도 데이터 복구 가능</li>



<li>RAID 5보다 안정성이 크게 향상됨</li>
</ul>
</li>



<li><strong>공간 효율성</strong>
<ul class="wp-block-list">
<li>2개의 패리티를 사용하지만, 여전히 전체 디스크 용량의 대부분을 데이터 저장에 사용 가능</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>
</ul>
</li>
</ol>



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



<h4 class="wp-block-heading">RAID 6의 단점</h4>



<ol class="wp-block-list">
<li><strong>복잡한 패리티 계산</strong>
<ul class="wp-block-list">
<li>두 개의 패리티를 계산해야 하므로 쓰기 작업에서 RAID 5보다 성능이 더 낮음</li>



<li>쓰기 성능이 중요한 환경에서는 RAID 10이 더 적합할 수 있음</li>
</ul>
</li>



<li><strong>디스크 용량 감소</strong>
<ul class="wp-block-list">
<li>RAID 5보다 두 개의 디스크 용량을 패리티에 사용하므로 저장 공간 효율이 약간 낮음</li>
</ul>
</li>



<li><strong>복구 시간 증가</strong>
<ul class="wp-block-list">
<li>대용량 디스크가 많아질수록 복구 시간이 오래 걸리며, 복구 중 성능 저하가 발생할 수 있음</li>
</ul>
</li>
</ol>



<figure class="wp-block-embed is-type-wp-embed"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="LeTYSvBhZL"><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></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Ubuntu &#8211; RAID 0, 1, 5 실습&#8221; &#8212; 어제와 내일의 나 그 사이의 이야기" src="https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/embed/#?secret=104oJdmrrf#?secret=LeTYSvBhZL" data-secret="LeTYSvBhZL" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<div style="height:40px" 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="nGbNj6Y8Lu"><a href="https://lycos7560.com/ubuntu/raid-6-raid-1010/39072/">RAID 6, RAID 10(1+0)</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;RAID 6, RAID 10(1+0)&#8221; &#8212; 어제와 내일의 나 그 사이의 이야기" src="https://lycos7560.com/ubuntu/raid-6-raid-1010/39072/embed/#?secret=rrBtMrNFY4#?secret=nGbNj6Y8Lu" data-secret="nGbNj6Y8Lu" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>
<p>The post <a href="https://lycos7560.com/ubuntu/raid-redundant-array-of-independent-inexpensive-disks/38954/">RAID (Redundant Array of Independent/Inexpensive Disks)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/raid-redundant-array-of-independent-inexpensive-disks/38954/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu &#8211; Hard disk management (Add Disk)</title>
		<link>https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/#comments</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 05 Dec 2024 03:48:00 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[/etc/fstab]]></category>
		<category><![CDATA[Auto Mount]]></category>
		<category><![CDATA[Block Device]]></category>
		<category><![CDATA[Boot Loader]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Data Integrity]]></category>
		<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[Device File]]></category>
		<category><![CDATA[Disk]]></category>
		<category><![CDATA[Disk Management]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[Filesystem Type]]></category>
		<category><![CDATA[Hard Drive]]></category>
		<category><![CDATA[Inode]]></category>
		<category><![CDATA[Journaling]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mkfs.ext4]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[Partition]]></category>
		<category><![CDATA[Partition Alignment]]></category>
		<category><![CDATA[Partition Table]]></category>
		<category><![CDATA[SATA]]></category>
		<category><![CDATA[SCSI]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[Superblock]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Terminal]]></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=38929</guid>

					<description><![CDATA[<p>현재는 물리적인 하드디스크가 장착되어 있는 상태 fdisk를 이용하여 파티셔닝을 해주어야 사용이 가능하다. n 명령어를 입력하여 새로운 파티션을 생성 파티션 타입을 선택하는 단계에서 p를 입력하여 기본 값인 primary 파티션을 선택 파티션 번호를 1로 설정 (기본적으로 MBR은 최대 4개의 주 파티션을 지원) 첫 번째 섹터를 기본 값인 2048로 설정(섹터 2048까지의 공간은 일반적으로 디스크의 메타데이터, 부트 로더, 파티션 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/">Ubuntu &#8211; Hard disk management (Add Disk)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">VMware® Workstation 17 Pro
Version 17.0.2</pre>



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



<figure class="wp-block-image size-full"><img decoding="async" width="502" height="351" src="https://lycos7560.com/wp-content/uploads/2024/12/image-45.png" alt="" class="wp-image-38930" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-45.png 502w, https://lycos7560.com/wp-content/uploads/2024/12/image-45-300x210.png 300w" sizes="(max-width: 502px) 100vw, 502px" /><figcaption class="wp-element-caption">Edit virtual machine settings</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="757" height="728" src="https://lycos7560.com/wp-content/uploads/2024/12/image-46.png" alt="" class="wp-image-38931" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-46.png 757w, https://lycos7560.com/wp-content/uploads/2024/12/image-46-300x289.png 300w" sizes="(max-width: 757px) 100vw, 757px" /><figcaption class="wp-element-caption">Add</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="757" height="729" src="https://lycos7560.com/wp-content/uploads/2024/12/image-47.png" alt="" class="wp-image-38932" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-47.png 757w, https://lycos7560.com/wp-content/uploads/2024/12/image-47-300x289.png 300w" sizes="(max-width: 757px) 100vw, 757px" /><figcaption class="wp-element-caption">HardDisk</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="761" height="731" src="https://lycos7560.com/wp-content/uploads/2024/12/image-48.png" alt="" class="wp-image-38933" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-48.png 761w, https://lycos7560.com/wp-content/uploads/2024/12/image-48-300x288.png 300w" sizes="(max-width: 761px) 100vw, 761px" /><figcaption class="wp-element-caption">SCSI 선택</figcaption></figure>



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



<figure class="wp-block-image size-full"><img decoding="async" width="761" height="732" src="https://lycos7560.com/wp-content/uploads/2024/12/image-50.png" alt="" class="wp-image-38935" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-50.png 761w, https://lycos7560.com/wp-content/uploads/2024/12/image-50-300x289.png 300w" sizes="(max-width: 761px) 100vw, 761px" /><figcaption class="wp-element-caption">테스트용 1GB, Store virtual disk as single file 로 설정 (하나의 파일로 관리)</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="439" height="424" src="https://lycos7560.com/wp-content/uploads/2024/12/image-51.png" alt="" class="wp-image-38936" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-51.png 439w, https://lycos7560.com/wp-content/uploads/2024/12/image-51-300x290.png 300w" sizes="(max-width: 439px) 100vw, 439px" /><figcaption class="wp-element-caption">파일의 이름을 설정</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="756" height="732" src="https://lycos7560.com/wp-content/uploads/2024/12/image-52.png" alt="" class="wp-image-38937" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-52.png 756w, https://lycos7560.com/wp-content/uploads/2024/12/image-52-300x290.png 300w" sizes="(max-width: 756px) 100vw, 756px" /><figcaption class="wp-element-caption">추가된 디스크 확인</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="751" height="725" src="https://lycos7560.com/wp-content/uploads/2024/12/image-53.png" alt="" class="wp-image-38938" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-53.png 751w, https://lycos7560.com/wp-content/uploads/2024/12/image-53-300x290.png 300w" sizes="(max-width: 751px) 100vw, 751px" /><figcaption class="wp-element-caption">SCSI 0:1 New Hard Disk에 확인됨 </figcaption></figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="526" height="349" src="https://lycos7560.com/wp-content/uploads/2024/12/image-54.png" alt="" class="wp-image-38939" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-54.png 526w, https://lycos7560.com/wp-content/uploads/2024/12/image-54-300x199.png 300w" sizes="(max-width: 526px) 100vw, 526px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="358" height="169" src="https://lycos7560.com/wp-content/uploads/2024/12/image-55.png" alt="" class="wp-image-38940" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-55.png 358w, https://lycos7560.com/wp-content/uploads/2024/12/image-55-300x142.png 300w" sizes="(max-width: 358px) 100vw, 358px" /></figure>
</div>
</div>



<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=""># 확인
ls /dev/sd*</pre>



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



<figure class="wp-block-image size-full"><img decoding="async" width="499" height="306" src="https://lycos7560.com/wp-content/uploads/2024/12/image-57.png" alt="" class="wp-image-38942" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-57.png 499w, https://lycos7560.com/wp-content/uploads/2024/12/image-57-300x184.png 300w" sizes="(max-width: 499px) 100vw, 499px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/watch?v=9mJznB0ckjo&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=33" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=9mJznB0ckjo&amp;list=PLVsNizTWUw7HAcyW6bma7trGJfiTSDA44&amp;index=33</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="1103" height="280" src="https://lycos7560.com/wp-content/uploads/2024/12/image-56.png" alt="" class="wp-image-38941" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-56.png 1103w, https://lycos7560.com/wp-content/uploads/2024/12/image-56-300x76.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-56-768x195.png 768w" sizes="(max-width: 1103px) 100vw, 1103px" /></figure>



<p>현재는 물리적인 하드디스크가 장착되어 있는 상태 fdisk를 이용하여 파티셔닝을 해주어야 사용이 가능하다.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1209" height="561" src="https://lycos7560.com/wp-content/uploads/2024/12/image-58.png" alt="" class="wp-image-38943" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-58.png 1209w, https://lycos7560.com/wp-content/uploads/2024/12/image-58-300x139.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-58-768x356.png 768w" sizes="(max-width: 1209px) 100vw, 1209px" /></figure>



<p><code>n</code> 명령어를 입력하여 새로운 파티션을 생성</p>



<p>파티션 타입을 선택하는 단계에서 <code>p</code>를 입력하여 기본 값인 primary 파티션을 선택</p>



<p>파티션 번호를 1로 설정 (기본적으로 MBR은 최대 4개의 주 파티션을 지원)</p>



<p>첫 번째 섹터를 기본 값인 2048로 설정<br>(섹터 2048까지의 공간은 일반적으로 디스크의 메타데이터, 부트 로더, 파티션 테이블 등과 같은 시스템 관리 정보가 저장되는 영역)</p>



<p>마지막 섹터를 기본 값인 2097151로 설정하여 파티션 크기를 1023 MiB 만듬</p>



<figure class="wp-block-image size-full"><img decoding="async" width="734" height="305" src="https://lycos7560.com/wp-content/uploads/2024/12/image-59.png" alt="" class="wp-image-38944" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-59.png 734w, https://lycos7560.com/wp-content/uploads/2024/12/image-59-300x125.png 300w" sizes="(max-width: 734px) 100vw, 734px" /><figcaption class="wp-element-caption">p 명령어를 이용하여 정보확인</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="750" height="157" src="https://lycos7560.com/wp-content/uploads/2024/12/image-60.png" alt="" class="wp-image-38945" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-60.png 750w, https://lycos7560.com/wp-content/uploads/2024/12/image-60-300x63.png 300w" sizes="(max-width: 750px) 100vw, 750px" /><figcaption class="wp-element-caption">W 명령어로 설정 저장</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="846" height="389" src="https://lycos7560.com/wp-content/uploads/2024/12/image-61.png" alt="" class="wp-image-38946" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-61.png 846w, https://lycos7560.com/wp-content/uploads/2024/12/image-61-300x138.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-61-768x353.png 768w" sizes="(max-width: 846px) 100vw, 846px" /><figcaption class="wp-element-caption">ext4 파일 시스템 생성 (리눅스에서 해당 파티션을 관리하고 사용)</figcaption></figure>



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



<p>만약 해당 디스크를 mount하려고 하는 폴더에 파일이 있다면? </p>



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



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



<p>/mydata 폴더는 마운트된 곳을 가르키고 원래 파일을 볼 수 없음 (마운트 해제 원래 파일을 볼 수 있다.) </p>



<figure class="wp-block-image size-full"><img decoding="async" width="710" height="321" src="https://lycos7560.com/wp-content/uploads/2024/12/image-64.png" alt="" class="wp-image-38949" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-64.png 710w, https://lycos7560.com/wp-content/uploads/2024/12/image-64-300x136.png 300w" sizes="(max-width: 710px) 100vw, 710px" /><figcaption class="wp-element-caption">원래 디렉토리의 파일(<code>dummy.img</code>)은 일시적으로 접근할 수 없음</figcaption></figure>



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



<p>리부팅 때마다 마운트를 할 수 없으므로 </p>



<p><code>/etc/fstab</code> 에 등록하여 자동으로 마운트 </p>



<figure class="wp-block-image size-full"><img decoding="async" width="883" height="345" src="https://lycos7560.com/wp-content/uploads/2024/12/image-65.png" alt="" class="wp-image-38950" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-65.png 883w, https://lycos7560.com/wp-content/uploads/2024/12/image-65-300x117.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-65-768x300.png 768w" sizes="(max-width: 883px) 100vw, 883px" /></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="">/dev/sdb1 /mydata ext4 defaults 0 0

# 뒤 ext4 defaults 0 0 는 거의 고</pre>



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



<p><code>/dev/sdb1</code>:</p>



<ul class="wp-block-list">
<li><strong>파일 시스템 장치</strong>: 디스크의 특정 파티션</li>
</ul>



<p><code>/mydata</code>:</p>



<ul class="wp-block-list">
<li><strong>마운트 지점</strong>: 파일 시스템이 마운트될 디렉토리</li>
</ul>



<p><code>ext4</code>:</p>



<ul class="wp-block-list">
<li><strong>파일 시스템 타입</strong>: 사용되는 파일 시스템의 종류, ext4 파일 시스템을 사용</li>
</ul>



<p><code>defaults</code>:</p>



<ul class="wp-block-list">
<li><strong>마운트 옵션</strong>: 기본 마운트 옵션을 사용<br>기본 옵션에는 <code>rw</code>, <code>suid</code>, <code>dev</code>, <code>exec</code>, <code>auto</code>, <code>nouser</code>, <code>async</code>가 포함</li>
</ul>



<p><code>0</code>:</p>



<ul class="wp-block-list">
<li><strong>덤프 옵션</strong>: 파일 시스템 덤프 유틸리티인 <code>dump</code> 명령어가 이 파일 시스템을 백업할지를 나타냅니다. 0은 백업하지 않음을 의미합니다.</li>
</ul>



<p><code>0</code>:</p>



<ul class="wp-block-list">
<li><strong>fsck 옵션</strong>: 시스템 부팅 시 파일 시스템 무결성을 검사할지를 나타냅니다. 0은 검사를 하지 않음을 의미합니다.</li>
</ul>



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



<figure class="wp-block-image size-full"><img decoding="async" width="826" height="347" src="https://lycos7560.com/wp-content/uploads/2024/12/image-66.png" alt="" class="wp-image-38951" srcset="https://lycos7560.com/wp-content/uploads/2024/12/image-66.png 826w, https://lycos7560.com/wp-content/uploads/2024/12/image-66-300x126.png 300w, https://lycos7560.com/wp-content/uploads/2024/12/image-66-768x323.png 768w" sizes="(max-width: 826px) 100vw, 826px" /><figcaption class="wp-element-caption">재부팅 이후 mount 확인</figcaption></figure>



<div style="height:100px" 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="F0rGeM1esA"><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></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Ubuntu &#8211; RAID 0, 1, 5 실습&#8221; &#8212; 어제와 내일의 나 그 사이의 이야기" src="https://lycos7560.com/ubuntu/ubuntu-raid-0-1-5-%ec%8b%a4%ec%8a%b5/38964/embed/#?secret=vCWGI4ll8U#?secret=F0rGeM1esA" data-secret="F0rGeM1esA" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/">Ubuntu &#8211; Hard disk management (Add Disk)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu-hard-disk-management-add-disk/38929/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
