<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9031349244162239552</id><updated>2026-10-23T09:06:34.320+09:00</updated><category term="linux"/><category term="Testing"/><category term="Windows"/><category term="windbg"/><category term="Tools"/><category term="powershell"/><category term="autohotkey"/><category term="innosetup"/><category term="성능"/><category term="Solaris"/><category term="성경"/><category term="Centos"/><category term="apache"/><category term="English"/><category term="qa"/><category term="C#"/><category term="CMD"/><category term="JUnit"/><category term="MFC"/><category term="mysql"/><category term="staf"/><category term="subversion"/><category term="책"/><category term="APM"/><category term="JAVA"/><category term="command"/><category term="ip"/><category term="smallbill"/><category term="보안"/><category term="읽을책"/><category term="API"/><category term="CPPUNIT"/><category term="DirectX"/><category term="Fat32"/><category term="NTFS"/><category term="Outlook"/><category term="Shortcuts"/><category term="TESTing_Tec"/><category term="automation"/><category term="batch"/><category term="db"/><category term="docker"/><category term="etc"/><category term="gcc"/><category term="handle"/><category term="infomation"/><category term="network"/><category term="php"/><category term="setting"/><category term="time"/><category term="torrent"/><category term="virtualbox"/><category term="winpe"/><category term="경제노트"/><category term="방화벽"/><category term="우분투"/><category term="유머"/><category term=".netframework"/><category term="Activex"/><category term="Annotation"/><category term="BlueScreen"/><category term="CPPUINT"/><category term="CUTE"/><category term="Domain knowledge"/><category term="E-load"/><category term="Eclips"/><category term="FLV"/><category term="File"/><category term="Internet explorer"/><category term="J"/><category term="JEUS"/><category term="Memorydump"/><category term="NTLDR"/><category term="R"/><category term="Requirements"/><category term="SSH"/><category term="Stress"/><category term="TPS"/><category term="Tomcat"/><category term="UnitTest"/><category term="Vi"/><category term="WAS"/><category term="Webalizer"/><category term="base64"/><category term="bash"/><category term="book"/><category term="boot"/><category term="cff"/><category term="codeformatter"/><category term="codesign"/><category term="color"/><category term="cook"/><category term="coverage"/><category term="dependency"/><category term="dns"/><category term="editor"/><category term="excel"/><category term="exe"/><category term="ffmpeg"/><category term="find"/><category term="ftp"/><category term="game"/><category term="gui"/><category term="hacking"/><category term="hostname"/><category term="iis"/><category term="install"/><category term="javascript"/><category term="jenkins"/><category term="jmeter"/><category term="login"/><category term="lpic"/><category term="lunux"/><category term="mac"/><category term="mail"/><category term="mantis"/><category term="mediawiki"/><category term="memory"/><category term="mount"/><category term="mstsc"/><category term="notepad"/><category term="opensource"/><category term="pdf"/><category term="phpmyadmin"/><category term="portid"/><category term="postman"/><category term="proto"/><category term="putty"/><category term="python"/><category term="q"/><category term="qtp"/><category term="regstry"/><category term="requirement"/><category term="shell"/><category term="site"/><category term="skill"/><category term="speed"/><category term="tar"/><category term="testlink"/><category term="tetris"/><category term="thunderbird"/><category term="top"/><category term="tortoise"/><category term="ubuntu"/><category term="verifier"/><category term="vmware"/><category term="vurtualbox"/><category term="w"/><category term="winscp"/><category term="xml"/><category term="가상유저"/><category term="가이드"/><category term="갈 갈라디아서 Galatians GAL"/><category term="개인"/><category term="관리자권한상승"/><category term="광동조"/><category term="기능명세서"/><category term="대항해시대"/><category term="디버깅"/><category term="마 마태복음 마 Matthew MAT"/><category term="메츠"/><category term="사도행전 행 Acts ACT"/><category term="사진"/><category term="시 시편 Psalms PSA"/><category term="신발"/><category term="쓰레드"/><category term="암호화"/><category term="약어"/><category term="연필"/><category term="옷"/><category term="왕상 열왕기상 1Kings KI1"/><category term="요구사항"/><category term="요리"/><category term="요삼 요한3서 3John JO3"/><category term="운동"/><category term="카메라"/><category term="패스워드"/><category term="한글"/><category term="합 하박국 Habakkuk HAB"/><category term="히 히브리서 Hebrews HEB"/><title type='text'>Even Though.....</title><subtitle type='html'>그럼에도 불구하고.. 열심히...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>483</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-8252032348840876935</id><published>2024-04-26T12:03:00.004+09:00</published><updated>2025-05-20T09:06:31.553+09:00</updated><title type='text'>Mac 설치하고 처음에 설치해햐는 작업들 </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;ohmyzsh 설치 매번 맥 깔고 할때마다 찾기 귀찬음을 방지하고자 설치하는 것들을 적어놓는다.&lt;/p&gt;&lt;p&gt;맥 처음 깔면설치하는것&amp;nbsp;&lt;/p&gt;&lt;p&gt;iterm 그리고 ohmyzsh&lt;/p&gt;&lt;p&gt;먼저 iterm 을 다운로드받는다.&lt;/p&gt;&lt;p&gt;https://iterm2.com/&amp;nbsp;&lt;/p&gt;&lt;p&gt;그런후 ohmyzsh 를 다운받아 설치한다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;sh &lt;span class=&quot;hljs-operator&quot;&gt;-&lt;/span&gt;c &lt;span class=&quot;hljs-string&quot;&gt;&quot;$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)&quot;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi_Q2iwGWtQRcjTRUv2q97Sm9t7y8u64ma2qgUPm7_6pTwf4wub7Y22jS-KJAw2zS64NA5P8i6GXHVQzgISLt15LB6fup_1AMEYsNpCytrIzUfNr1CPpU7tOR3r5LaSwuyUoB5k-Ts5Ag5VCJ4s6Snmuoyz2l66jhIh-kWqTwQqHtYdk9zCSn_So66YLtk&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;482&quot; data-original-width=&quot;2188&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi_Q2iwGWtQRcjTRUv2q97Sm9t7y8u64ma2qgUPm7_6pTwf4wub7Y22jS-KJAw2zS64NA5P8i6GXHVQzgISLt15LB6fup_1AMEYsNpCytrIzUfNr1CPpU7tOR3r5LaSwuyUoB5k-Ts5Ag5VCJ4s6Snmuoyz2l66jhIh-kWqTwQqHtYdk9zCSn_So66YLtk=w640-h141&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;처음 설치하면 위와같은 화면이 나오는데 enter 를 누르면된다.&lt;div&gt;역시 한번에 되는것은 없다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;git을 설치해준다.&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;hljs-string&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgz6eEtmDwLQp7oq9hXEpQftcel_JgyqpZ961rq9quEBAVozLSSfWLEoCi3ncfHZomvJoolSH8voo9JPt_DkYqtJpUpJ3eduTvzMord6OzVNzxwZB6EJtVBhf_x5kSmKq0h3KF3mL6F5QCJ2petyEuojSAz5aQc1mQvCbFgoqTEhXp5eLjgGbfwAVaylYw&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;162&quot; data-original-width=&quot;2178&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgz6eEtmDwLQp7oq9hXEpQftcel_JgyqpZ961rq9quEBAVozLSSfWLEoCi3ncfHZomvJoolSH8voo9JPt_DkYqtJpUpJ3eduTvzMord6OzVNzxwZB6EJtVBhf_x5kSmKq0h3KF3mL6F5QCJ2petyEuojSAz5aQc1mQvCbFgoqTEhXp5eLjgGbfwAVaylYw=w640-h48&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;설치하려니 Homebrew 를 설치해줘야한다.&lt;/p&gt;&lt;p&gt;https://brew.sh/&lt;/p&gt;&lt;p&gt;접속해서 정보를 확인해서 설치한다.&lt;/p&gt;&lt;p&gt;/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjENNPvsFI_cmGyp_7P9YNyriQkovMYXYqu1_WUX3wxIA0eSYpISrW4SZfVPOkqXVz_9jruMmdaiePgBRhE7xsVRa3Zk8To67PBJf8jwK2IbqsNuoxPugpBHYpTEscBk04ZHMcKYdmlkYen6iX1Zfjfs_7xyA1b5RHXy4pNmL5_DceQs91-CpOI3G20b-E&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;306&quot; data-original-width=&quot;2242&quot; height=&quot;88&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjENNPvsFI_cmGyp_7P9YNyriQkovMYXYqu1_WUX3wxIA0eSYpISrW4SZfVPOkqXVz_9jruMmdaiePgBRhE7xsVRa3Zk8To67PBJf8jwK2IbqsNuoxPugpBHYpTEscBk04ZHMcKYdmlkYen6iX1Zfjfs_7xyA1b5RHXy4pNmL5_DceQs91-CpOI3G20b-E=w640-h88&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;command line tool 도 알아서 설치해준다.&lt;p&gt;&lt;/p&gt;&lt;p&gt;설치되고 나면 아래와 같은 설정을 해줘야 한다고한다.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (echo; echo &#39;eval &quot;$(/opt/homebrew/bin/brew shellenv)&quot;&#39;) &amp;gt;&amp;gt; /Users/dicky/.zprofile&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; eval &quot;$(/opt/homebrew/bin/brew shellenv)&quot;&lt;/p&gt;&lt;p&gt;되고나면 git 을 설치해준다.&lt;/p&gt;&lt;p&gt;brew install git&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Apple SD Gothic Neo&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;hljs-string&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Apple SD Gothic Neo&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;설치되고 나면 다시 ohmyzsh 설치 하면 된다.&lt;/p&gt;&lt;p style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Apple SD Gothic Neo&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&amp;nbsp;sh&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hljs-operator&quot;&gt;-&lt;/span&gt;c&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hljs-string&quot;&gt;&quot;$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhOLpPkW-JsSQ8PfgAULBCjLy5Xo0Zv3lJ_w1ObhTbXIMlbksGNaDlDhPJrUS1m4vYAcWE5T3caOStjUT-JXQv7QjIUzN_kKW1IRNHJdukN86FnAHfJLj02InAzoEnSWF7krYCO0PcEu4mMzRNzPDwhd4u4Xo-wRZsWPjxX0aFKZ70v26V3vZxTkm4_dyo&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;594&quot; data-original-width=&quot;1648&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhOLpPkW-JsSQ8PfgAULBCjLy5Xo0Zv3lJ_w1ObhTbXIMlbksGNaDlDhPJrUS1m4vYAcWE5T3caOStjUT-JXQv7QjIUzN_kKW1IRNHJdukN86FnAHfJLj02InAzoEnSWF7krYCO0PcEu4mMzRNzPDwhd4u4Xo-wRZsWPjxX0aFKZ70v26V3vZxTkm4_dyo&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;프롬프트에 유저정보하고, 서버이름설정&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;```&lt;br /&gt;&lt;div&gt;vi ~/.oh-my-zsh/themes/robbyrussell.zsh-theme&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class=&quot;p1&quot; style=&quot;font-family: Helvetica; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;&quot;&gt;PROMPT=&#39;%{$fg_bold[blue]%}%n@%m%{$reset_color%}%{$fg[blue]%}|%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$fg_bold[cyan]%} %c%{$reset_color%} $(git_prompt_info)&#39;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre data-ke-type=&quot;codeblock&quot;&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/8252032348840876935/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2024/04/ohmyzsh.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8252032348840876935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8252032348840876935'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2024/04/ohmyzsh.html' title='Mac 설치하고 처음에 설치해햐는 작업들 '/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEi_Q2iwGWtQRcjTRUv2q97Sm9t7y8u64ma2qgUPm7_6pTwf4wub7Y22jS-KJAw2zS64NA5P8i6GXHVQzgISLt15LB6fup_1AMEYsNpCytrIzUfNr1CPpU7tOR3r5LaSwuyUoB5k-Ts5Ag5VCJ4s6Snmuoyz2l66jhIh-kWqTwQqHtYdk9zCSn_So66YLtk=s72-w640-h141-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-7152869074930152007</id><published>2024-01-23T23:53:00.007+09:00</published><updated>2024-01-24T00:24:55.388+09:00</updated><title type='text'>Java 로 gmail을 이용해서 SMTP 메일 보내는 방법</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;간단하게 SMTP로 메일 보내는 방법을 기술한다.&lt;/p&gt;&lt;p&gt;보안적으로 약간은 부족할수있다.&lt;/p&gt;&lt;p&gt;먼져 설정해야 할것은 Gmail 설정을 해줘야 한다.&lt;/p&gt;&lt;p&gt;1.&amp;nbsp;&lt;span face=&quot;-apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;앱 비밀번호 만들기&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;-apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;구글 계정에 로그인하여 보안을 선택해준다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhN-OE6RcUX9p8aW9T18ahwceSwGTipSIRv6_jYPkou3ThNoso_F2hkTgOBd2ExZm968vZzVfgEKP4zqs5zu3eYvLmguVl6HM5QaQAl15oCX2Z5blIrQGYWDFRtJmjsVBnbDtQU7eDRaU1ZaWShZubeu2SXxcEPX6k57Sw1bKUsF2xcMAitbbUpFKXSFjA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;335&quot; data-original-width=&quot;341&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhN-OE6RcUX9p8aW9T18ahwceSwGTipSIRv6_jYPkou3ThNoso_F2hkTgOBd2ExZm968vZzVfgEKP4zqs5zu3eYvLmguVl6HM5QaQAl15oCX2Z5blIrQGYWDFRtJmjsVBnbDtQU7eDRaU1ZaWShZubeu2SXxcEPX6k57Sw1bKUsF2xcMAitbbUpFKXSFjA&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;로그인하는 방법에서 2단계 인증을 추가해준다.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiLRP8jPl2qIhtvb0DcGDFl5cmvYMk9LlzhLyFB-lkg8yLS6RycI7MLWidhBhx7c1j1hPXKXa60MmM3xtyzWtuSznoScWX94__9re1wEvGCs6IZ-VO9kSGA5jmLXWrnsgewJ1eeGl7Eqxs0NNYTyx27vvZl_YguiC60Qzo5jfO30CAFGsU6GCOrr2eGXRM&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;219&quot; data-original-width=&quot;856&quot; height=&quot;103&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiLRP8jPl2qIhtvb0DcGDFl5cmvYMk9LlzhLyFB-lkg8yLS6RycI7MLWidhBhx7c1j1hPXKXa60MmM3xtyzWtuSznoScWX94__9re1wEvGCs6IZ-VO9kSGA5jmLXWrnsgewJ1eeGl7Eqxs0NNYTyx27vvZl_YguiC60Qzo5jfO30CAFGsU6GCOrr2eGXRM=w400-h103&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span face=&quot;-apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;-apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;-apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;2단계 인증절차를 진행해준다.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjoacm1i9J1XVYOH9FgbTKlBTHkp1HAysfO9QiaXPjM9OQMo_yYujgYb9vYuOfLHH7ojWQvs_QHb3AQ9rNNJ7zLzLTBo-vAh05Rx8UsW1ioXcUY6Rtzbng0MVj-pNOUiK9Z6_VKZefqdDduO9KlHGltl5elCWzv2rDXenaIxEWDzauBtpJNGOiBgQ7PfA4&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;798&quot; data-original-width=&quot;729&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjoacm1i9J1XVYOH9FgbTKlBTHkp1HAysfO9QiaXPjM9OQMo_yYujgYb9vYuOfLHH7ojWQvs_QHb3AQ9rNNJ7zLzLTBo-vAh05Rx8UsW1ioXcUY6Rtzbng0MVj-pNOUiK9Z6_VKZefqdDduO9KlHGltl5elCWzv2rDXenaIxEWDzauBtpJNGOiBgQ7PfA4=w292-h320&quot; width=&quot;292&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;설정을 완료하면 2단계 인증 설정이 완료된다.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiOizUASd7ftSnxdjpCUTh3RhdK2JgI4AoZQygZdRIFfmvrMMs8OWHYkCdvEbg_8ZQIXahv5VhSIpCwNS6Qr9xks7fuRv3RDFEl5OOeMw1BUi0XvyUEXNeLHmfgtYcaKkWw2WDsSfrkObyuhlj2QqwrYWeie3WmzZmGqrk4IIHH0TfA_2rXOEyCRc21f4U&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;145&quot; data-original-width=&quot;848&quot; height=&quot;55&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiOizUASd7ftSnxdjpCUTh3RhdK2JgI4AoZQygZdRIFfmvrMMs8OWHYkCdvEbg_8ZQIXahv5VhSIpCwNS6Qr9xks7fuRv3RDFEl5OOeMw1BUi0XvyUEXNeLHmfgtYcaKkWw2WDsSfrkObyuhlj2QqwrYWeie3WmzZmGqrk4IIHH0TfA_2rXOEyCRc21f4U&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;다시 2단계 인증화면으로 들어가 하단에 앱비밀번호를 설정해준다.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjXIYMpvjZFQyAj1oAud4WXeh30xEq_wo-PpFMXnD2WFV7bKfjH3L2A-kgYn7Orq-0vQ6Z_7RyRkKEpvbTD8QEoTscxwwKqnRhtd_a7yBpWqe-FDmChmZYpR-emlsVBIcZ8qwp_eqBdIzsmMAelLobVHTQ3NHDvt0i-hZemQFoQepHc7s6YXAC60kJOank&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;239&quot; data-original-width=&quot;747&quot; height=&quot;127&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjXIYMpvjZFQyAj1oAud4WXeh30xEq_wo-PpFMXnD2WFV7bKfjH3L2A-kgYn7Orq-0vQ6Z_7RyRkKEpvbTD8QEoTscxwwKqnRhtd_a7yBpWqe-FDmChmZYpR-emlsVBIcZ8qwp_eqBdIzsmMAelLobVHTQ3NHDvt0i-hZemQFoQepHc7s6YXAC60kJOank=w400-h127&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;앱 이름을 적어주고 앱비밀번호를 설정해준다.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqEM3ca156saykp-DmLCFHNX53OvbA4ZmTyOnL5ZQGUtdDxf40sEX40-QyUtWkSMn0aqHpPLNa-ruprjpJsL02s9S1qVGdOhnPIBwu5G8t7y0tsEuYC52y9InT4ZmXbzTAO6AHsnllb8OrPBGR2RiMHg9RPawQMpbnI7Nfl2-CFYUmzdNwzmEslLrrwJ0&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;579&quot; data-original-width=&quot;723&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqEM3ca156saykp-DmLCFHNX53OvbA4ZmTyOnL5ZQGUtdDxf40sEX40-QyUtWkSMn0aqHpPLNa-ruprjpJsL02s9S1qVGdOhnPIBwu5G8t7y0tsEuYC52y9InT4ZmXbzTAO6AHsnllb8OrPBGR2RiMHg9RPawQMpbnI7Nfl2-CFYUmzdNwzmEslLrrwJ0&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqEM3ca156saykp-DmLCFHNX53OvbA4ZmTyOnL5ZQGUtdDxf40sEX40-QyUtWkSMn0aqHpPLNa-ruprjpJsL02s9S1qVGdOhnPIBwu5G8t7y0tsEuYC52y9InT4ZmXbzTAO6AHsnllb8OrPBGR2RiMHg9RPawQMpbnI7Nfl2-CFYUmzdNwzmEslLrrwJ0&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqEM3ca156saykp-DmLCFHNX53OvbA4ZmTyOnL5ZQGUtdDxf40sEX40-QyUtWkSMn0aqHpPLNa-ruprjpJsL02s9S1qVGdOhnPIBwu5G8t7y0tsEuYC52y9InT4ZmXbzTAO6AHsnllb8OrPBGR2RiMHg9RPawQMpbnI7Nfl2-CFYUmzdNwzmEslLrrwJ0&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqEM3ca156saykp-DmLCFHNX53OvbA4ZmTyOnL5ZQGUtdDxf40sEX40-QyUtWkSMn0aqHpPLNa-ruprjpJsL02s9S1qVGdOhnPIBwu5G8t7y0tsEuYC52y9InT4ZmXbzTAO6AHsnllb8OrPBGR2RiMHg9RPawQMpbnI7Nfl2-CFYUmzdNwzmEslLrrwJ0&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;16자리 비밀번호를 잘 저장해놓는다. (한번생성되면 확인불가)&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjy8RTBg7UqX7PcTj74g6bXk19oaArW0yAOdVjifcc8l2K_N9Q52oUL3dXwAdOrRrCIcNcrIRV34UFUnvKQBgAKahUkLld2Wfq1_DwsY_Nb_Ll5AJlvkZCBbgK9Kif1PFffIGv1UxewJzQgAEpRarsr5MTT_kPbOVg1MNf3MJNExNLZmHxY6ljRVsFMYDc&quot; style=&quot;clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;742&quot; data-original-width=&quot;988&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjy8RTBg7UqX7PcTj74g6bXk19oaArW0yAOdVjifcc8l2K_N9Q52oUL3dXwAdOrRrCIcNcrIRV34UFUnvKQBgAKahUkLld2Wfq1_DwsY_Nb_Ll5AJlvkZCBbgK9Kif1PFffIGv1UxewJzQgAEpRarsr5MTT_kPbOVg1MNf3MJNExNLZmHxY6ljRVsFMYDc&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;생성된 앱정보를 확인 가능하다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhJ59uLqSTiqayCm1geFZPNyN5hbgWuPp5GE7S5Gm0Qtv1d1x9L-40EoQ5cy6Ki219FF1kZEmAko8rSqKLlAa6toyUWadfXc2I9VrqunP5YdZCQkdq_tskB7dysMJLgnbXJZGSVOooUZhm7VSYkEthDKDk2iOaCXqFKgzBRXm8G64ap_AY1Oy58zJd5sqk&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;166&quot; data-original-width=&quot;633&quot; height=&quot;84&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhJ59uLqSTiqayCm1geFZPNyN5hbgWuPp5GE7S5Gm0Qtv1d1x9L-40EoQ5cy6Ki219FF1kZEmAko8rSqKLlAa6toyUWadfXc2I9VrqunP5YdZCQkdq_tskB7dysMJLgnbXJZGSVOooUZhm7VSYkEthDKDk2iOaCXqFKgzBRXm8G64ap_AY1Oy58zJd5sqk&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;참고 정보는&amp;nbsp;&lt;a href=&quot;https://support.google.com/accounts/answer/185833?hl=ko&quot;&gt;https://support.google.com/accounts/answer/185833?hl=ko&lt;/a&gt; 링크 참고&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;그럼 중요한 코드&lt;/div&gt;&lt;div&gt;Java maven 을 기준으로 하면 먼져 의존성을 추가해주고 코드를 작성하면 끝난다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pom.xml 파일에 추가해준다.&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;!-- Gmail --&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;   &amp;lt;groupId&amp;gt;&lt;/span&gt;javax.mail&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;   &amp;lt;artifactId&amp;gt;&lt;/span&gt;javax.mail-api&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;   &amp;lt;version&amp;gt;&lt;/span&gt;1.6.2&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/version&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;   &amp;lt;groupId&amp;gt;&lt;/span&gt;com.sun.mail&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;   &amp;lt;artifactId&amp;gt;&lt;/span&gt;javax.mail&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;   &amp;lt;version&amp;gt;&lt;/span&gt;1.6.2&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/version&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;application.properities 에 mail 정보를 기입해준다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;color: grey;&quot;&gt;#gmail&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;email.user&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;email&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;email.password&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;password&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;email.smtp.host&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;smtp.gmail.com&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;email.smtp.port&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;465&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;메일 작성코드를 작성해준다.&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.shop.controller&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;java.util.Properties&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;javax.mail.*&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;javax.mail.internet.InternetAddress&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;javax.mail.internet.MimeMessage&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;EmailSender {&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;Properties &lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;EmailSender&lt;/span&gt;() &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;Exception {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig &lt;/span&gt;= loadEmailConfig()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;Properties &lt;span style=&quot;color: #ffc66d;&quot;&gt;loadEmailConfig&lt;/span&gt;() &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;Exception {&lt;br /&gt;        Properties props = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Properties()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// application.properties &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Menlo-Regular&#39;,monospace;&quot;&gt;파일을 로드합니다&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;props.load(Thread.&lt;span style=&quot;font-style: italic;&quot;&gt;currentThread&lt;/span&gt;().getContextClassLoader().getResourceAsStream(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;application.properties&quot;&lt;/span&gt;))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        return &lt;/span&gt;props&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;sendEmail&lt;/span&gt;(String recipient&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;String subject&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;String text) &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;MessagingException {&lt;br /&gt;        Properties props = createEmailProperties()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Session session = createSession(props)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Message message = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;MimeMessage(session)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;message.setFrom(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;InternetAddress(&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;.getProperty(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;email.user&quot;&lt;/span&gt;)))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;message.setRecipients(Message.RecipientType.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TO&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;InternetAddress.&lt;span style=&quot;font-style: italic;&quot;&gt;parse&lt;/span&gt;(recipient))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;message.setSubject(subject)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;message.setText(text)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Transport.&lt;span style=&quot;font-style: italic;&quot;&gt;send&lt;/span&gt;(message)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;Properties &lt;span style=&quot;color: #ffc66d;&quot;&gt;createEmailProperties&lt;/span&gt;() {&lt;br /&gt;        Properties props = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Properties()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;props.put(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mail.smtp.host&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;.getProperty(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;email.smtp.host&quot;&lt;/span&gt;))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;props.put(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mail.smtp.port&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;.getProperty(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;email.smtp.port&quot;&lt;/span&gt;))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;props.put(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mail.smtp.auth&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;props.put(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mail.smtp.ssl.enable&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;props.put(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;mail.smtp.ssl.trust&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;.getProperty(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;email.smtp.host&quot;&lt;/span&gt;))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        return &lt;/span&gt;props&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;Session &lt;span style=&quot;color: #ffc66d;&quot;&gt;createSession&lt;/span&gt;(Properties props) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;Session.&lt;span style=&quot;font-style: italic;&quot;&gt;getInstance&lt;/span&gt;(props&lt;span style=&quot;color: #cc7832;&quot;&gt;, new &lt;/span&gt;javax.mail.Authenticator() {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;protected &lt;/span&gt;PasswordAuthentication &lt;span style=&quot;color: #ffc66d;&quot;&gt;getPasswordAuthentication&lt;/span&gt;() {&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;return new &lt;/span&gt;PasswordAuthentication(&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;.getProperty(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;email.user&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;emailConfig&lt;/span&gt;.getProperty(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;email.password&quot;&lt;/span&gt;))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;public static void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;main&lt;/span&gt;(String[] args) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;try &lt;/span&gt;{&lt;br /&gt;            EmailSender sender = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;EmailSender()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;sender.sendEmail(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;testemailaddress@gmail.com&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6a8759; font-family: &#39;Menlo-Regular&#39;,monospace;&quot;&gt;테스트 메일입니다&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;.&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6a8759; font-family: &#39;Menlo-Regular&#39;,monospace;&quot;&gt;이것은 테스트 메일입니다&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;\n\n &lt;/span&gt;&lt;span style=&quot;color: #6a8759; font-family: &#39;Menlo-Regular&#39;,monospace;&quot;&gt;잘 갔나요&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;?&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;catch &lt;/span&gt;(Exception e) {&lt;br /&gt;            e.printStackTrace()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;```&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/7152869074930152007/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2024/01/java-gmail-smtp.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/7152869074930152007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/7152869074930152007'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2024/01/java-gmail-smtp.html' title='Java 로 gmail을 이용해서 SMTP 메일 보내는 방법'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhN-OE6RcUX9p8aW9T18ahwceSwGTipSIRv6_jYPkou3ThNoso_F2hkTgOBd2ExZm968vZzVfgEKP4zqs5zu3eYvLmguVl6HM5QaQAl15oCX2Z5blIrQGYWDFRtJmjsVBnbDtQU7eDRaU1ZaWShZubeu2SXxcEPX6k57Sw1bKUsF2xcMAitbbUpFKXSFjA=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-3610348804401038373</id><published>2021-03-31T17:35:00.003+09:00</published><updated>2021-03-31T17:35:30.314+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><title type='text'>docker mysql 대문자테이블관련</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;대문자 테이블을 생성했다가 삭제하면&amp;nbsp;&lt;/p&gt;&lt;p&gt;xxxx doesn&#39;t exist 가 자주떠서 도커를 재실행하곤 했음.&lt;/p&gt;&lt;p&gt;일반설정변경하려면 my.cnf 파일 변경하면되는데 도커라..&lt;/p&gt;&lt;p&gt;그래서 아래와 같이 실행시 옵션을 주면됨.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;시작할대 옵션변경하려면&lt;/p&gt;&lt;p&gt;-- lower_case_table_names=1 과 같이 주면된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;```&lt;/p&gt;&lt;p&gt;&amp;nbsp;docker run -d -p 3306:3306 \&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;--restart always \&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;-e MYSQL_ROOT_PASSWORD=dicky \&lt;/p&gt;&lt;p&gt;--name mysql \&lt;/p&gt;&lt;p&gt;mysql:5.7 --lower_case_table_names=1&lt;/p&gt;&lt;p&gt;```&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/3610348804401038373/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2021/03/docker-mysql.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3610348804401038373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3610348804401038373'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2021/03/docker-mysql.html' title='docker mysql 대문자테이블관련'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-1511983987086183987</id><published>2021-03-11T09:27:00.007+09:00</published><updated>2021-03-11T09:28:14.112+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><title type='text'>[jmeter]response log</title><content type='html'>&lt;p&gt;400 일경우 성공하게&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;if (prev.getResponseCode().equals(&#39;400&#39;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; prev.setSuccessful(true)&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;http 응답에대한 로그&lt;/p&gt;&lt;p&gt;log.info(&quot;Responsestamp = &quot; + prev.getTimeStamp());&lt;/p&gt;&lt;p&gt;log.info(&quot;Response = &quot; + prev.getResponseCode());&lt;/p&gt;&lt;p&gt;log.info(&quot;Responseage = &quot; + prev.getResponseMessage());&lt;/p&gt;&lt;p&gt;log.info(&quot;Responseers =&amp;nbsp; &quot; + prev.getResponseHeaders());&lt;/p&gt;&lt;p&gt;log.info(&quot;Responseng = &quot; + prev.getResponseDataAsString());&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;참고글&lt;/p&gt;&lt;p&gt;https://lobsterautomation.wordpress.com/tag/beanshell/&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/1511983987086183987/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2021/03/jmeterresponse-log.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/1511983987086183987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/1511983987086183987'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2021/03/jmeterresponse-log.html' title='[jmeter]response log'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-8126596859743207250</id><published>2021-01-13T22:07:00.006+09:00</published><updated>2021-01-13T22:09:21.082+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="jenkins"/><title type='text'>[jenins] docker 로 jenkins 설치</title><content type='html'>&lt;p&gt;docker 로 jenkins 설치하기&lt;/p&gt;&lt;p&gt;먼저 docker 를 받아온다.&lt;/p&gt;&lt;p&gt;공식 docuer hub&amp;nbsp; 에 들어가면 자세히 나옴&lt;/p&gt;&lt;p&gt;아래내용만 봐도 알겠지만.&amp;nbsp;&lt;/p&gt;&lt;p&gt;https://hub.docker.com/_/jenkins?tab=tags&amp;amp;page=1&amp;amp;ordering=last_updated&lt;/p&gt;&lt;pre class=&quot;language-bash&quot; style=&quot;background: rgb(251, 252, 253); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.02) 0px 0px 2px; box-sizing: inherit; line-height: 1.5; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span face=&quot;Fira Mono, source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace&quot; style=&quot;color: #005cc5;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;docker pull jenkins&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Fira Mono&amp;quot;, source-code-pro, Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace&quot; style=&quot;color: #005cc5; font-size: 0.875rem; letter-spacing: 0px;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;&lt;p&gt;호스트에 있는 디렉토리 볼륨연결을 위한 디렉토리 생성&lt;/p&gt;&lt;pre class=&quot;language-bash&quot; style=&quot;background: rgb(251, 252, 253); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.02) 0px 0px 2px; box-sizing: inherit; color: #24292e; font-family: &amp;quot;Fira Mono&amp;quot;, source-code-pro, Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 0.875rem; letter-spacing: 0px; line-height: 1.5; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;language-bash&quot; style=&quot;box-sizing: inherit; font-family: &amp;quot;Fira Mono&amp;quot;, source-code-pro, Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace;&quot;&gt;&lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #005cc5;&quot;&gt;mkdir&lt;/span&gt; -p /tools/jenkins/jenkins_home&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;실행&lt;/p&gt;&lt;pre class=&quot;language-bash&quot; style=&quot;background: rgb(251, 252, 253); border-radius: 4px; box-shadow: rgba(0, 0, 0, 0.02) 0px 0px 2px; box-sizing: inherit; line-height: 1.5; overflow-x: auto; padding: 1rem;&quot;&gt;&lt;span face=&quot;Fira Mono, source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace&quot; style=&quot;color: #24292e;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;docker run -d --name jenkins -p 80:8080 -p 50000:50000 -v /tools/docker/jenkins/jenkins_home:/var/jenkins_home \
  -u root -e JAVA_OPTS=&#39;-Duser.timezone=Asia/Seoul -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8&#39; jenkins&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/8126596859743207250/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2021/01/jenins-docker-jenkins.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8126596859743207250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8126596859743207250'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2021/01/jenins-docker-jenkins.html' title='[jenins] docker 로 jenkins 설치'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-5768534832846567494</id><published>2020-11-17T09:12:00.008+09:00</published><updated>2020-11-18T08:47:04.737+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="etc"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><title type='text'>그냥 맥에깔아서쓰고있는것들.</title><content type='html'>그냥 쓰는 프로그램들 맥에서.&lt;div&gt;&amp;nbsp;zsh
iterm
vscode
sourcetree
sequql pro
postman
jmeter
joplin&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;zsh관련 설정&lt;/div&gt;&lt;div&gt;https://blog.outsider.ne.kr/1490&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;원하는곳에 요것만깔아주고 zsh 설정하고, iterm 재시작&lt;/div&gt;&lt;div&gt;git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k&lt;/div&gt;&lt;div&gt;echo &#39;source ~/powerlevel10k/powerlevel10k.zsh-theme&#39; &amp;gt;&amp;gt;! ~/.zshrc&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;화면분할 무료
https://www.spectacleapp.com/&amp;nbsp;
&lt;/div&gt;&lt;div&gt;유료
https://apps.apple.com/app/id441258766?mt=12&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;클립보드
https://github.com/Clipy/Clipy&lt;/div&gt;&lt;div&gt;요건 다른사람이 올린거.
https://macnews.tistory.com/3815
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/5768534832846567494/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2020/11/blog-post.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/5768534832846567494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/5768534832846567494'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2020/11/blog-post.html' title='그냥 맥에깔아서쓰고있는것들.'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-2729362078064778247</id><published>2020-11-11T09:10:00.000+09:00</published><updated>2020-11-11T09:10:50.396+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="codeformatter"/><title type='text'>blogspot code formatter</title><content type='html'>http://codeformatter.blogspot.com/

되나?

&lt;pre style=&#39;color:#55cc66;background:#001800;&#39;&gt;&amp;lt;pre&gt;&amp;lt;code class=&quot;language-java&quot;&gt;&lt;span style=&#39;color:#b96969; &#39;&gt;/* CallingMethodsInSameClass.java&lt;/span&gt;
&lt;span style=&#39;color:#b96969; &#39;&gt;&amp;#xa0;*&lt;/span&gt;
&lt;span style=&#39;color:#b96969; &#39;&gt;&amp;#xa0;* illustrates how to call static methods a class&lt;/span&gt;
&lt;span style=&#39;color:#b96969; &#39;&gt;&amp;#xa0;* from a method in the same class&lt;/span&gt;
&lt;span style=&#39;color:#b96969; &#39;&gt;&amp;#xa0;*/&lt;/span&gt;

&lt;span style=&#39;color:#508050; font-weight:bold; &#39;&gt;public&lt;/span&gt; &lt;span style=&#39;color:#508050; font-weight:bold; &#39;&gt;class&lt;/span&gt; CallingMethodsInSameClass
&lt;span style=&#39;color:#800080; &#39;&gt;{&lt;/span&gt;
    &lt;span style=&#39;color:#508050; font-weight:bold; &#39;&gt;public&lt;/span&gt; &lt;span style=&#39;color:#508050; font-weight:bold; &#39;&gt;static&lt;/span&gt; &lt;span style=&#39;color:#bb7977; &#39;&gt;void&lt;/span&gt; main&lt;span style=&#39;color:#808030; &#39;&gt;(&lt;/span&gt;&lt;span style=&#39;color:#bb7977; font-weight:bold; &#39;&gt;String&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;[&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;]&lt;/span&gt; args&lt;span style=&#39;color:#808030; &#39;&gt;)&lt;/span&gt; &lt;span style=&#39;color:#800080; &#39;&gt;{&lt;/span&gt;
        printOne&lt;span style=&#39;color:#808030; &#39;&gt;(&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;)&lt;/span&gt;&lt;span style=&#39;color:#800080; &#39;&gt;;&lt;/span&gt;
    &lt;span style=&#39;color:#800080; &#39;&gt;}&lt;/span&gt;

    &lt;span style=&#39;color:#508050; font-weight:bold; &#39;&gt;public&lt;/span&gt; &lt;span style=&#39;color:#508050; font-weight:bold; &#39;&gt;static&lt;/span&gt; &lt;span style=&#39;color:#bb7977; &#39;&gt;void&lt;/span&gt; printOne&lt;span style=&#39;color:#808030; &#39;&gt;(&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;)&lt;/span&gt; &lt;span style=&#39;color:#800080; &#39;&gt;{&lt;/span&gt;
        &lt;span style=&#39;color:#bb7977; font-weight:bold; &#39;&gt;System&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;.&lt;/span&gt;out&lt;span style=&#39;color:#808030; &#39;&gt;.&lt;/span&gt;println&lt;span style=&#39;color:#808030; &#39;&gt;(&lt;/span&gt;&lt;span style=&#39;color:#cc5555; &#39;&gt;&quot;Hello World&quot;&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;)&lt;/span&gt;&lt;span style=&#39;color:#800080; &#39;&gt;;&lt;/span&gt;
    &lt;span style=&#39;color:#800080; &#39;&gt;}&lt;/span&gt;
&lt;span style=&#39;color:#800080; &#39;&gt;}&lt;/span&gt;&amp;lt;/code&gt;&amp;lt;/pre&gt;
&lt;/pre&gt;
&lt;!--Created using ToHtml.com on 2020-11-11 00:07:10 UTC --&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/2729362078064778247/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2020/11/blogspot-code-formatter.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/2729362078064778247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/2729362078064778247'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2020/11/blogspot-code-formatter.html' title='blogspot code formatter'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-2557751393322594041</id><published>2020-11-11T09:00:00.001+09:00</published><updated>2020-11-11T09:02:40.320+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="proto"/><title type='text'>Protocol Buffers  파일을 조금 보기쉽게 변환해보기</title><content type='html'>&lt;p&gt;사내에서&amp;nbsp;&lt;span face=&quot;-apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #24292e; font-size: 16px;&quot;&gt;Protocol&lt;/span&gt;&lt;span face=&quot;-apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #24292e; font-size: 16px;&quot;&gt;&amp;nbsp;Buffers&amp;nbsp; 를 사용해서 프로토콜을 정의해서쓰고있어서..&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;-apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #24292e; font-size: 16px;&quot;&gt;찾아보니 아래와 같은 github 이 있음.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;https://github.com/pseudomuto/protoc-gen-doc&lt;/p&gt;&lt;p&gt;들어가서 찬찬히 읽어보니.&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace&quot; style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-size: 13.6px;&quot;&gt;설치는 아래와같이.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace&quot; style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-size: 13.6px;&quot;&gt;go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace&quot; style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-size: 13.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace&quot; style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-size: 13.6px;&quot;&gt;실행하려고하니.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;protoc --plugin=/Users/dicky/go/bin/protoc-gen-doc&lt;/p&gt;&lt;p&gt;식으로해야해서&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;shell 로 만들어봄.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;```&lt;/p&gt;&lt;p&gt;imgFile=$1&lt;/p&gt;&lt;p&gt;name=`basename $imgFile`&lt;/p&gt;&lt;p&gt;fileName=&quot;${name%.*}&quot;&lt;/p&gt;&lt;p&gt;fileExtension=&quot;${name##*.}&quot;&lt;/p&gt;&lt;p&gt;echo $name&lt;/p&gt;&lt;p&gt;echo $fileName&lt;/p&gt;&lt;p&gt;echo $fileExtension&lt;/p&gt;&lt;p&gt;protoc --plugin=/Users/dicky/go/bin/protoc-gen-doc --doc_out=./doc --doc_opt=html,$fileName.html $1&lt;/p&gt;&lt;p&gt;open ./doc/$fileName.html&lt;/p&gt;&lt;p&gt;```&lt;/p&gt;&lt;p&gt;그래서 실행은&lt;/p&gt;&lt;p&gt;./gen /server/SignIn.proto&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그래서 결과물은 html 로 보기쉽게 나옴.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQSXJV6xZOZDZskZL7PMQZ0DI2B-IvqE3VXhgXelbzD2f3cmFq77wsKCWJhwjh9UKOlFa3VptZKfeItY2Et6k7__Wf4RWw0ksIfhCuprs8d_k0jNV3A4WuIRQe7dPJd-uJiEtJXSQrqIc/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;393&quot; data-original-width=&quot;538&quot; height=&quot;234&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQSXJV6xZOZDZskZL7PMQZ0DI2B-IvqE3VXhgXelbzD2f3cmFq77wsKCWJhwjh9UKOlFa3VptZKfeItY2Et6k7__Wf4RWw0ksIfhCuprs8d_k0jNV3A4WuIRQe7dPJd-uJiEtJXSQrqIc/w483-h234/image.png&quot; width=&quot;483&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCo51tybeFfb_X67i6K0PWdRM5w9fT4lXGIRFuRFq_cijTiQJG6Im_vdPytUqVE3BaB90lJGDfjyKSWHZcpNHGx3PeF5btoLSZA2WrboFkxt3hSJKyLr6cNoWv6m8s2O5507NXnoxJW_Q/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;83&quot; data-original-width=&quot;518&quot; height=&quot;51&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCo51tybeFfb_X67i6K0PWdRM5w9fT4lXGIRFuRFq_cijTiQJG6Im_vdPytUqVE3BaB90lJGDfjyKSWHZcpNHGx3PeF5btoLSZA2WrboFkxt3hSJKyLr6cNoWv6m8s2O5507NXnoxJW_Q/w376-h51/image.png&quot; width=&quot;376&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/2557751393322594041/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2020/11/protocol-buffers.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/2557751393322594041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/2557751393322594041'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2020/11/protocol-buffers.html' title='Protocol Buffers  파일을 조금 보기쉽게 변환해보기'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQSXJV6xZOZDZskZL7PMQZ0DI2B-IvqE3VXhgXelbzD2f3cmFq77wsKCWJhwjh9UKOlFa3VptZKfeItY2Et6k7__Wf4RWw0ksIfhCuprs8d_k0jNV3A4WuIRQe7dPJd-uJiEtJXSQrqIc/s72-w483-h234-c/image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-3505244747936972662</id><published>2020-11-10T08:23:00.000+09:00</published><updated>2020-11-10T08:23:02.665+09:00</updated><title type='text'>[QA] Jmeter json Extractor</title><content type='html'>&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;Jmeter 에서 response 에대해서 추출 할때 Json Extractor를 사용한다.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;json 값이 아래와 같을때&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;accessToken&quot;: &quot;aabbccdd-ddkksskk-aaddvvc-edqadfasd&quot;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;memberId&quot;: &quot;AB45518383&quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;- accssToken 값은 $.accessToken&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;- memberId 값은 $.memberId&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;아래와 같이 할 수 있다.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUAHxzOOe5Gn54GbMz_Uj4T4Vc95xzLWWtUXMf_r4I63IiaxBnNMiZs0BjhdK8XvjVAtmwiMGTH__yeDy1Lo2W6nTaOcxsVTELxKROl5OOCiYDwKdN96fb3zqSLkXw-gBamQwXXQayMcM/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;296&quot; data-original-width=&quot;912&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUAHxzOOe5Gn54GbMz_Uj4T4Vc95xzLWWtUXMf_r4I63IiaxBnNMiZs0BjhdK8XvjVAtmwiMGTH__yeDy1Lo2W6nTaOcxsVTELxKROl5OOCiYDwKdN96fb3zqSLkXw-gBamQwXXQayMcM/w642-h224/image.png&quot; width=&quot;642&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;참고적으로 Postman에서 할려면.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 17.25px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbphzdS_GtJ5LNqJ9TM0R-EC4fit-ecxVaZ_xC2rNa8_9n6PsXY1kw0gCruh2_lRv-B-htSTczw3oJPbYKYIX2ry_xJCdHxsNWiGZqP38SlxI3vRjQkcrJ8mr8IvEmBoEe6L8NASzL6uc/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;154&quot; data-original-width=&quot;690&quot; height=&quot;71&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbphzdS_GtJ5LNqJ9TM0R-EC4fit-ecxVaZ_xC2rNa8_9n6PsXY1kw0gCruh2_lRv-B-htSTczw3oJPbYKYIX2ry_xJCdHxsNWiGZqP38SlxI3vRjQkcrJ8mr8IvEmBoEe6L8NASzL6uc/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #363f44; font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;참고&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;https://goessner.net/articles/JsonPath/&lt;/span&gt;&lt;/p&gt;&lt;p&gt;https://octoperf.com/blog/2017/03/09/how-to-extract-data-from-json-response-using-jmeter/&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;span style=&quot;color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;-전반적이 가이드는 아래것을 보면됨.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #363f44; font-family: &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 17.25px;&quot;&gt;https://octoperf.com/blog/2018/04/23/jmeter-rest-api-testing/&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; line-height: 1.84; margin: 0px 0px 12px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/3505244747936972662/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2020/11/qa-jmeter-json-extractor.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3505244747936972662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3505244747936972662'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2020/11/qa-jmeter-json-extractor.html' title='[QA] Jmeter json Extractor'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUAHxzOOe5Gn54GbMz_Uj4T4Vc95xzLWWtUXMf_r4I63IiaxBnNMiZs0BjhdK8XvjVAtmwiMGTH__yeDy1Lo2W6nTaOcxsVTELxKROl5OOCiYDwKdN96fb3zqSLkXw-gBamQwXXQayMcM/s72-w642-h224-c/image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-8329431051172171562</id><published>2020-11-09T08:44:00.003+09:00</published><updated>2020-11-09T08:54:31.277+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="API"/><category scheme="http://www.blogger.com/atom/ns#" term="postman"/><title type='text'>[QA] Postman 참고될만한 SNIPPETS</title><content type='html'>&lt;p&gt;&lt;span face=&quot;Avenir, Arial, sans-serif&quot; style=&quot;background-color: #1d2024; color: #dddddd; font-size: 15px;&quot;&gt;Postman 참고될만한 SNIPPETS&lt;/span&gt;&lt;/p&gt;&lt;table style=&quot;background-color: #1d2024; border-collapse: collapse; border: 1px solid rgb(70, 70, 70); color: #dddddd; font-family: Avenir, Arial, sans-serif; font-size: 15px; margin-bottom: 0.65em; margin-top: 0.6em;&quot;&gt;&lt;thead&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;SNIPPETS&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Tests Code&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;설명&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Get an environment variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.environment.get(&quot;variable_key&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Postman 전체에서 사용 가능한 파라미터 값 얻음&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Get a global variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.globals.get(&quot;variable_key&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;전역 파라미터 값 얻기&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Get a variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.variables.get(&quot;variable_key&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Collection 안에서 사용 가능한 파라미터 값 얻기&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Set an environment variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.environment.set(&quot;variable_key&quot;, &quot;variable_value&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Postman 전체에서 사용 가능한 파라미터 값 설정&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Set a global variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.globals.set(&quot;variable_key&quot;, &quot;variable_value&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;전역 파라미터 값 설정&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Clear an environment variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.environment.unset(&quot;variable_key&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Postman 전체에서 사용 가능한 파라미터 삭제&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Clear a global variable&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.globals.unset(&quot;variable_key&quot;);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;전역 파라미터 삭제&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Send a request&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.sendRequest(&quot;&lt;a data-from-md=&quot;&quot; href=&quot;https://postman-echo.com/get&quot; style=&quot;background-color: transparent;&quot; title=&quot;https://postman-echo.com/get&quot; type=&quot;&quot;&gt;https://postman-echo.com/get&lt;/a&gt;&quot;, function (err, response) {&lt;br class=&quot;jop-noMdConv&quot; /&gt;console.log(response.json());&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;API 호출&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Status code: Coet is 200&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.test(&quot;Status code is 200&quot;, function () {&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.response.to.have.status(200);&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Http 코드가 200인지 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Response body: Contains string&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;p[m.test(](&lt;a data-from-md=&quot;&quot; href=&quot;http://m.test&quot; style=&quot;background-color: transparent;&quot; title=&quot;http://m.test&quot; type=&quot;&quot;&gt;http://m.test&lt;/a&gt;()&quot;Body matches string&quot;, function () {&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;p&lt;a data-from-md=&quot;&quot; href=&quot;http://m.expect(pm.response.text()).to.include()%22string_you_want_to_search%22&quot; style=&quot;background-color: transparent;&quot; title=&quot;http://m.expect(pm.response.text()).to.include()%22string_you_want_to_search%22&quot; type=&quot;&quot;&gt;m.expect(pm.response.text()).to.include(&lt;/a&gt;;&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;응답 결과 중 원하는 단어 포함 여부 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Response body: Is equal to a string&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;p[m.test(](&lt;a data-from-md=&quot;&quot; href=&quot;http://m.test&quot; style=&quot;background-color: transparent;&quot; title=&quot;http://m.test&quot; type=&quot;&quot;&gt;http://m.test&lt;/a&gt;()&quot;Body is correct&quot;, function ()&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;{pm.response.to.have.body(&quot;response_body_string&quot;);&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;응답 결과가 원하는 결과인지 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Response headers: Content-Type header check&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.test(&quot;Content-Type is present&quot;, function () {&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.response.to.have.header(&quot;Content-Type&quot;);&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;응답 header 중 원하는 타입이 있는지 확인함.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Response time is less than 200ms&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;p[m.test(](&lt;a data-from-md=&quot;&quot; href=&quot;http://m.test&quot; style=&quot;background-color: transparent;&quot; title=&quot;http://m.test&quot; type=&quot;&quot;&gt;http://m.test&lt;/a&gt;()&quot;Response time is less than 200ms&quot;, function () {&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;p&lt;a data-from-md=&quot;&quot; href=&quot;http://m.expect(pm.response.responseTime).to.be.below(200);&quot; style=&quot;background-color: transparent;&quot; title=&quot;http://m.expect(pm.response.responseTime).to.be.below(200);&quot; type=&quot;&quot;&gt;m.expect(pm.response.responseTime).to.be.below(200);&lt;/a&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;응답 시간이 200ms이하인지 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Status code: Successful POST request&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.test(&quot;Successful POST request&quot;, function () {&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.expect(pm.response.code).to.be.oneOf([201,202]);&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;http 코드가 201, 202 중 하나인지 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #28292a;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Status code: Code name has string&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;pm.test(&quot;Status code name has string&quot;, function () {&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.response.to.have.status(&quot;Created&quot;);&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;응답 코드에 원하는 단어 포함 여부 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Response body: Convert XML body to a JSON Object&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;var jsonObject = xml2Json(responseBody);&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;XML을 JSON으로 변환&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #474747;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;Use Tiny Validator for JSON data&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;var schema = {&lt;br class=&quot;jop-noMdConv&quot; /&gt;&quot;items&quot;: {&lt;br class=&quot;jop-noMdConv&quot; /&gt;&quot;type&quot;: &quot;boolean&quot;&lt;br class=&quot;jop-noMdConv&quot; /&gt;}&lt;br class=&quot;jop-noMdConv&quot; /&gt;};&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;var data1 = [true, false];&lt;br class=&quot;jop-noMdConv&quot; /&gt;var data2 = [true, 123];&lt;br class=&quot;jop-noMdConv&quot; /&gt;&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.test(&#39;Schema is valid&#39;, function() {&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.expect(tv4.validate(data1, schema)).to.be.true;&lt;br class=&quot;jop-noMdConv&quot; /&gt;pm.expect(tv4.validate(data2, schema)).to.be.true;&lt;br class=&quot;jop-noMdConv&quot; /&gt;});&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(70, 70, 70); padding: 0.5em 1em;&quot;&gt;&lt;span style=&quot;color: black; font-family: Apple SD Gothic Neo; font-size: small;&quot;&gt;응답 값인 JSON 데이터데 원하는 Schema 여부 확인&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;참고&amp;nbsp;&lt;div&gt;https://m.blog.naver.com/wisestone2007/221393509035&lt;br /&gt;&lt;div&gt;https://learning.postman.com/docs/sending-requests/variables/&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/8329431051172171562/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2020/11/qa-postman-snippets.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8329431051172171562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8329431051172171562'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2020/11/qa-postman-snippets.html' title='[QA] Postman 참고될만한 SNIPPETS'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-671007744408671152</id><published>2020-06-19T16:19:00.001+09:00</published><updated>2020-06-19T16:19:21.208+09:00</updated><title type='text'>신용카드 번호 체계(BIN)와 검증번호</title><content type='html'>&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;신용카드와 체크카드&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;번호는 XXXX-XXXX-XXXX-XXXX 형식으로 4자리씩 총 16자리로 구성된다. 아멕스 신용카드 처럼 일부 카드는 15자리도 있지만&amp;nbsp;대부분은 16자리이다.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;이 중에서&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;span style=&quot;background-color: inherit; font-family: inherit; font-weight: 700;&quot;&gt;앞자리 6개는 국제식별번호이며 BIN (&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;span style=&quot;background-color: inherit; font-family: inherit; font-weight: 700;&quot;&gt;Bank Identification Number) 이라고 부른다.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;span style=&quot;background-color: inherit; font-family: inherit; font-weight: 700;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;국내 신용카드사 전체의 6자리 BIN 넘버를 알고 싶으면, VAN사 자료실에서 찾아보면 된다&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a class=&quot;se_link&quot; href=&quot;https://www.kicc.co.kr/kr/support/pds/van/pds_van_list.jsp?s_menu=4&amp;amp;t_menu=1&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: white; color: rgb(96, 140, 186) !important; cursor: pointer; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot; target=&quot;_blank&quot;&gt;&lt;u style=&quot;background-color: inherit;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: #0066cc;&quot;&gt;https://www.kicc.co.kr/kr/support/pds/van/pds_van_list.jsp?s_menu=4&amp;amp;t_menu=1&lt;/span&gt;&lt;/u&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;a class=&quot;se_link&quot; href=&quot;https://www.ksnet.co.kr/Bbs?ci=NOTICE&amp;amp;c=NOTICE&amp;amp;fi=&amp;amp;fw=&amp;amp;f=ALL&amp;amp;q=BIN&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: white; color: rgb(96, 140, 186) !important; cursor: pointer;&quot; target=&quot;_blank&quot;&gt;&lt;u style=&quot;background-color: inherit;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: #0066cc;&quot;&gt;https://www.ksnet.co.kr/Bbs?ci=NOTICE&amp;amp;c=NOTICE&amp;amp;fi=&amp;amp;fw=&amp;amp;f=ALL&amp;amp;q=BIN&lt;/span&gt;&lt;/u&gt;&lt;/a&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;전세계 BIN 정보는 아래&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: #0066cc;&quot;&gt;&lt;a class=&quot;se_link&quot; href=&quot;https://en.wikipedia.org/wiki/Payment_card_number&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: white; color: rgb(96, 140, 186) !important; cursor: pointer;&quot; target=&quot;_blank&quot;&gt;https://en.wikipedia.org/wiki/Payment_card_number&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer; font-family: &amp;quot;Helvetica Neue&amp;quot;, helvetica, AppleSDGothicNeo, sans-serif; font-size: 16px;&quot;&gt;&lt;u style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); background-color: inherit; color: rgb(96, 140, 186) !important; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/u&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Helvetica Neue, helvetica, AppleSDGothicNeo, sans-serif&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Helvetica Neue, helvetica, AppleSDGothicNeo, sans-serif&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;참고&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://m.blog.naver.com/mumasa/221121389505&quot;&gt;https://m.blog.naver.com/mumasa/221121389505&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/671007744408671152/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2020/06/bin.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/671007744408671152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/671007744408671152'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2020/06/bin.html' title='신용카드 번호 체계(BIN)와 검증번호'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-6440450678725531976</id><published>2017-02-16T00:45:00.000+09:00</published><updated>2017-02-16T00:48:09.518+09:00</updated><title type='text'>HAproxy HA 구성</title><content type='html'>&lt;br /&gt;
HA 구성을 봐야해서 남겨둔다.&lt;br /&gt;
&lt;br /&gt;
물론인터넷에서 가져옴. 문제될까봐 출처도 남겨놓는다.&lt;br /&gt;
&lt;br /&gt;
https://blog.logentries.com/2014/12/keepalived-and-haproxy-in-aws-an-exploratory-guide/&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy는 고가용성 프록시를 의미합니다.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
이름에서도 알 수 있다시피 High Availability proxy 입니다&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
C 언어로 작성되었으며 무료 오픈소스 프로그램입니다.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy는&amp;nbsp;TCP / HTTP 로드 밸런서로 프록시 솔루션에 사용됩니다.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy의 일반적인 용도는 웹서버, DB 서버 등 부하를 분산시키는 용도로 많이 사용되고 있습니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
BSD, 리눅스, 솔라리스 등에서 사용할 수 있으며, 물론 윈도우는 안됩니다. (-0-;)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
(여담이지만, 윈도우는 뭐 다 돈이네요 ;;;)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 환경&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
OS : Ubuntu 16.04.1 LTS&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy : 1.6.7&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
WebServer : Apache/2.4.18 (Ubuntu)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
VM : VirtualBox 5.1.2&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 참고&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
sudo 로 진행하지 않고 root 로 진행합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 준비사항&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
VM 환경에서 진행되며, 로드밸런서이기 때문에&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy 를 설치할 VM 하나, 웹서버 VM 2개를 먼저 준비합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
VM 을 만드는 부분은 여기서 설명하지 않습니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
VM 의 상세 내역은 아래와 같습니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 714px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;background-color: #eaeaea; border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;VM&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #eaeaea; border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); border-top: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;OS&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #eaeaea; border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); border-top: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;IP&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #eaeaea; border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); border-top: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;Hostname&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
HAproxy&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.5&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
HAproxy&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&amp;nbsp;Webserver01&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.15&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
webserver-01&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Webserver02&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.16&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
webserver-02&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
1. Apache 설치&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# apt-get install apache2&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&amp;nbsp; - 모든 VM 에 apache 를 모두 설치합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
2. HAproxy 저장소 등록 및 업데이트&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# apt-add-repository ppa:vbernat/haproxy-1.6&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# apt-get update&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
3. HAproxy 설치&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# apt-get install haproxy&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
4. haproxy.cfg 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/haproxy/haproxy.cfg&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 605px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 604px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
global&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #log /dev/log &amp;nbsp; local0&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #log /dev/log &amp;nbsp; local1 notice&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #ffe400; color: black;&quot;&gt;log 127.0.0.1 local2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chroot /var/lib/haproxy&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats socket /run/haproxy/admin.sock mode 660 level admin&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats timeout 30s&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user haproxy&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; group haproxy&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; daemon&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp;. . .&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위처럼 log 를 주석처리 해주고 log 127.0.0.1 local2 를 입력해 줍니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
5. rsyslog.conf 파일 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/rsyslog.conf&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 603px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 602px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
$ModLoad imudp&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
$UDPServerRun 514&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
파일에 위 부분이 주석처리 되어 있다면 주석을 풀어주시고 없다면 입력해 줍니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
6. haproxy.conf 파일 생성하고 내용 추가&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/rsyslog.d/haproxy.conf&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 602px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 601px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
local2.* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/var/log/haproxy.log&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
7. rsyslog 서비스 재시작&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# service rsyslog restart&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
8. haproxy.cfg 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/haproxy/haproxy.cfg&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 630px; line-height: 1.5; margin: 0px; padding: 0px; width: 784px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
defaults&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log &amp;nbsp; &amp;nbsp; global&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mode &amp;nbsp; &amp;nbsp;http&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option &amp;nbsp;httplog&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option &amp;nbsp;dontlognull&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option &amp;nbsp;http-server-close&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option &amp;nbsp;forwardfor except 127.0.0.0/8&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option &amp;nbsp;redispatch&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retries 3&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout http-request &amp;nbsp; &amp;nbsp;20&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout queue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;86400&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout connect &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;86400&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout client &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 86400&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout server &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 86400&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout http-keep-alive 30&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout check &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxconn &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50000&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
frontend LB&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bind 172.16.1.5:80&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reqadd X-Forwarded-Proto:\ http&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default_backend bkLB&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
backend bkLB&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mode http&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats enable&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats hide-version&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats uri /stats&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats realm Haproxy\ Statistics&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stats auth haproxy:admin&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; balance roundrobin&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option httpchk&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option httpclose&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option forwardfor&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cookie LB insert&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server webserver-01 172.16.1.15:80 cookie webserver-01 check&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server webserver-02 172.16.1.16:80 cookie webserver-02 check&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
10. HAproxy 재시작&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# service haproxy restart&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
11. 시스템 시작시 자동으로 시작하기 위해 파일 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/default/haproxy&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-color: rgb(204, 204, 204); border-style: solid; border-width: 1px; line-height: 1.5; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
ENABLED=1&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
12. 정상적으로 동작하는지 확인하기 위해 웹서버 index.html 를 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
- webserver-01 에서&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# mv /var/www/html/index.html /var/www/html/index.html.backup&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /var/www/html/index.html&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-color: rgb(204, 204, 204); border-style: solid; border-width: 1px; line-height: 1.5; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
webserver-01&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
- webserver-02 에서&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# mv /var/www/html/index.html /var/www/html/index.html.backup&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /var/www/html/index.html&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 784px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
webserver-02&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
13. 로드밸런싱이 되는지 확인&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# curl 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
webserver-01&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# curl 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
webserver-02&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# curl 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
webserver-01&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# curl 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
webserver-02&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 처럼 roundrobin 형식으로 정상적으로 나오는지 확인&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
14. HAproxy 통계 페이지 확인&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
- 웹브라우저에서 172.16.1.5/stats 를 입력&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&amp;nbsp; 로그인 화면에서 haproxy / admin 으로 로그인&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: none; color: #666666; float: none; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px; text-align: center;&quot;&gt;
&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; height: auto; max-width: 100%; width: 820px;&quot;&gt;&lt;img src=&quot;http://cfile10.uf.tistory.com/image/21415739579D694803B0AB&quot; filemime=&quot;image/jpeg&quot; filename=&quot;haproxy.PNG&quot; height=&quot;449&quot; style=&quot;border: 0px none; cursor: pointer; height: auto; max-width: 100%;&quot; width=&quot;820&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 참고&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
hosts 파일 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-color: rgb(204, 204, 204); border-style: solid; border-width: 1px; line-height: 1.5; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
127.0.0.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; localhost&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
127.0.1.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; HAproxy&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
# The following lines are desirable for IPv6 capable hosts&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
::1 &amp;nbsp; &amp;nbsp; localhost ip6-localhost ip6-loopback&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
ff02::1 ip6-allnodes&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
ff02::2 ip6-allrouter&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
172.16.1.15 &amp;nbsp;webserver-01&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
172.16.1.16 &amp;nbsp;webserver-02&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;br style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;
&lt;br style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;spoqa han sans&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;출처:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://livegs.tistory.com/43&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; text-decoration: none;&quot;&gt;http://livegs.tistory.com/43&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;spoqa han sans&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;[if (feel)]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
실제 현업에선 HAproxy 한대로 구성하는 경우는 거의 없습니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
만약 HAproxy 가 장애를 일으켜 죽는 경우가 발생하면&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
그 밑에 있는 웹서버들은 다 죽는 거나 마찬가지기 때문에 리스크가 너무 큽니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
그래서, 이번엔 HAproxy 를 Active - Standby 형식으로 LB Cluster 를 구성해 보겠습니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy 를 HA 구성으로 만들기 위해 keepalived 를 이용하여 구성합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
* Keepalived 란?&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
Keepalived 는 C 언어로 작성되었으며 부하 분산 및 고가용성을 위한&amp;nbsp;라우팅 소프트웨어입니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
VRRP (Virtual Router Redundancy Protocol)&amp;nbsp;프로토콜을 사용합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
VRRP 관련하여 알고 싶으시면&amp;nbsp;&lt;a class=&quot;tx-link&quot; href=&quot;http://spiceandwolf.tistory.com/entry/VRRP-Virtual-Router-Redundancy-Protocol&quot; style=&quot;color: #333333; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;여기&lt;/a&gt;&amp;nbsp;를 확인해 보시기 바랍니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 환경&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
OS : Ubuntu 16.04.1 LTS&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
HAproxy : 1.6.7&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
Keepalived : 1.2.19&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 참고&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
sudo 로 진행하지 않고 root 로 진행합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;b&gt;* 준비사항&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 714px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;background-color: #eaeaea; border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;VM&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #eaeaea; border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); border-top: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;OS&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #eaeaea; border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); border-top: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;IP&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #eaeaea; border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); border-top: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&lt;b&gt;Hostname&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
HAproxy&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.5&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
HAproxy&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
HAproxy2&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.6&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
HAproxyB&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
&amp;nbsp;Webserver01&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.15&lt;/div&gt;
&lt;/td&gt;&lt;td rowspan=&quot;1&quot; style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
webserver-01&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-left: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Webserver02&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 217px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
Ubuntu 16.04.1 LTS 64bit&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 144px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
172.16.1.16&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(204, 204, 204); border-right: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 207px;&quot;&gt;&lt;div style=&quot;padding: 0px; text-align: center;&quot;&gt;
webserver-02&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;HAproxy 에서 설치했던 것과 같이 똑같이 HAproxyB 에도 설치합니다.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;설치하는 방법은 이전 포스팅&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;tx-link&quot; href=&quot;http://livegs.tistory.com/43&quot; style=&quot;color: #333333; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://livegs.tistory.com/43&lt;/a&gt;&amp;nbsp;을 참고해주세요.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
**********************************************************************************************************&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
1. HAproxy 가 설치된 서버의 커널 값을 수정합니다. (두 대 모두 수행)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/sysctl.conf&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-color: rgb(204, 204, 204); border-style: solid; border-width: 1px; line-height: 1.5; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp;net.ipv4.ip_nonlocal_bind=1&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 부분이 중요한 부분인데, 위 옵션이 뭔지 찾아보면&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
로컬 IP 가 아닌 주소에 bind() 할 수 있게 해줍니다. 라고 되어 있는데요. 말이 어려운데요.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
다시 말해서 현재 가지고 있는 IP 가 아닌 다른 외부 IP 를 NIC 에 바인딩 할 수 있게 해준다는 뜻입니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
이게 왜 중요하냐면 서비스인 VIP 를 첫번째 서버가 가지고 있다가 장애가 나는 경우&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
Standby 서버로 그 VIP 를 옮겨야 서비스가 끊기지 않고 돌아갈 수 있기 때문이죠.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
저 옵션이 되어 있지 않은 경우 VIP 를 바인딩 할 수 없기 때문에 꼭 수정해줘야 합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
2. 커널 값 적용 및 확인 (두 대 모두 수행)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# sysctl -p&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# cat /proc/sys/net/ipv4/ip_nonlocal_bind&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 654px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 653px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
1&amp;nbsp;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 처럼 1이 나오면 정상적으로 적용됨.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
안되는 경우 reboot&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
3. Keepalived 설치 (두 대 모두 수행)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# apt-get install keepalived&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
4. keepalived.conf 파일 수정&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# vi /etc/keepalived/keepalived.conf&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
- 첫번째 서버&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 654px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 653px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
global_defs {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;router_id HAproxy&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
# Define the script used to check if haproxy is still working&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
vrrp_script chk_haproxy {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; script &quot;killall -0 haproxy&quot;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interval 2&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; weight 2&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
# Configuration for the virtual interface&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;vrrp_instance VIS_1&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enp0s3&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; state &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MASTER&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; priority &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;101&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; virtual_router_id &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;51&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; advert_int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # The virtual ip address shared between the two loadbalancers&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; virtual_ipaddress {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use the script above to check if we should fail over&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; track_script {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chk_haproxy&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
- 두번째&amp;nbsp;서버&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 654px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); height: 24px; line-height: 1.5; margin: 0px; padding: 0px; width: 653px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
global_defs {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;router_id HAproxyB&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
# Define the script used to check if haproxy is still working&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
vrrp_script chk_haproxy {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; script &quot;killall -0 haproxy&quot;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interval 2&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; weight 2&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
# Configuration for the virtual interface&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;vrrp_instance VIS_1&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; interface &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enp0s3&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; state &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MASTER&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; priority &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;100&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; virtual_router_id &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #ffd8d8; color: black;&quot;&gt;51&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; advert_int &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # The virtual ip address shared between the two loadbalancers&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; virtual_ipaddress {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use the script above to check if we should fail over&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; track_script {&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chk_haproxy&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 처럼 인스턴스 (vrrp_instance VIS_1) 이름은 동일하게 하며 priority 값은 다르게 하여&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
Master 가 내려 갔다 다시 올라오는 경우에 원래대로 Master 에서 VIP 를 가져갈 수 있게 합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 설정 값은 기본 적은 설정으로 자세한 옵션은 상황에 맞게 진행하면 됩니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
더 자세한 내용을 알고 싶으면&amp;nbsp;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.keepalived.org/documentation.html&quot; style=&quot;color: #333333; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;여기&lt;/a&gt;&amp;nbsp;를 참고해 주세요.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
5. keepalived 와 HAproxy 서비스 재시작 (두 대 모두 수행)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# service keepalived restart&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# service haproxy restart&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
6. IP 할당 확인&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# ip addr show&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 명령어로 확인해보면 첫번째 서버의 NIC 에 VIP가 추가로 할당되어 있는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
7. FailOver 확인&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
두 대의 서버가 아닌 서버에서 (같은 네트워크에 있는...) ping 으로 확인해 봅니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# ping 172.16.1.5&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
수행 후 첫번 째 서버를 halt 내지는 poweroff 를 해봅니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; font-size:13px=&quot;&quot; sans-serif=&quot;&quot; style=&quot;background-color: white; border-collapse: collapse; border: none; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; width: 784px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-color: rgb(204, 204, 204); border-style: solid; border-width: 1px; line-height: 1.5; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
64 bytes from 192.168.25.203: icmp_seq=221 ttl=64 time=0.291 ms&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
64 bytes from 192.168.25.203: icmp_seq=222 ttl=64 time=0.297 ms&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
64 bytes from 192.168.25.203: icmp_seq=223 ttl=64 time=0.242 ms&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
64 bytes from 192.168.25.203: icmp_seq=224 ttl=64 time=0.286 ms&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
64 bytes from 192.168.25.203: icmp_seq=225 ttl=64 time=0.151 ms&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
64 bytes from 192.168.25.203: icmp_seq=226 ttl=64 time=0.270 ms&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
...&lt;/div&gt;
&lt;div style=&quot;padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
위 처럼 ping 이 가다가 잠시 순단 현상이 발생할 수 있으나 계속 ping 이 나간다면&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
정상적으로 failover 됨을 알 수 있습니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
실제 두번째 서버에 가서&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; padding: 0px;&quot;&gt;
# ip addr show 를 해보면 VIP 인 172.16.1.5 가 NIC 에 바인딩 되어 있음을 확인할 수 있습니다.&lt;/div&gt;
&lt;br style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;
&lt;br style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;spoqa han sans&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;출처:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://livegs.tistory.com/44&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Spoqa Han Sans&amp;quot;, sans-serif; font-size: 14px; text-decoration: none;&quot;&gt;http://livegs.tistory.com/44&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;spoqa han sans&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;[if (feel)]&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/6440450678725531976/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2017/02/haproxy-ha.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6440450678725531976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6440450678725531976'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2017/02/haproxy-ha.html' title='HAproxy HA 구성'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-7105785412300768611</id><published>2017-02-03T09:28:00.002+09:00</published><updated>2017-02-03T09:57:28.724+09:00</updated><title type='text'>[VBS] LNK 파일 만들기 </title><content type='html'>VBS로 숏컷 만들기&lt;br /&gt;
&lt;br /&gt;
LNK 파일을 만들려고 하니 귀찬음. 자동화를 위해서는 스크립트를 만들어야 해서 작성함.&lt;br /&gt;
&lt;br /&gt;
시나리오는 C:\TEST\TEST.TXT 파일을 C:\TEST 디랙토리에 test.LNK 파일을 만든다.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;Set oWS = WScript.CreateObject(&quot;WScript.Shell&quot;)
sLinkFile = &quot;C:\test\test.LNK&quot;
Set oLink = oWS.CreateShortcut(sLinkFile)
    oLink.TargetPath = &quot;C:\test\test.txt&quot;
 &#39;  oLink.Arguments = &quot;&quot;
 &#39;  oLink.Description = &quot;MyProgram&quot;   
 &#39;  oLink.HotKey = &quot;ALT+CTRL+F&quot;
 &#39;  oLink.IconLocation = &quot;C:\test\test.txt, 2&quot;
 &#39;  oLink.WindowStyle = &quot;1&quot;   
 &#39;  oLink.WorkingDirectory = &quot;C:\test\&quot;
oLink.Save&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
또는 CMD로 만들어서 할수도있다는 바탕화면에 notepad.exe 숏컷을 만드는 예제.&lt;br /&gt;
&lt;pre style=&quot;background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;@echo off
echo Set oWS = WScript.CreateObject(&quot;WScript.Shell&quot;) &amp;gt; CreateShortcut.vbs
echo sLinkFile = &quot;%HOMEDRIVE%%HOMEPATH%\Desktop\Hello.lnk&quot; &amp;gt;&amp;gt; CreateShortcut.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) &amp;gt;&amp;gt; CreateShortcut.vbs
echo oLink.TargetPath = &quot;C:\Windows\notepad.exe&quot; &amp;gt;&amp;gt; CreateShortcut.vbs
echo oLink.Save &amp;gt;&amp;gt; CreateShortcut.vbs
cscript CreateShortcut.vbs
del CreateShortcut.vbs
&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/7105785412300768611/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2017/02/vbs-lnk.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/7105785412300768611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/7105785412300768611'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2017/02/vbs-lnk.html' title='[VBS] LNK 파일 만들기 '/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-6188418467395631010</id><published>2016-12-28T22:58:00.002+09:00</published><updated>2016-12-28T22:58:30.343+09:00</updated><title type='text'>python 2.7 한글문제</title><content type='html'>파이썬을 이용해서 작성할때 한글문제가 매번 생김.&lt;br /&gt;
&lt;br /&gt;
2.7버전을 이용할경우 아래와 같이 변경해주면 일부 &amp;nbsp;해결됨.&lt;br /&gt;
&lt;br /&gt;
ascii 로 되어 있는 부분을 utf-8 로 변경해줌&lt;br /&gt;
&lt;br /&gt;
sed -i &#39;s/encoding = &quot;ascii&quot;/encoding = &quot;utf-8&quot;/g&#39; site.py&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/6188418467395631010/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/12/python-27.html#comment-form' title='2개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6188418467395631010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6188418467395631010'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/12/python-27.html' title='python 2.7 한글문제'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-6465849075819485517</id><published>2016-12-13T21:29:00.004+09:00</published><updated>2016-12-13T21:36:17.423+09:00</updated><title type='text'>[debian] Debian 패키지 만들기</title><content type='html'>데비안 패키지를 만드는 방법을 정리하려고 합니다.&lt;br /&gt;
&lt;br /&gt;
왜 자꾸 까먹으니까~ 까먹지 않기위해 정리합니다.&lt;br /&gt;
&lt;br /&gt;
최종 결과물은 &amp;nbsp;linux의 커널 버전과 linux &amp;nbsp;버전을 확인하는 스크립트를 설치하는 패키지를 만드는 것입니다.&lt;br /&gt;
&lt;br /&gt;
먼져 커널버전과 패키지버전을 확인 하는 스크립트는 아래와 같습니다.&lt;br /&gt;
&lt;br /&gt;
파일명 : linuxversion&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#$/bin/bash
echo &quot;------------------------&quot;
echo &quot;Linux Version : &quot;
echo &quot;------------------------&quot;
grep . /etc/*-release
echo &quot;Linux Version : &quot;
cat /etc/*-release | uniq
grep . /etc/issue*
uname -r
echo &quot;------------------------&quot;
echo &quot;Kernel Version :&quot;
echo &quot;------------------------&quot;
cat /proc/version
&lt;/pre&gt;
&lt;br /&gt;
그럼 시작해보겠습니다.&lt;br /&gt;
&lt;br /&gt;
최종 결과물의 디렉토리 구조는 아래와 같습니다.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
|-- linuxversion&lt;br /&gt;
| &amp;nbsp; |-- DEBIAN&lt;br /&gt;
| &amp;nbsp; | &amp;nbsp; `-- control&lt;br /&gt;
| &amp;nbsp; `-- usr&lt;br /&gt;
| &amp;nbsp; &amp;nbsp; &amp;nbsp; `-- bin&lt;br /&gt;
| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `-- linuxversion&lt;br /&gt;
`-- linuxversion_1.3.4_all.deb&lt;br /&gt;
&lt;br /&gt;
1. linuxversion 디랙토리 생성&lt;br /&gt;
mkdir -p linuxversion&lt;br /&gt;
&lt;br /&gt;
2.Debian 디랙토리 생성&lt;br /&gt;
mkdir -p linuxversion/DEBIAN&lt;br /&gt;
&lt;br /&gt;
3. 디랙토리 권한설정&lt;br /&gt;
&lt;pre class=&quot;SCREEN&quot; style=&quot;background-color: #e0e0e0; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; overflow: auto; white-space: pre-wrap;&quot;&gt;find ./linuxversion -type d | xargs chmod 755   # this is necessary on Debian Woody, don&#39;t ask me why&lt;/pre&gt;
&lt;br /&gt;
4.usr/bin 디랙토리 생성&lt;br /&gt;
mkdir -p .usr/bin&lt;br /&gt;
&lt;br /&gt;
5. 스크립트 파일생성&lt;br /&gt;
&lt;pre&gt;#$/bin/bash
echo &quot;------------------------&quot;
echo &quot;Linux Version : &quot;
echo &quot;------------------------&quot;
grep . /etc/*-release
echo &quot;Linux Version : &quot;
cat /etc/*-release | uniq
grep . /etc/issue*
uname -r
echo &quot;------------------------&quot;
echo &quot;Kernel Version :&quot;
echo &quot;------------------------&quot;
cat /proc/version
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
5-1 실행권한을 줍니다.&lt;br /&gt;
&lt;br /&gt;
chmod&amp;nbsp;+x linuxversion&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
6. control 파일생성&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
cd linuxversion/DEVIAN&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
vi control&lt;/div&gt;
&lt;div&gt;
---------------------------&lt;/div&gt;
&lt;div&gt;
Package: linuxversion&lt;/div&gt;
&lt;div&gt;
Version: 1.3.4&lt;/div&gt;
&lt;div&gt;
Section: devel&lt;/div&gt;
&lt;div&gt;
Priority: optional&lt;/div&gt;
&lt;div&gt;
Architecture: all&lt;/div&gt;
&lt;div&gt;
Depends: curl&lt;/div&gt;
&lt;div&gt;
Recommends:&lt;/div&gt;
&lt;div&gt;
Maintainer: Developers &amp;lt;kwangmyung.kim@gmail.com&amp;gt;&lt;/div&gt;
&lt;div&gt;
Homepage: http://xmlangel.blogspot.com&lt;/div&gt;
&lt;div&gt;
Description: linuxversion check install package&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;1.0.1 : bug fetch..#1&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;1.1.1 : bug fetch..#2&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;1.2.0 : bug fetch..#3&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
-------------------------------&lt;/div&gt;
&lt;br /&gt;
7. 빌드&lt;br /&gt;
&lt;br /&gt;
dpkg-deb --build linuxversion&lt;br /&gt;
&lt;br /&gt;
8. 이름변경 (버전구분을 위해 이름을 변경해줍니다.)&lt;br /&gt;
mv linuxversion.deb inuxversion_1.3.4_all.deb&lt;br /&gt;
&lt;br /&gt;
9. 설치&lt;br /&gt;
dpkg -i linuxversion_1.3.4_all.deb&lt;br /&gt;
&lt;br /&gt;
10. 실행&lt;br /&gt;
&lt;br /&gt;
linuxversion&lt;br /&gt;
------------------------&lt;br /&gt;
Linux Version :&lt;br /&gt;
------------------------&lt;br /&gt;
/etc/lsb-release:DISTRIB_ID=Ubuntu&lt;br /&gt;
/etc/lsb-release:DISTRIB_RELEASE=14.04&lt;br /&gt;
/etc/lsb-release:DISTRIB_CODENAME=trusty&lt;br /&gt;
/etc/lsb-release:DISTRIB_DESCRIPTION=&quot;Ubuntu 14.04.5 LTS&quot;&lt;br /&gt;
/etc/os-release:NAME=&quot;Ubuntu&quot;&lt;br /&gt;
/etc/os-release:VERSION=&quot;14.04.5 LTS, Trusty Tahr&quot;&lt;br /&gt;
/etc/os-release:ID=ubuntu&lt;br /&gt;
/etc/os-release:ID_LIKE=debian&lt;br /&gt;
/etc/os-release:PRETTY_NAME=&quot;Ubuntu 14.04.5 LTS&quot;&lt;br /&gt;
/etc/os-release:VERSION_ID=&quot;14.04&quot;&lt;br /&gt;
/etc/os-release:HOME_URL=&quot;http://www.ubuntu.com/&quot;&lt;br /&gt;
/etc/os-release:SUPPORT_URL=&quot;http://help.ubuntu.com/&quot;&lt;br /&gt;
/etc/os-release:BUG_REPORT_URL=&quot;http://bugs.launchpad.net/ubuntu/&quot;&lt;br /&gt;
Linux Version :&lt;br /&gt;
DISTRIB_ID=Ubuntu&lt;br /&gt;
DISTRIB_RELEASE=14.04&lt;br /&gt;
DISTRIB_CODENAME=trusty&lt;br /&gt;
DISTRIB_DESCRIPTION=&quot;Ubuntu 14.04.5 LTS&quot;&lt;br /&gt;
NAME=&quot;Ubuntu&quot;&lt;br /&gt;
VERSION=&quot;14.04.5 LTS, Trusty Tahr&quot;&lt;br /&gt;
ID=ubuntu&lt;br /&gt;
ID_LIKE=debian&lt;br /&gt;
PRETTY_NAME=&quot;Ubuntu 14.04.5 LTS&quot;&lt;br /&gt;
VERSION_ID=&quot;14.04&quot;&lt;br /&gt;
HOME_URL=&quot;http://www.ubuntu.com/&quot;&lt;br /&gt;
SUPPORT_URL=&quot;http://help.ubuntu.com/&quot;&lt;br /&gt;
BUG_REPORT_URL=&quot;http://bugs.launchpad.net/ubuntu/&quot;&lt;br /&gt;
/etc/issue:Ubuntu 14.04.5 LTS \n \l&lt;br /&gt;
/etc/issue.net:Ubuntu 14.04.5 LTS&lt;br /&gt;
4.4.0-53-generic&lt;br /&gt;
------------------------&lt;br /&gt;
Kernel Version :&lt;br /&gt;
------------------------&lt;br /&gt;
Linux version 4.4.0-53-generic (buildd@lgw01-18) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #74~14.04.1-Ubuntu SMP Fri Dec 2 03:43:31 UTC 2016&lt;br /&gt;
&lt;br /&gt;
설치한 패키지는&lt;br /&gt;
&lt;br /&gt;
usr/bin 에 liunxversion 에 설치가 됩니다.&lt;br /&gt;
&lt;br /&gt;
ls -al /usr/bin | grep linuxversion&lt;br /&gt;
-rwxr-xr-x &amp;nbsp;1 root &amp;nbsp; root &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;306 Dec 13 11:11 linuxversion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11 삭제&lt;br /&gt;
삭제는 &amp;nbsp;dpkg 명령으로 삭제합니다.&lt;br /&gt;
&lt;br /&gt;
dpkg -r linuxversion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/6465849075819485517/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/12/debian-debian.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6465849075819485517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6465849075819485517'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/12/debian-debian.html' title='[debian] Debian 패키지 만들기'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-8904954634699705396</id><published>2016-12-11T01:07:00.003+09:00</published><updated>2016-12-30T19:02:33.848+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>[R] 처음으로 해보는 R(1)</title><content type='html'>R을 해보려고 한다.&lt;br /&gt;
검색을 해보니 https://www.datacamp.com/home 를 추천해준다.&lt;br /&gt;
&lt;div dir=&quot;ltr&quot;&gt;
추천해준데로 따라해 보려고 한다.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
가입을 하고 처음으로 해보는 R을 따라 해보겠다.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
웹에서 따라하라는데로 다 따라하면 될듯.&lt;/div&gt;
&lt;h3&gt;
1. How it works&lt;/h3&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;첫코스는 주석과 더하기를 가지고 어떻게 사용하는지 설명을 하고있다.&lt;/div&gt;
우측에 에디터창이 나오고 왼쪽에 설명이 나온다. 하라는데로 내용을 입력하고 Summit 을 누르니 다음으로 넘어간다.&lt;br /&gt;
&lt;div dir=&quot;ltr&quot;&gt;
script.R&lt;br /&gt;# Calculate 3 + 4&lt;br /&gt;3 + 4&lt;/div&gt;
# Calculate 6 + 12&lt;br /&gt;6 + 12&lt;br /&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;Result&lt;br /&gt;&amp;gt; # Calculate 3 + 4&lt;br /&gt;&amp;gt; 3 + 4&lt;br /&gt;[1] 7&lt;br /&gt;&amp;gt; &lt;br /&gt;&amp;gt; # Calculate 6 + 12&lt;br /&gt;&amp;gt; 6+ 12&lt;br /&gt;[1] 18&lt;br /&gt;&amp;gt;&lt;/div&gt;
&lt;h3&gt;
2. Arithmetic with R&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Addition:&amp;nbsp;&lt;code&gt;+&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Subtraction:&amp;nbsp;&lt;code&gt;-&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Multiplication:&amp;nbsp;&lt;code&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Division:&amp;nbsp;&lt;code&gt;/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Exponentiation:&amp;nbsp;&lt;code&gt;^&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Modulo:&amp;nbsp;&lt;code&gt;%%&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div dir=&quot;ltr&quot;&gt;
R에서 제공되는 산술연산을 해보는것 같다. 제공하는것은 위와 같은것들으 제공한다.&lt;/div&gt;
제곱(Exponentiation) 예제와 나머지 예제를 통해 연산어떤 연산들이 있는지 보여주는것 같다. 또 하라는데로 하니 통과&lt;br /&gt;
&lt;div dir=&quot;ltr&quot;&gt;
script.R&lt;br /&gt;# An addition&lt;br /&gt;5 + 5&lt;/div&gt;
# A subtraction&lt;br /&gt;5 - 5&lt;br /&gt;
# A multiplication&lt;br /&gt;3 * 5&lt;br /&gt;
# A division&lt;br /&gt;(5 + 5) / 2&lt;br /&gt;
&lt;div dir=&quot;ltr&quot;&gt;
# Exponentiation&lt;br /&gt;2 ^ 5&lt;br /&gt;# Modulo&lt;br /&gt;28 %% 6&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
Result&lt;br /&gt;&amp;gt; # An addition&lt;br /&gt;&amp;gt; 5 + 5 &lt;br /&gt;[1] 10&lt;br /&gt;&amp;gt; &lt;br /&gt;&amp;gt; # A subtraction&lt;br /&gt;&amp;gt; 5 - 5 &lt;br /&gt;[1] 0&lt;br /&gt;&amp;gt; &lt;br /&gt;&amp;gt; # A multiplication&lt;br /&gt;&amp;gt; 3 * 5&lt;br /&gt;[1] 15&lt;br /&gt;&amp;gt; &lt;br /&gt;&amp;gt;  # A division&lt;br /&gt;&amp;gt; (5 + 5) / 2 &lt;br /&gt;[1] 5&lt;br /&gt;&amp;gt; &lt;br /&gt;&amp;gt; # Exponentiation&lt;br /&gt;&amp;gt; 2 ^ 5&lt;br /&gt;[1] 32&lt;br /&gt;&amp;gt; # Modulo&lt;br /&gt;&amp;gt; 28 %% 6&lt;br /&gt;[1] 4&lt;br /&gt;&amp;gt;&lt;/div&gt;
&lt;h3&gt;
3.Variable assignment&lt;/h3&gt;
&lt;div dir=&quot;ltr&quot;&gt;
다음으로 변수할당을 어떻게 하는지 해보았다.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
변수할당은 변수명을 지정해주고 &amp;lt;- 식으로 지정해주면된다.&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;my_var &amp;lt;- 4&lt;/code&gt;&lt;/pre&gt;
&lt;div dir=&quot;ltr&quot;&gt;
결과를 보려면 변수명을 입력해주면된다.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;# Assign the value 42 to x&lt;br /&gt;x &amp;lt;- 42&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
# Print out the value of the variable x&lt;br /&gt;x&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
Result&lt;br /&gt;&amp;gt; # Assign the value 42 to x&lt;br /&gt;&amp;gt; x &amp;lt;- 42&lt;br /&gt;&amp;gt; &lt;br /&gt;&amp;gt; # Print out the value of the variable x&lt;br /&gt;&amp;gt; x&lt;br /&gt;[1] 42&lt;br /&gt;&amp;gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
하라는데로 42를 입력해주면 통과&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/8904954634699705396/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/12/r-r.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8904954634699705396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8904954634699705396'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/12/r-r.html' title='[R] 처음으로 해보는 R(1)'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-9121641900434980998</id><published>2016-09-18T21:03:00.000+09:00</published><updated>2016-09-18T21:03:25.044+09:00</updated><title type='text'>Mac OS X에 Oracle Instant Client 설치하여 SQL*Plus 사용하기[펌]</title><content type='html'>http://blog.saltfactory.net/database/install-oracle-instant-client-on-mac-osx.html 에서 가져옴&lt;br /&gt;
&lt;br /&gt;
&lt;header style=&quot;background-color: white; border: 0px; color: #21272d; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica-Neue, helvetica, sans-serif; font-size: 14px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 14px; margin: 0px 0px 50px; padding: 0px; text-rendering: optimizeLegibility; vertical-align: baseline;&quot;&gt;&lt;h1 style=&quot;border: 0px; font-size: 40px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 20px 0px 0px; padding: 0px; vertical-align: baseline; word-break: break-word;&quot;&gt;
Mac OS X에 Oracle Instant Client 설치하여 SQL*Plus 사용하기&lt;/h1&gt;
&lt;/header&gt;&lt;div class=&quot;text&quot; id=&quot;js-post-content&quot; style=&quot;background-color: white; border: 0px; color: #21272d; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica-Neue, helvetica, sans-serif; font-size: 18px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 1.7em; margin: 0px; max-width: 100%; padding: 0px; text-align: center; text-rendering: optimizeLegibility; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;h2 id=&quot;section&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
서론&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oralce에서는 Mac을 위한 공식적은 DBMS 설치 파일을 제공하지 않는다. 하지만 Instant Client를 제공하고 있기 때문에 Oracle 데이터베이스 프로그램을 하기 위해서는 Mac용&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Oracle Instance Client&lt;/strong&gt;를 설치해야한다. 이번 포스트에서는 Mac에서 Oracle Instance Client를 설치하여&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SQL*Plus&lt;/strong&gt;를 사용하는 방법에 대해 소개한다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;oracle&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/29e675bd-ea14-4d16-ac69-e99cb27d34d9&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
개발용으로 맥(Mac OS X)은 더 없이 훌륭한 랩탑이다. 유닉스 기반의 운영체제이기 때문에 서버 프로그램과 클라이언트 프로그램을 동시에 작업하거나 테스트할 수 있기 때문이다. 맥은 대부분의 웹 서버와 데이터베이스를 설치해서 개발할 수 있다. 대부분 벤더에서 Mac 용 버전을 개발하고 배포하고 있는데 Oracle은 Databsae를 공식적으로 Windows와 Linux 플랫폼을 Mac용은 지원하지 않는다. 다만 Mac에서 Oracle Database에 접근할 수 있는 client를 지원 하고 있다. (물론 VM을 설치해서 사용은 가능하지만 이것은 논외로 생각한다.). Oracle Instant Client는 Oracle Database에 접근할 수 있는 sqlplus 를 지원하고 있을 뿐만 아니라, Oracle 기반 Application을 개발할 때 특별히 수정해서 소스를 재 컴파일할 필요 없고 적은 용량의 디스크에서도 바로 사용할 수 있게 경량으로 프로그램과 라이브러리를 담고 있는 패키지이다.&lt;/div&gt;
&lt;blockquote style=&quot;border-left-color: rgb(85, 172, 238); border-left-style: solid; border-width: 0px 0px 0px 4px; font-family: inherit; font-size: 23px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 42px 10px; padding: 0px 0px 0px 20px; quotes: none; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
다시 한번 언급하지만 이 포스팅은 Oracle Database를 Mac에 설치하는 것이 아니라, 원격에 있는 Oracle Database에 접근할 수 있는 Mac용 Oracle instant client의 설치에 대해서 소개한다.&lt;/div&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;oracle-instant-client-&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oracle instant client 다운로드&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oracle의 instant client 다운로드는 다음에서 제공한다. http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
다양한 플랫폼을 지원하고 있지만 우리는 Mac 에 설치할 것이기 때문에 Instant Client for Mac OS X (Intel x86)(32-bit and 64-bit) 를 선택한다. Mac OS X은 PPC, 32-bit, 64-bit 버전이 있기 때문에 자신이 어떤 운영체제를 사용하고 있는지 잘 확인하고 다운로드 한다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
만약 Mac의 운영체제가 몇 비트인지 알고 싶으면 uname -a 를 사용하여 확인이 가능하다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;uname -a
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;uname&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/b7ef9c33-8226-4b49-87d9-fd3afb93a5d2&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Mac OS X가&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;64-bit&lt;/strong&gt;&amp;nbsp;운영체제일 경우&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;RELEASE_X86_64 x86_64&lt;/strong&gt;가 나타날 것이고,&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;32-bit&lt;/strong&gt;&amp;nbsp;일 경우&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;RELEASE_I386 i386&lt;/strong&gt;으로 나타난다. 이 글을 포스팅할 때 Oralce instant client의 가장 최근 버전은 Version 11.2.0.4.0(64-bit) 이다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
필요한 파일을 모두 다운로드 받은 후 특정 경로로 이동한다. 관리의 편리성을 위해서&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;/Projects/Servers/Libraries/Oracle/instantclient_11_2&lt;/code&gt;&amp;nbsp;에 다운로드 받은 모든 파일을 이동시켰다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;instantclient directory&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/30a9bdd0-eabc-48ec-af7d-6d2c54e97f7b&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;h2 id=&quot;section-1&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
시스템 환경변수 추가&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oracle instant client 파일을 모두 다운받은 후 특정 경로로 이동시킨 이후에는 환경변수를 설정하는 작업을 한다.&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;$HOME/.bash_profile&lt;/code&gt;을 열어서 다음과 같이 Oracle 환경 변수를 추가한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;vi ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;&lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #4d4d4c; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DYLD_LIBRARY_PATH&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #51bac8; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #46ad55; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/Projects/Libraries/Oracle/instantclient_11_2&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #4d4d4c; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TNS_ADMIN&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #51bac8; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #46ad55; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/Projects/Libraries/Oracle/instantclient_11_2&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #4d4d4c; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ORACLE_HOME&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #51bac8; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #46ad55; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/Projects/Libraries/Oracle/instantclient_11_2&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #4d4d4c; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OCI_LIB&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #51bac8; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #46ad55; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/Projects/Libraries/Oracle/instantclient_11_2&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #4d4d4c; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OCI_INCLUDE_DIR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #51bac8; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #46ad55; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;/Projects/Libraries/Oracle/instantclient_11_2/sdk/include&quot;&lt;/span&gt;

&lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #4d4d4c; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #51bac8; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$DYLD_LIBRARY_PATH&lt;/span&gt;:&lt;span class=&quot;nv&quot; style=&quot;border: 0px; color: #c82829; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;$PATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;$HOME/.bash_profile&lt;/code&gt;에 환경변수를 추가한 다음 .bash_profile을 시스템에 적용하기 위해서&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;source&lt;/code&gt;를 실행한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;source ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oracle instant client는 특별한 소스 컴파일 없이 바이너리 파일을 다운로드 받아서 환경설정만 해주면 바로 사용할 수 있다.&lt;/div&gt;
&lt;h2 id=&quot;sqlplus-&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
SQL*Plus 사용&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oracle 데이터베이스에 접근하기 위해서는&amp;nbsp;&lt;a href=&quot;http://docs.oracle.com/cd/B28359_01/server.111/b31189/toc.htm&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;SQL*Plus&lt;/a&gt;를 사용하면 되는데 이것은 우리가 다운로드 받은 Oracle instant client에 안에 들어있다.&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SQL*PLus&lt;/strong&gt;를 이용해서 서버에 접근하는 방법은 보통&amp;nbsp;&lt;a href=&quot;http://docs.oracle.com/cd/B28359_01/network.111/b28317/tnsnames.htm&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;Local Naming Parameters&lt;/a&gt;를 저장하는&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;tnsnames.ora&lt;/code&gt;&amp;nbsp;파일을 사용해서 사용하는데 Oracle instant를 다운 받은 파일에는 이 파일이 존재하지 않는다. sqlplus를 이용할때&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;tnsnames.ora&lt;/code&gt;&amp;nbsp;파일이 없어도 Oracle에 접근할 수 있는데 방법은 다음과 같다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sqlplus {계정}/{비밀번호}@{파리미터}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
자세히 살펴보면 다음과 같다. 다음 정보를 이용해서 원격에 있는 Oracle로 접속을 할 수 있다. Oracle은 서버에 설치할 때 설치 정보로 다음과 같은 정보를 필수로 가진다.&lt;/div&gt;
&lt;ul style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; list-style: circle; margin: 0px 0px 30px; padding: 0px 20px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;호스트이름&lt;/strong&gt;&amp;nbsp;: Oracle DBMS가 설치되어 있는 서버이름 또는 IP&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;포트번호&lt;/strong&gt;&amp;nbsp;: 디폴트 값은 1521&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;서비스아이디&lt;/strong&gt;&amp;nbsp;: 같은 호스트에서 서비스의 구분을 위해서 설정하는 SID가 있다, Oracle 라이센스가 없는 일반 학생일 경우는 Oracle Express 버전을 사용할 것이고 디폴트 값은 XE 이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sqlplus {계정}/{비밀번호}@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=호스트이름 또는 아이피)(PORT=포트번호))(CONNECT_DATA=(SID=서비스아이디)))
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sqlplus tutorial/tutorial@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.0.123)(Port=1521))(CONNECT_DATA=(SID=XE)))
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
아래는 위의 sqlplus 를 이용해서 Oracle에 접속한 결과이다. 우리가 사용한 Oracle instant client의 SQL*Plus는 11.2.0.4.0 버전이고 서버에는 Oracle Database 10g Express Edition Release 10.2.0.1.0이 설치되어 있다는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;sqlplus connect&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/c2a161af-17e4-4f45-9a23-586f02f9ec25&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;h2 id=&quot;oid--&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
OID 에러 해결&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
위와 동일하게 진행했는데 만약 다음과 같이&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OID 에러&lt;/strong&gt;가 발생하는 경우가 있을 것이다.&amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index-082035.html&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;OID&lt;/a&gt;는&lt;a href=&quot;http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index-082035.html&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;Oracle Internet Directory&lt;/a&gt;를 말하는 것으로&amp;nbsp;&lt;a href=&quot;http://www.oracle.com/us/products/middleware/overview/index.html&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;Oracle Fusion Middleware&lt;/a&gt;의&amp;nbsp;&lt;a href=&quot;http://docs.oracle.com/cd/E27559_01/integration.1112/e27123/topology.htm&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;Tier Identity Management Oracle Internet Directory&lt;/a&gt;의 표준이다. OID는&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;LDAP3&lt;/a&gt;(Light weight Directory Access Protocol)로 구현이 되어 있고 Microsoft의 Active Directory의 Oracle 버전이라 생각하면 된다. 이때 OID는 호스트 validation을 체크하는데&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;/etc/hosts&lt;/code&gt;에&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;hostname&lt;/code&gt;이 없으면 OID에러를 발생한다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;oid error&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/2e171f0e-beee-4730-a15f-0ed7a385e2e0&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Oracle instant client 10.x 버전에는 발생하지 않았는데 Oracle instant client 11.x 버전부터 OID 에리거 발생을 하는데 이럴 경우&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;/etc/hosts&lt;/code&gt;&amp;nbsp;파일에 현재 자신의 컴퓨터의 hostname을 추가한다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
먼저 자신의 hostname을 살펴본다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;hostname
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;hostname&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/4873bcb1-79a0-4373-9c88-33959da1bfe6&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
현재 사용하고 있는 Mac의 hostname은 saltfactory이다. 이젠&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;/etc/hosts&lt;/code&gt;&amp;nbsp;파일을 열어서 다음과 같이&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;hostname&lt;/code&gt;을 추가한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sudo vi /etc/hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost saltfactory
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이렇게&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;/etc/hosts&lt;/code&gt;에&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;hostname&lt;/code&gt;을 추가한뒤 다시&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sqlplus&lt;/code&gt;를 사용해서 oracle에 접속하면 OID 에러 없이 접속할 수 있는 것을 확인할 수 있다.&lt;/div&gt;
&lt;h2 id=&quot;tnsnamesora-&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
tnsnames.ora 사용&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
tnsnames.ora 파일은 Oracle client나 Application에서 Oracle에 접근하기 위한 Local Naming Parameters를 가지고 있는 파일이다. 이 파일을 사용하면 위에서 tnsnames를 사용하지 않은 sqlplus 접속 할때의 긴 파라미터를 간단하게 이름으로 대처할 수 있다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
우선 우리가&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;TNS_ADMIN&lt;/code&gt;으로 환경설정한 경로로 이동한다.(우리는 편의상&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;$ORACLE_HOME&lt;/code&gt;과&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;$TNS_ADMIN&lt;/code&gt;&amp;nbsp;경로를 같이 설정했다.)&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;cd $TNS_ADMIN
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이제 다음 내용을 가지고 tnsnames.ora 파일을 만든다. 우리는 TestServer라는 이름에 다음 설정을 추가한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;TestServer =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.123)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = XE)
    )
  )
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이렇&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;tnsnames.ora&lt;/code&gt;&amp;nbsp;파일을 작성했으면&amp;nbsp;&lt;code class=&quot;highlighter-rouge&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px 5px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sqlplus&lt;/code&gt;를 이용해서 다음과 같이 사용할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;sqlplus tutorial/tutorial@TestServer
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&quot;section-2&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
결론&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이 포스팅은 Mac 운영체제 안에서 다른 원격지에 있는 Oracle 데이터베이스에 접근하기 위해서 Oracle instant client를 설치하는 방법을 소개했다. Oracle instant client의 sqlplus와 tnsname을 설정해서 데이터베이스에 접근하는 소개를 했는데 Oracle instant client는 sqlplus 이외에 다양한 라이브러리가 들어 있어 웹 프로그램이나 기타 어플리케이션을 만들 때 반드시 필요한 라이브러리들도 포함이 되어 있다. 이에 대한 사용법과 설명은 다른 포스팅에서 소개를 할 기회가 있을 것이다. MySQL이나 SQLite처럼 Mac에서 Oracle을 바로 설치해서 개발하면 참 좋겠지만 공식적으로 Oracle은 Mac 버전을 지원하지 않고 Oracle instant client만을 제공하고 있다. 앞으로 Oracle 기반 어플리케이션 개발을 하기 위해서는 Oracle instant client는 반드시 필요하기 때문에 이 포스팅으로 간단하게 설치방법과 sqlplus를 이용해서 Oracle에 접속하는 방법을 소개했다.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/9121641900434980998/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/09/mac-os-x-oracle-instant-client-sqlplus.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/9121641900434980998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/9121641900434980998'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/09/mac-os-x-oracle-instant-client-sqlplus.html' title='Mac OS X에 Oracle Instant Client 설치하여 SQL*Plus 사용하기[펌]'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-6634377100338766588</id><published>2016-09-14T23:34:00.001+09:00</published><updated>2016-09-14T23:34:18.099+09:00</updated><title type='text'>MySQL에서 사용하는 Lock 이해</title><content type='html'>&lt;article class=&quot;&quot; role=&quot;main&quot; style=&quot;border: 0px; font-stretch: inherit; font-variant-numeric: inherit; margin: 65px auto 0px; max-width: 680px; padding: 0px 30px; vertical-align: baseline;&quot;&gt;&lt;header style=&quot;border: 0px; font-stretch: inherit; font-variant-numeric: inherit; margin: 0px 0px 50px; padding: 0px; text-rendering: optimizeLegibility; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #21272d; font-family: Open Sans, Helvetica Neue, Helvetica-Neue, helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 14px;&quot;&gt;http://blog.saltfactory.net/database/introduce-mysql-lock.html 에서 퍼옴&lt;/span&gt;&lt;/span&gt;&lt;/header&gt;&lt;header style=&quot;border: 0px; font-stretch: inherit; font-variant-numeric: inherit; margin: 0px 0px 50px; padding: 0px; text-rendering: optimizeLegibility; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #21272d; font-family: Open Sans, Helvetica Neue, Helvetica-Neue, helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;h1 style=&quot;border: 0px; color: #21272d; font-family: inherit; font-size: 40px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.2em; margin: 20px 0px 0px; padding: 0px; vertical-align: baseline; word-break: break-word;&quot;&gt;
MySQL에서 사용하는 Lock 이해&lt;/h1&gt;
&lt;/header&gt;&lt;div class=&quot;text&quot; id=&quot;js-post-content&quot; style=&quot;border: 0px; color: #21272d; font-family: inherit; font-size: 18px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.7em; margin: 0px; max-width: 100%; padding: 0px; text-align: center; text-rendering: optimizeLegibility; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;h2 id=&quot;section&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
서론&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
운영체제에서 공유하고 있는 리소스의 접근을 경쟁하는 것을 제어하기 위해서 Lock이라는 개념을 사용한다. 데이터베이스도 리소스의 접근을 제어하기 위해서 Lock이라는 개념을 사용한다. Lock에 대한 이해 없이 사용하다가 다른 작업 때문에 테이블이나 행이 잠겨버 쿼리가 기다리는 상황이 발행해서 리소스 접근을 하는데 문제가 생기기도 한다. 뿐만 아니라 Lock을 어떻게 만들고 해지하는지에 대한 이해가 있어야 만약에 Lock이 발생하고 해지되지 않을 때 어떻게 Lock 프로세스를 멈추게 할 수도 있을 것이다. 트랜잭션 기반의 멀티프로세스나 멀티 쓰레 프로그램을 작성한다면 반드시 Lock의 개념을 알아야 데드락에 걸리거나 예외가 발생하는 프로그램을 작성하지 않을 수 있을 것이라고 생각이 든다. 실제 예제를 보면서 MySQL의 락을 어떻게 설정하는지 어떻게 동작하는지 이해하기 위해서 포스팅을 준비했다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
MySQL에서 Lock은 크게 Table Lock, Global Lock, Name Lock, User Lock 이 있다. 이 예제들을 살펴보고 마지막으로 InnoDB의 ROW 레벨의 락을 살펴 볼 것이다.&lt;/div&gt;
&lt;h2 id=&quot;table-lock&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Table Lock&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
테이블락은 어떤 세션에서 테이블 자원에 엑세스하여 데이터를 읽거나 쓰기를 할때 다른 세션에서는 테이블 자원에 대한 엑세스를 제한 하는 락이다. 세션에서 명시적으로 테이블 락을 사용하면 그 세션에서 락을 해지하지 않으면 다른 세션에서는 접근을 하지 못하게 된다. 테이블 락을 사용하기 위해서는 테이블 락 권한을 가지고 있어야 가능하다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
MyISAM 스토리지 엔진으로 테이블을 생성한다. MyISAM은 테이블 레벨 락을 사용한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; create table messages (
    id int auto_increment primary key,
    message varchar(140)) ENGINE=MyISAM;
Query OK, 0 rows affected (0.05 sec)

mysql&amp;gt; show table status where name=&#39;messages&#39;\G
*************************** 1. row ***************************
           Name: messages
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 0
 Avg_row_length: 0
    Data_length: 0
Max_data_length: 281474976710655
   Index_length: 1024
      Data_free: 0
 Auto_increment: 1
    Create_time: 2012-03-06 09:59:34
    Update_time: 2012-03-06 09:59:34
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options:
        Comment:
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/624937f2-388a-49d9-b07c-04142fcf9374&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/5fe51055-31f9-4ba9-baea-e4d5bb065143&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
두 세션이 열린 터미널을 살표보면 다음과 같이 두번째에 write lock을 실행하려면 명령어가 끝나지 않는 것을 확인 할 수 있다. 서버 단에서 Lock을 기다리는 쿼리의 목록을 볼 수 있는데 다음 명령어로 서버 수준에서 락을 기다리는 쿼리를 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;SHOW PROCESSLIST;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
서버 수준에서 락이 되어서 기다리고 있는 쓰레드의 번호는 5번이고 LOCK TABLE messages WRITE 라는 쿼리문이 대기하고 있는 시간이 현재 300 miliseconds 라는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; SHOW RROCESSLIST \G
*************************** 1. row ***************************
     Id: 1
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
*************************** 2. row ***************************
     Id: 5
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 300
  State: Locked
   Info: LOCK TABLES messages WRITE
2 rows in set (0.00 sec)

명시적인 read 락을 해지하면 자동적으로 write 락이 명시적인 락으로 설정이 될 것이다. 다음 명령어로 락을 해지한다.
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;UNLOCK TABLES;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;&quot; src=&quot;http://hbn-blog-assets.s3.amazonaws.com/saltfactory/images/76796970-5a7e-4ebb-8e2e-9fcb7e0e5031&quot; style=&quot;border-radius: 2px; border: 0px; display: block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto 30px; max-width: 100%; min-height: 40px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
read 락이 해지되면서 locked 되어 있던 5번 쓰레드의LOCK TABLE messages WRITE; 쿼리가 실행되면서 messages 테이블에 write 락이 명시적으로 설정되었다. open tables from {데이터베이스 명} 이라는 명령어로 현제 cached 된 테이블의 정보를 볼 수 있는데 지금 현재 테이블이 LOCK 되어 사용 중이라는 것을 확인 할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; SHOW OPEN TABLES FROM test \G
*************************** 1. row ***************************
   Database: test
      Table: messages
     In_use: 1
Name_locked: 0
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
write 락도 해지하고 다시 명령어를 실행해보자. 모든 락이 해지되어서 테이블에 현재 사용되는 세션이 없다는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)

mysql&amp;gt; show open tables from test \G
*************************** 1. row ***************************
   Database: test
      Table: messages
     In_use: 0
Name_locked: 0
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
READ 락은 락을 명시적으로 사용한 세션과 모든 세션에서 insert, update, delete가 불가능하고 select만 가능하다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; LOCK  TABLE messages READ;
Query OK, 0 rows affected (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
다음은 messages 테이블에서 READ 락을 명시적으로 사용하고 그 세션에서 insert 쿼리 쓰레드의 결과 이다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; INSERT INTO messages (message) VALUES (&#39;test&#39;);
ERROR 1099 (HY000): Table &#39;messages&#39; was locked with a READ lock and can&#39;t be updated
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
다른 세션에서 insert 쿼리 쓰레드를 실행하면 READ 락이 해지될때까지 대기하고 있다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
WRITE 락은 락을 명시적으로 사용한 세션에서의 쓰레드만 read, wrtite 가 가능하다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
다음은 messages 테이블에서 WRITE 락을 명시적으로 사용하고 그 세션에 select 와 write를 허용하고 나머지 세션의 쓰레드에서는 read, wrtie 모두 락이 해지 될때까지 대기한다. 다음 예제를 보면 WRITE 락을 사용한 세션에서는 insert와 select가 사용 가능하지만 다른 세션에서 select 조회를 하면 그 세션의 쓰레드가 LOCKED 된 것을 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; LOCK TABLES messages WRITE;
Query OK, 0 rows affected (0.00 sec

mysql&amp;gt; INSERT INTO messages (message) VALUES (&#39;test&#39;);
Query OK, 1 row affected (0.00 sec)

mysql&amp;gt; SELECT * FROM messages \G
*************************** 1. row ***************************
     id: 1
message: test


mysql&amp;gt; SHOW PROCESSLIST \G
*************************** 1. row ***************************
     Id: 1
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
*************************** 2. row ***************************
     Id: 2
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 469
  State: Locked
   Info: select * from messages
2 rows in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
하지만 이렇게 테이블 락 때문에 다른 쓰레드가 계속적으로 대기만 한다면 교착상태에 빠지게 될 것이다. 그래서 최대 대기하는 시간의 설정을 변경할 수 도 있다. 테이블 락의 최대 대기 시간을 조회하기 위해서는 다음 명령어로 조회할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;SHOW VARIABLES WHERE VARIABLE_NAME=&#39;table_lock_wait_timeout&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show variables where variable_name=&#39;table_lock_wait_timeout&#39;\G
*************************** 1. row ***************************
Variable_name: table_lock_wait_timeout
        Value: 50
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
또한 mysqladmin debug를 사용해서 어느 테이블에 lock이 어떤 레벨로 설정되어 있는지 확인 할 수 있다. $MYSQL_HOME/data/{호스트명}.err 파일 안에 다음과 같이 test 데이터베이스의 messages 테이블에 write 락이 설정 되어 있는 것을 확인 할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;Thread database.table_name          Locked/Waiting        Lock_type

1       test.messages               Locked - write        High priority write lock
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&quot;global-lock&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Global Lock&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
정확하게 말하면 글로벌 리드 락 (Global Read Lock)이다. 현재 세션 자체에서 글로벌하게 READ LOCK을 사용할 때 flush tables 명령으로 사용할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;FLUSH TABLES WITH READ LOCK;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; FLUSH TABLES WITH READ LOCK;
Query OK, 0 rows affected (15.74 sec)

mysql&amp;gt; show open tables from test\G
*************************** 1. row ***************************
   Database: test
      Table: messages
     In_use: 0
Name_locked: 0
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
글로벌 리드 락을 설정한후 messages 테이블을 살펴보면 테이블 레벨의 락이 걸려 있지 않는 상태이다. 다른 세션에서 messages 테이블에 WRITE 락을 명시적으로 사용하게 되면 글로벌 리드 락 때문에 대기를 하게 된다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show processlist\G
*************************** 1. row ***************************
     Id: 3
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 229
  State: Waiting for release of readlock
   Info: lock tables messages write
*************************** 2. row ***************************
     Id: 7
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
2 rows in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&quot;name-lock&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
Name Lock&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
네임락은 자세하게 문서로 정의 된 곳을 찾을 수 없어서 GET_LOCK에 사용하는 name string과 이해하기에 혼동될 수 있다. 테이블은 이름을 변경하거 삭제될때 테이블 레벨에서 묵시적으로 네임 락을 사용한다. 만약 이미 WRITE 락이 걸려 있는 테이블을 삭제한다고 할때를 살펴보자.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; lock table messages write;
Query OK, 0 rows affected (0.00 sec)

mysql&amp;gt; show open tables from test\G
*************************** 1. row ***************************
   Database: test
      Table: messages
     In_use: 1
Name_locked: 0
1 row in set (0.01 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이렇게 messages 테이블에 WRITE 락이 걸려 있는 상태에서 다른 세션에서 messages 테이블을 drop 하려고 한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql-2&amp;gt; drop table messages;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이렇게 테이블을 삭제하거나 테이블 이름을 변경할 때는 네임 락이 걸리는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show processlist \G
*************************** 1. row ***************************
     Id: 3
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 19
  State: Waiting for table
   Info: drop table messages
*************************** 2. row ***************************
     Id: 7
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
2 rows in set (0.00 sec)

mysql&amp;gt; show open tables from test\G
*************************** 1. row ***************************
   Database: test
      Table: messages
     In_use: 2
Name_locked: 1
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
만약에 messages에 락이 걸려있는 상태에서 다른 세션에서 messages 테이블 이름을 new_messages라고 변경한다고 할때는 다음과 같이 이전 테이블과 새로 변경될 테이블의 이름에 락이 걸리는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql-2&amp;gt; rename table messages to new_messages;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
WRITE 락을 사용한 세션에서 쓰레드의 상태와 테이블의 상태를 살펴보면 네임 락이 걸려 있는 것을 확인 할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show processlist\G
*************************** 1. row ***************************
     Id: 3
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 123
  State: Waiting for table
   Info: rename table messages to new_messages
*************************** 2. row ***************************
     Id: 7
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
2 rows in set (0.00 sec)

mysql&amp;gt; show open tables \G
*************************** 1. row ***************************
   Database: test
      Table: messages
     In_use: 2
Name_locked: 1
*************************** 2. row ***************************
   Database: test
      Table: new_messages
     In_use: 1
Name_locked: 1
2 rows in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&quot;user-lock&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
User Lock&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
사용자 레벨에서 락을 걸수 있는 방법이 있는데 이 방법은 락의 이름과 그 락의 타임아웃을 정의해서 사용하는 방법이다. GET_LOCK(str, timeout)이라는 메소드를 사용하여 락을 만들고 다른 세션에서 이 락의 이름이 있는지를 확인하고 있을 경우 정해진 타임 아웃기간 동안 락을 걸 수 있다. 그리고 락을 해지하기 위해서는 RELEASE_LOCK(str)을 명령을 사용한다. 이 방법은 Advisory Locking이라고도 한다.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
두개의 세션을 열고 하나의 세션에서 다음 문장을 실행해보자. ‘user_define_lock’이라는 락을 10초동안 유지하도록 하였다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; select GET_LOCK(&#39;user_define_lock&#39;, 10)\G
*************************** 1. row ***************************
GET_LOCK(&#39;user_define_lock&#39;, 10): 1
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이제 다른 세션에서 다음 문장을 실행해보자.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql-2&amp;gt; select GET_LOCK(&#39;user_define_lock&#39;, 10)\G
*************************** 1. row ***************************
GET_LOCK(&#39;user_define_lock&#39;, 10): 1
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
다시 처음 user_define_lock을 설정한 세션에 살펴보면 User Lock에 걸려서 대기하고 있다는 것을 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show processlist\G
*************************** 1. row ***************************
     Id: 3
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 2
  State: User lock
   Info: select GET_LOCK(&#39;user_define_lock&#39;, 10)
*************************** 2. row ***************************
     Id: 7
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
2 rows in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
다시 두번째 세션의 터미널로 돌아가보면 10초가 지났기 때문에 Lock이 해제된 것을 확인 할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; select GET_LOCK(&#39;user_define_lock&#39;, 10)\G
*************************** 1. row ***************************
GET_LOCK(&#39;user_define_lock&#39;, 10): 0
1 row in set (10.01 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
유저 락을 해지하기 위해서는 RELEASE_LOCK(str)을 상용해야한다. 만약 정의된 락의 이름이 있을 경우는 1 아닐 경우는 NULL을 출력하면서 유저 락을 해지한다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; select GET_LOCK(&#39;user_define_lock&#39;, 10)\G
*************************** 1. row ***************************
GET_LOCK(&#39;user_define_lock&#39;, 10): 1
1 row in set (0.00 sec)

mysql&amp;gt; select RELEASE_LOCK(&#39;user_define_lock&#39;)\G
*************************** 1. row ***************************
RELEASE_LOCK(&#39;user_define_lock&#39;): NULL
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&quot;innodb-row--lock&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
InnoDB의 ROW 레벨 Lock&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
위의 내요은 MyISAM 엔진에서 모두 사용이 가능한 락이지만 InnoDB는 MyISAM과 달리 row 레벨 락을 지원한다. InnoDB 엔진으로 messages 테이블을 만들자, 위 예제를 계속 따라 왔더라면 네임 락 예제에서 기존의 messages 테이블은 new_messages로 변경되어 있을 것이다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; create table messages (
    -&amp;gt; id int auto_increment primary key,
    -&amp;gt; message varchar(140)) engine=InnoDB;
Query OK, 0 rows affected (0.06 sec)

mysql&amp;gt; show table status where name = &#39;messages&#39;\G
*************************** 1. row ***************************
           Name: messages
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 0
 Avg_row_length: 0
    Data_length: 16384
Max_data_length: 0
   Index_length: 0
      Data_free: 11534336
 Auto_increment: 1
    Create_time: 2012-03-06 16:12:50
    Update_time: NULL
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options:
        Comment:
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
InnoDB 스토리지 엔진을 사용하기 때문에 트랜잭션을 사용할 수 있게 되었다. 이제 데이터를 입력하고 트랜잭션을 시작하여 row 레벨 락을 걸어 보겠다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; insert into messages (message) values (&#39;test&#39;);
Query OK, 1 row affected (0.00 sec)

mysql&amp;gt; START TRANSACTION;
Query OK, 0 rows affected (0.00 sec)

mysql&amp;gt; SELECT * FROM messages WHERE id = 1 LOCK IN SHARE MODE \G
*************************** 1. row ***************************
     id: 1
message: test
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이제 두번째 세션에서 id=1로 락을 걸어둔 row를 삭제하려고 한다. 락 최대 시간이 다되면 타임아웃 에러를 발생시킨다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql-2&amp;gt; start transaction;
Query OK, 0 rows affected (0.00 sec)

mysql-2&amp;gt; delete from messages where id = 1;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
InnoDB의 락의 타임아웃 설정은 다음과 같이 확인할 수 있다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show variables where variable_name = &#39;innodb_lock_wait_timeout&#39;\G
*************************** 1. row ***************************
Variable_name: innodb_lock_wait_timeout
        Value: 50
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
row 락에 걸려 있는 상태에서 프로세스 리스트를 확인해보자.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; show processlist\G
*************************** 1. row ***************************
     Id: 3
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 10
  State: updating
   Info: delete from messages where id = 1
*************************** 2. row ***************************
     Id: 7
   User: root
   Host: localhost
     db: test
Command: Query
   Time: 0
  State: NULL
   Info: show processlist
2 rows in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이제 다시 돌아와서 첫번째 세션에서 id=1인 row를 삭제해보자.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; delete from messages where id = 1;
Query OK, 1 row affected (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
첫번째 세션에 데이터를 삭제하는 순간 두번째 세션에 대기를 하고 있던 쓰레드는 deadlock 에러를 발생 시킨다. 이미 삭제하고 난 값을 다시 삭제하려 하기 때문이다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;mysql&amp;gt; delete from messages where id = 1;
ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
InnoDB의 락 상태를 확인하기 위해서는 SHOW INNODB STATUS를 사용하면 된다.&lt;/div&gt;
&lt;div class=&quot;highlighter-rouge&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre class=&quot;highlight&quot; style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: #f9f9fa; border-radius: 6px; border: 1px solid rgb(237, 237, 238); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4em; margin-bottom: 30px; max-width: 100%; overflow-x: auto; padding: 14px 20px; text-align: left; vertical-align: baseline; word-wrap: normal;&quot;&gt;&lt;code style=&quot;-webkit-font-smoothing: subpixel-antialiased; background-color: transparent; border-radius: 6px; border: none; display: inline-block; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; max-width: 100%; overflow-x: auto; padding: 0px; vertical-align: middle; word-wrap: normal; zoom: 1;&quot;&gt;*************************** 1. row ***************************
  Type: InnoDB
  Name:
Status:
=====================================
120306 16:30:42 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 39 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 20, signal count 20
Mutex spin waits 0, rounds 180, OS waits 9
RW-shared spins 20, OS waits 10; RW-excl spins 1, OS waits 1
------------------------
LATEST DETECTED DEADLOCK
------------------------
120306 16:16:46
*** (1) TRANSACTION:
TRANSACTION 0 28163, ACTIVE 29 sec, OS thread id 4353515520 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 368, 1 row lock(s)
MySQL thread id 3, query id 113 localhost root updating
delete from messages where id = 1
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 230 n bits 72 index `PRIMARY` of table `test`.`messages` trx id 0 28163 lock_mode X locks rec but not gap waiting
Record lock, heap no 2 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
 0: len 4; hex 80000001; asc     ;; 1: len 6; hex 000000006e01; asc     n ;; 2: len 7; hex 800000002d0110; asc     -  ;; 3: len 4; hex 74657374; asc test;;

*** (2) TRANSACTION:
TRANSACTION 0 28162, ACTIVE 61 sec, OS thread id 4389679104 starting index read, thread declared inside InnoDB 500
mysql tables in use 1, locked 1
4 lock struct(s), heap size 1216, 2 row lock(s)
MySQL thread id 7, query id 114 localhost root updating
delete from messages where id = 1
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 230 n bits 72 index `PRIMARY` of table `test`.`messages` trx id 0 28162 lock mode S locks rec but not gap
Record lock, heap no 2 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
 0: len 4; hex 80000001; asc     ;; 1: len 6; hex 000000006e01; asc     n ;; 2: len 7; hex 800000002d0110; asc     -  ;; 3: len 4; hex 74657374; asc test;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 230 n bits 72 index `PRIMARY` of table `test`.`messages` trx id 0 28162 lock_mode X locks rec but not gap waiting
Record lock, heap no 2 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
 0: len 4; hex 80000001; asc     ;; 1: len 6; hex 000000006e01; asc     n ;; 2: len 7; hex 800000002d0110; asc     -  ;; 3: len 4; hex 74657374; asc test;;

*** WE ROLL BACK TRANSACTION (1)
------------
TRANSACTIONS
------------
Trx id counter 0 28180
Purge done for trx&#39;s n:o &amp;lt; 0 28179 undo n:o &amp;lt; 0 0
History list length 5
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 28179, ACTIVE 465 sec, OS thread id 4353515520 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 368, 1 row lock(s)
MySQL thread id 3, query id 137 localhost root updating
delete from messages where id = 1
------- TRX HAS BEEN WAITING 41 SEC FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 230 n bits 72 index `PRIMARY` of table `test`.`messages` trx id 0 28179 lock_mode X locks rec but not gap waiting
Record lock, heap no 2 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
 0: len 4; hex 80000001; asc     ;; 1: len 6; hex 000000006e10; asc     n ;; 2: len 7; hex 800000002d0110; asc     -  ;; 3: len 4; hex 74657374; asc test;;

------------------
---TRANSACTION 0 28177, ACTIVE 572 sec, OS thread id 4389679104
2 lock struct(s), heap size 368, 1 row lock(s)
MySQL thread id 7, query id 139 localhost root
show innodb status
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o&#39;s: 0, sync i/o&#39;s: 0
Pending flushes (fsync) log: 0; buffer pool: 0
30 OS file reads, 69 OS file writes, 46 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,
0 inserts, 0 merged recs, 0 merges
Hash table size 17393, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 0 5243606
Log flushed up to   0 5243606
Last checkpoint at  0 5243606
0 pending log writes, 0 pending chkp writes
34 log i/o&#39;s done, 0.00 log i/o&#39;s/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 21160914; in additional pool allocated 693760
Dictionary memory allocated 37240
Buffer pool size   512
Free buffers       486
Database pages     25
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 23, created 2, written 53
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread id 4369481728, state: waiting for server activity
Number of rows inserted 3, updated 0, deleted 2, read 5
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

1 row in set, 1 warning (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&quot;section-1&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
결론&lt;/h2&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin-bottom: 30px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
이 포스트는 MySQL의 Lock에 대한 이해를 위해서 작성한 것이고 특정한 환경에서 가장 최적의 Lock을 어떤 것을 사용해야한다는 것에 대해서는 소개하지 않았다. MyISAM과 InnoDB는 각각 장단점이 있는 스토리지 엔진이다. 이번 프로젝트에 AMPQ 를 사용하기 위해서 데이터베이스의 락 기능에 대해서 이해하고 정리하기 위해서 준비한 자료이다. 이제 실제 대용량 데이터를 상용해서 어떤 엔진을 사용해야할지에 대해서 다음 포스팅에 작성할 예정이다.&lt;/div&gt;
&lt;h2 id=&quot;section-2&quot; style=&quot;border: 0px; font-family: inherit; font-size: 28px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 1.2em; margin: 40px 0px 8px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;
참고&lt;/h2&gt;
&lt;ol style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 30px; padding: 0px 20px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;대용량 시스템 구축을 위한 MySQL 성능 최적화, 위키북스&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.mysql.com/doc/refman/5.1/en/lock-tables.html&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://blog.pages.kr/131&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/show-open-tables.html&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://laonmaru.com/tc/blogmeme/62&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://www.phpdeveloper.org.uk/mysql-named-locks/&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.5em; margin: 4px 20px; padding: 0px; vertical-align: baseline;&quot;&gt;http://dev.mysql.com/doc/refman/4.1/en/innodb-lock-modes.htm&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/article&gt;&lt;footer class=&quot;post-footer&quot; role=&quot;contentinfo&quot; style=&quot;border-top-color: rgb(237, 237, 238); border-top-style: solid; border-width: 1px 0px 0px; color: #21272d; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica-Neue, helvetica, sans-serif; font-size: 14px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 14px; margin: 0px; padding: 50px 0px; position: relative; text-align: center; text-rendering: optimizeLegibility; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;inner&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px auto; max-width: 680px; padding: 0px 30px; text-align: left; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;vcard&quot; style=&quot;border: 0px; display: inline-block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; min-height: 100px; padding: 0px; vertical-align: middle; width: 340px; zoom: 1;&quot;&gt;
&lt;a class=&quot;btn&quot; href=&quot;http://blog.saltfactory.net/feed.xml&quot; id=&quot;btn_feed&quot; style=&quot;-webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-color: white; border-radius: 50px; border: 1px solid rgb(237, 237, 238); color: #909396; display: inline-block; font-size: 16px; font-stretch: inherit; font-style: inherit; font-variant: inherit; left: 610px; line-height: inherit; margin: 0px 0px 0px -17px; outline: none; padding: 9px 9px 7px 10px; position: absolute; text-align: center; text-decoration: none; top: -18px; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: middle; zoom: 1;&quot; target=&quot;_blank&quot; title=&quot;Feed&quot;&gt;&lt;span aria-hidden=&quot;true&quot; data-icon=&quot;)&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;a class=&quot;photo circle&quot; href=&quot;http://blog.saltfactory.net/about&quot; style=&quot;background: rgb(255, 255, 255); border-radius: 50px; border: 1px solid rgba(33, 39, 45, 0.168627); color: #55acee; float: left; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 100px; line-height: inherit; margin: 0px 22px 0px 0px; outline: none; overflow: hidden; padding: 0px; position: relative; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline; width: 100px;&quot;&gt;&lt;span style=&quot;background-image: url(&amp;quot;/assets/images/profile.jpeg&amp;quot;); background-position: center center; background-repeat: no-repeat; background-size: contain; border: 0px; bottom: -1px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; left: -1px; line-height: inherit; margin: 0px; padding: 0px; position: absolute; right: -1px; top: -1px; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;saltfactory&#39;s blog&quot; src=&quot;http://blog.saltfactory.net/assets/images/profile.jpeg&quot; style=&quot;border: none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1px; left: 0px; line-height: inherit; margin: 0px; opacity: 0; padding: 0px; position: absolute; top: 0px; vertical-align: baseline; width: 1px;&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class=&quot;details&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.9em; margin: 0px; padding: 10px 0px 0px; vertical-align: baseline;&quot;&gt;
&lt;h4 style=&quot;border: 0px; font-size: 20px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a class=&quot;url n&quot; href=&quot;http://blog.saltfactory.net/about&quot; style=&quot;border: 0px; color: #21272d; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;송성광&lt;/a&gt;&lt;/h4&gt;
&lt;a class=&quot;js-remove-domain-schema&quot; href=&quot;http://blog.saltfactory.net/&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;blog.saltfactory.net&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;https://twitter.com/saltfactory&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;@saltfactory&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://hibrain.net/&quot; style=&quot;border: 0px; color: #55acee; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition-duration: 0.2s; transition-property: background-color, color; vertical-align: baseline;&quot;&gt;하이브레인넷&lt;/a&gt;&amp;nbsp;부설연구소 연구원&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&amp;nbsp;&lt;div id=&quot;user_bio&quot; style=&quot;border: 0px; display: inline-block; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: middle; width: 333.188px; zoom: 1;&quot;&gt;
&lt;div class=&quot;inner&quot; style=&quot;border: 0px; color: #a4adb6; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.6em; margin: 0px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;
하이브리드 모바일 앱, HTML5, 웹 프로그래밍, 데이터베이스, 운영체제, 프로그래밍 언어 그리고 IT 기술에 관한 연구 내용에 관한 saltfactory&#39;s blog 입니다.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/footer&gt;&lt;div class=&quot;post-comments&quot; style=&quot;border: 0px; color: #21272d; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica-Neue, helvetica, sans-serif; font-size: 14px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 14px; margin: 0px auto; max-width: 680px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;disqus_thread&quot; style=&quot;border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; horizontalscrolling=&quot;no&quot; id=&quot;dsq-app1&quot; name=&quot;dsq-app1&quot; scrolling=&quot;no&quot; src=&quot;http://disqus.com/embed/comments/?base=default&amp;amp;version=4cd46e1d5a486932ff9ca81fdce589c8&amp;amp;f=saltfactoryblog&amp;amp;t_i=http%3A%2F%2Fblog.saltfactory.net%2F107&amp;amp;t_u=http%3A%2F%2Fblog.saltfactory.net%2Fdatabase%2Fintroduce-mysql-lock.html&amp;amp;t_d=MySQL%EC%97%90%EC%84%9C%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94%20Lock%20%EC%9D%B4%ED%95%B4&amp;amp;t_t=MySQL%EC%97%90%EC%84%9C%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94%20Lock%20%EC%9D%B4%ED%95%B4&amp;amp;s_o=default&quot; style=&quot;border-style: none !important; border-width: initial !important; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 320px !important; line-height: inherit; margin: 0px; min-width: 100%; overflow: hidden !important; padding: 0px; vertical-align: baseline; width: 1px !important;&quot; tabindex=&quot;0&quot; title=&quot;Disqus&quot; verticalscrolling=&quot;no&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/6634377100338766588/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/09/mysql-lock.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6634377100338766588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/6634377100338766588'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/09/mysql-lock.html' title='MySQL에서 사용하는 Lock 이해'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-1968378103852027214</id><published>2016-09-14T23:29:00.000+09:00</published><updated>2016-09-14T23:30:17.251+09:00</updated><title type='text'>[ubuntu] 특정 버전 java  설치</title><content type='html'>&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
만약 JAVA 의 특정버전을 설치 하려면 수동으로 설치해줘야 합니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
처음으로 OS 커널을 확인 합니다.&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;uname &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;a&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
아래와 같은 형식으로 표시될것입니다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
Linux f322a6e3e2ed 4.4.15-moby #1 SMP Thu Jul 28 22:03:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #303336; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;dejavu sans mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , monospace , sans-serif;&quot;&gt;위와 같이 표시된후 아래 절차로 진행하면 됩니다.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
1) &amp;nbsp;/opt/jdk 디렉토리 생성후 해당 디랙토리로 이동합니다.&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;mkdir &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;jdk
cd &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;opt&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
2) 현재 최신 버전(2016.9.13)&amp;nbsp;&lt;span style=&quot;background-color: #eff0f1; color: #303336; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;dejavu sans mono&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , monospace , sans-serif; font-size: 13px; white-space: inherit;&quot;&gt;8u102&lt;/span&gt;&amp;nbsp;으로 받겠습니다.&amp;nbsp;&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;wget &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;header &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;&quot;Cookie: oraclelicense=accept-securebackup-cookie&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-linux-x64.tar.gz&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
3) 만약 root 계정이 아니면 root 계정으로 변경해줍니다.&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;sudo su&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
4) 압축을 해제합니다.&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;tar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;zxf jdk&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;8u5&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;linux&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;x64&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;tar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;gz &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;C &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;jdk&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
5) Set Oracle&#39;s Java as default:&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;alternatives &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;install &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;usr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;bin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;java java &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;jdk&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;jdk1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;8.0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;_120&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;bin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;java &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
update&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;alternatives &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;install &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;usr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;bin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;javac javac &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;jdk&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;jdk1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;8.0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;_120&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;bin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;javac &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;100&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
6) 버전을 체크 해봅니다.&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;java &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;version&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, &amp;quot;libra sans&amp;quot;, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
저같은 경우는 JDK &amp;nbsp;버전마다 테스트를 해야해서 docker 를 이용 docker 파일로 만들어서 테스트 합니다.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/1968378103852027214/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/09/ubuntu-java.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/1968378103852027214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/1968378103852027214'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/09/ubuntu-java.html' title='[ubuntu] 특정 버전 java  설치'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-3753639072975173315</id><published>2016-08-24T17:28:00.003+09:00</published><updated>2016-08-24T17:28:37.621+09:00</updated><title type='text'>[AWS] CLI Profile 이용 region 을 변경해가며 사용해보기</title><content type='html'>여러곳의 리전이나 유저를 생성하려면 profiles 을 만들어서 &amp;nbsp;CLI 를 이용할 수 있다.&lt;br /&gt;
&lt;br /&gt;
먼저 credentials 에서 user 의 access key id 와 secret key 를 입력하고&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 24px;&quot;&gt;&lt;code class=&quot;filename&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;~/.aws/credentials&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 24px;&quot;&gt;&lt;code class=&quot;filename&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/strong&gt;
config 파일에서 region 을 선택해주면 해당 region 을 이용가능하다.&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 24px;&quot;&gt;&lt;code class=&quot;filename&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;~/.aws/config&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 24px;&quot;&gt;&lt;code class=&quot;filename&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/strong&gt;
사용은 아래와 같이 하면 된다.&lt;br /&gt;
&lt;br /&gt;
내경우는 서울과 도쿄의 리전을 프로파일을 만들어 아래와 같이 리전 값드를 불러오거나 생성할 때 사용하니 편리한것 같다.&lt;br /&gt;
&lt;br /&gt;
aws ec2 describe-instances --profile seoul&lt;br /&gt;
&lt;strong class=&quot;userinput&quot; style=&quot;background-color: #f0f0f0; color: #444444; font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; font-size: 14px;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;&lt;span class=&quot;&quot;&gt;&lt;span class=&quot;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;
aws ec2 describe-instances --profile tokyo&lt;br /&gt;
aws ec2 describe-instances --profile oregon&lt;br /&gt;
&lt;br /&gt;
각 리전의 security 그룹복사를 할수 없어 해당 스크립트들을 만들어서 사용하니 편함..&lt;br /&gt;
&lt;strong class=&quot;userinput&quot; style=&quot;background-color: #f0f0f0; color: #444444; font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; font-size: 14px;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;&lt;span class=&quot;&quot;&gt;&lt;span class=&quot;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/strong&gt;
&lt;strong class=&quot;userinput&quot; style=&quot;background-color: #f0f0f0; color: #444444; font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; font-size: 14px;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;&lt;span class=&quot;&quot;&gt;&lt;span class=&quot;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/strong&gt;
아래는 AWS 공식 가이드이다. &amp;nbsp;참고하길.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #cc6600; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 18px;&quot;&gt;Named Profiles&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 1.5em;&quot;&gt;
The AWS CLI supports&amp;nbsp;&lt;span class=&quot;emphasis&quot;&gt;&lt;em&gt;named profiles&lt;/em&gt;&lt;/span&gt;&amp;nbsp;stored in the config and credentials files. You can configure additional profiles by using&amp;nbsp;&lt;code class=&quot;code&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;aws configure&lt;/code&gt;&amp;nbsp;with the&amp;nbsp;&lt;code class=&quot;code&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;--profile&lt;/code&gt;&amp;nbsp;option or by adding entries to the config and credentials files.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 1.5em;&quot;&gt;
The following example shows a credentials file with two profiles:&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 1.5em;&quot;&gt;
&lt;span class=&quot;bold&quot;&gt;&lt;strong&gt;&lt;code class=&quot;filename&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;~/.aws/credentials&lt;/code&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;background-color: #f0f0f0; border-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #444444; font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; font-size: 14px; overflow: auto; padding: 0.5em;&quot;&gt;&lt;code class=&quot;nohighlight&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;[default]
aws_access_key_id=&lt;em class=&quot;replaceable&quot; style=&quot;color: red;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;AKIAIOSFODNN7EXA&lt;span class=&quot;&quot;&gt;MPLE&lt;/span&gt;&lt;/code&gt;&lt;/em&gt;
aws_secret_access_key=&lt;em class=&quot;replaceable&quot; style=&quot;color: red;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXA&lt;span class=&quot;&quot;&gt;MPLEKEY&lt;/span&gt;&lt;/code&gt;&lt;/em&gt;

[user2]
aws_access_key_id=&lt;em class=&quot;replaceable&quot; style=&quot;color: red;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;AKIAI44QH8DHBEXA&lt;span class=&quot;&quot;&gt;MPLE&lt;/span&gt;&lt;/code&gt;&lt;/em&gt;
aws_secret_access_key=&lt;em class=&quot;replaceable&quot; style=&quot;color: red;&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;je7MtGbClwBF/&lt;span class=&quot;&quot;&gt;2&lt;/span&gt;Zp9Utk/h3yCo8nvbEXA&lt;span class=&quot;&quot;&gt;MPLEKEY&lt;/span&gt;&lt;/code&gt;&lt;/em&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 1.5em;&quot;&gt;
Each profile uses different credentials—perhaps from two different IAM users—and can also use different regions and output formats.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; line-height: 1.5em;&quot;&gt;
&lt;span class=&quot;bold&quot;&gt;&lt;strong&gt;&lt;code class=&quot;filename&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;~/.aws/config&lt;/code&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;background-color: #f0f0f0; border-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #444444; font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; font-size: 14px; overflow: auto; padding: 0.5em;&quot;&gt;&lt;code class=&quot;nohighlight&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;[default]
region=us-west-2
output=json

[profile user2]
region=us-east-1
output=text&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;aws-note&quot; style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px; margin: 0.5em 2.7em 1em; padding: 0px;&quot;&gt;
&lt;div class=&quot;aws-note&quot; style=&quot;font-weight: bold; line-height: 1.5em; margin-top: 0.5em; padding: 0px;&quot;&gt;
Important&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-top: 0.5em; padding: 0px;&quot;&gt;
The AWS credentials file uses a different naming format than the CLI config file for named profiles. Do not include the &#39;profile &#39; prefix when configuring a named profile in the AWS credentials file.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial; font-size: 16px;&quot;&gt;
&lt;div class=&quot;titlepage&quot;&gt;
&lt;h3 class=&quot;title&quot; id=&quot;using-profiles&quot; style=&quot;color: #007697; font-size: 16px;&quot;&gt;
Using Profiles with the AWS CLI&lt;/h3&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em;&quot;&gt;
To use a named profile, add the&amp;nbsp;&lt;code class=&quot;code&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;--profile&lt;/code&gt;&amp;nbsp;option to your command. The following example lists running instances using the&amp;nbsp;&lt;code class=&quot;code&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;user2&lt;/code&gt;&amp;nbsp;profile from the previous section.&lt;/div&gt;
&lt;pre class=&quot;programlisting&quot; style=&quot;background-color: #f0f0f0; border-radius: 3px; border: 1px solid rgb(225, 225, 232); font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; font-size: 14px; overflow: auto; padding: 0.5em;&quot;&gt;&lt;code class=&quot;nohighlight&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;$ &lt;strong class=&quot;userinput&quot;&gt;&lt;code class=&quot;&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, mono; overflow: auto;&quot;&gt;aws ec2 &lt;span class=&quot;&quot;&gt;&lt;span class=&quot;&quot;&gt;describe&lt;/span&gt;-instances &lt;span class=&quot;&quot;&gt;--profile user2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/3753639072975173315/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/08/aws-cli-profile-region.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3753639072975173315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3753639072975173315'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/08/aws-cli-profile-region.html' title='[AWS] CLI Profile 이용 region 을 변경해가며 사용해보기'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-1900147385833295553</id><published>2016-08-24T15:44:00.001+09:00</published><updated>2016-08-24T16:05:12.446+09:00</updated><title type='text'>[NAT] AWS 인스턴스로 NAT 구성해보기</title><content type='html'>&lt;br /&gt;
AWS 에서 제공하는 NAT 을 이용해도 되지만 범용으로 사용하기 위해 인스턴스에 NAT 기능을 주고 이용&lt;br /&gt;
하기 위해 인스턴스에 &amp;nbsp;NAT 구성을 하는 법을 알아 보겠습니다.&lt;br /&gt;
&lt;br /&gt;
먼져 인스턴스를 생성한후 route Table 에 생성한 인스턴스를 라우트테이블에 할당 해주고, NAT 으로 설정된 인스턴스에서 &lt;i&gt;IP forword 를 활성화 해주면 NAT &amp;nbsp;이 됩니다. 물론 방화벽 설정(Security Group 설정)은 해줘야합니다.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;아래 내용대로 진행하면 문제 없이 되는것 같네요..&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;i&gt;&lt;b&gt;AWS 콘솔에서 하는 설정&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
1. Instance 생성&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
2. Source Destnation Check 해제&lt;br /&gt;
이것을 해제 하지 않으면 들어오는 패킷이 폐기 됩니다.&lt;br /&gt;
&lt;br /&gt;
3. 라우팅 테이블에&lt;br /&gt;
0.0.0.0/0 으로 향하는 패킷이 NAT 인스턴스로 향하도록 라우팅 테이블을 수정해줍니다.&lt;br /&gt;
&lt;i style=&quot;color: black; font-family: &amp;quot;Apple SD Gothic Neo&amp;quot;; font-size: medium; line-height: normal;&quot;&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i style=&quot;line-height: 22.4px;&quot;&gt;4. Security Group 에서 &amp;nbsp;In-bound 에 80 을 추가해줍니다.&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;line-height: 22.4px;&quot;&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i style=&quot;line-height: 22.4px;&quot;&gt;모든 포트를 다 열어주면 모든 인터넷이 될것입니다. 하지만 보안상 취약할 수 있으므로&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;line-height: 22.4px;&quot;&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i style=&quot;line-height: 22.4px;&quot;&gt;패키지 레파지토리를 업데이트 하거나 패키지설치를 위해 &amp;nbsp;80 포트만 열어줍니다.&lt;/i&gt;&lt;br /&gt;
&lt;i style=&quot;line-height: 22.4px;&quot;&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i style=&quot;color: black; font-family: &amp;quot;Apple SD Gothic Neo&amp;quot;; font-size: medium; line-height: normal;&quot;&gt;아래 설정은 ubuntu 14.04에서 수행한 것입니다.&lt;/i&gt;&lt;br /&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
&lt;h4&gt;
&lt;i&gt;NAT 인스턴스에서하는 설정&lt;/i&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
1. /etc/sysctl.conf ip forward 활성화&lt;/div&gt;
&lt;pre style=&quot;background-color: #f9f9f9; border: 1px solid rgb(221, 221, 221); font-family: monospace, Courier; font-size: 14px; line-height: 1.3em; padding: 1em;&quot;&gt;net.ipv4.ip_forward=1 
&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
2. iptables 설정&lt;/div&gt;
&lt;pre style=&quot;background-color: #f9f9f9; border: 1px solid rgb(221, 221, 221); font-family: monospace, Courier; font-size: 14px; line-height: 1.3em; padding: 1em;&quot;&gt; 
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.4px; margin-bottom: 0.5em; margin-top: 0.5em;&quot;&gt;
3. 부티시 자동으로 부팅되도록 /etc/rc.local 에 iptable 설정 추가&lt;/div&gt;
&lt;pre style=&quot;background-color: #f9f9f9; border: 1px solid rgb(221, 221, 221); font-family: monospace, Courier; font-size: 14px; line-height: 1.3em; padding: 1em;&quot;&gt;sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/1900147385833295553/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/08/nat.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/1900147385833295553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/1900147385833295553'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/08/nat.html' title='[NAT] AWS 인스턴스로 NAT 구성해보기'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-3372331041427504226</id><published>2016-06-17T09:28:00.001+09:00</published><updated>2016-06-17T09:35:25.620+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="time"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>[Ubuntu] UTC 한국 시간으로 변경</title><content type='html'>&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
아마존에서 리눅스를 설치하고 시간을보니 UTC 로 되어있다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
그래서 한국 시간으로 변경하려면 시간 설정을 &amp;nbsp;KST 로 바꿔야 한다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
모두가 알고있겟지만 UTC 와 KST 시간차이는 9시간이 차이가 난다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
시스템 시간과 관련된 UTC 설정은 &amp;nbsp;/etc/localtime 에 설정되어 있다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
안의 내용을 보면&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #cccccc; float: none !important; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 14.85px; height: auto !important; left: auto !important; line-height: 16.335px; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;TZif2UTCTZif2UTC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;UTC0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;과같이 UTC0 으로 설정되어있다.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;이것을 한국으로 변경해야 한다.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
세계 각국에 대한 세팅은 /usr/share/zoneinfo 에 미리 저장 되어 있다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
timezone을 KST 로 변경 하고 싶은 경우 아래와같이 명령어를 입력하면 가능하게 된다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;span id=&quot;callbacknestjhprojecttistorycom1365688&quot; style=&quot;float: right; height: 1px; width: 1px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
수정하면 아래와 같이 나온다&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
~▒▒▒▒▒LMTKSTJCSTJSTKDTTZif2▒▒▒▒▒▒▒x▒▒▒▒▒▒▒▒▒▒▒▒U;p▒▒▒▒▒C&#39;▒▒▒▒▒▒O)▒▒▒▒▒▒k▒▒▒▒▒▒▒h▒▒▒▒▒bx▒▒▒▒▒L▒▒▒▒▒▒/px▒▒▒▒▒▒▒h▒▒▒▒▒Rx▒▒▒▒▒▒▒h▒▒▒▒▒▒4x▒▒▒▒째h▒▒▒▒▒▒x▒▒▒▒h▒~▒▒▒▒▒LMTKSTJCSTJSTKDT▒w▒~~▒&lt;/div&gt;
&lt;div style=&quot;background-color: white; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;span style=&quot;color: #666666; font-family: &amp;quot;dotum&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;applegothic&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;KST-9&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
조금 이상하지만 현재 시간을 보면 정상적으로 KST 로 표기가 되어 나타난다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
확인은 data 명령으로 확인해보면 된다.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
# date&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Fri Jun 17 09:25:37 KST 2016&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #666666; font-family: Dotum, Verdana, AppleGothic, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 0px !important; padding-top: 0px !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/3372331041427504226/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/06/ubuntu-utc.html#comment-form' title='18개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3372331041427504226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3372331041427504226'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/06/ubuntu-utc.html' title='[Ubuntu] UTC 한국 시간으로 변경'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-3419515242350978902</id><published>2016-02-13T03:04:00.002+09:00</published><updated>2016-02-13T03:04:29.807+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vurtualbox"/><title type='text'>Virtual Box HDD 용량 변경하기</title><content type='html'>&lt;br /&gt;
HDD 를 사용하다보면 용량이 모자랄 경우가 존재한다.&lt;br /&gt;
&lt;br /&gt;
그럴때 아래 명령어를 통해 용량의 변경이 가능하다.&lt;br /&gt;
VBOXMANAGE modifyhd Vdi 경로 --resize (변경할용량MB)&lt;br /&gt;
&lt;br /&gt;
Sample&amp;gt;&lt;br /&gt;
VBOXMANAGE modifyhd &quot;C:\Users\KMVHD\VirtualBox VMs\Windows2012R2\Windows2012R2.vdi&quot; --resize 102400&lt;br /&gt;
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%&lt;br /&gt;
&lt;br /&gt;
주의할점은 modifyhd 와 resize는 소문자로 되어야 한다.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/3419515242350978902/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/02/virtual-box-hdd.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3419515242350978902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/3419515242350978902'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/02/virtual-box-hdd.html' title='Virtual Box HDD 용량 변경하기'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-7983591075751838925</id><published>2016-01-28T15:50:00.002+09:00</published><updated>2016-01-28T15:50:10.857+09:00</updated><title type='text'>putty-nd</title><content type='html'>putty-nd&lt;br /&gt;
&lt;br /&gt;
putty 같으면서도 조금 다름 좀더 편한듯&lt;br /&gt;
&lt;br /&gt;
다운로드는 아래에서&lt;br /&gt;
http://sourceforge.net/projects/putty-nd/</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/7983591075751838925/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2016/01/putty-nd.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/7983591075751838925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/7983591075751838925'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2016/01/putty-nd.html' title='putty-nd'/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9031349244162239552.post-8635355224188487201</id><published>2015-05-27T11:27:00.001+09:00</published><updated>2015-05-27T11:30:46.983+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="연필"/><category scheme="http://www.blogger.com/atom/ns#" term="책"/><title type='text'>[책] </title><content type='html'>&amp;nbsp;2015-05-27&lt;br /&gt;
지금 읽기시작한 책 재미있을것 같다.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://bookthumb.phinf.naver.net/cover/000/818/00081838.jpg?udate=20100111%22%20alt=%22%EC%97%B0%ED%95%84%22&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://bookthumb.phinf.naver.net/cover/000/818/00081838.jpg?udate=20100111%22%20alt=%22%EC%97%B0%ED%95%84%22&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://book.naver.com/bookdb/book_detail.nhn?bid=81838&quot;&gt;http://book.naver.com/bookdb/book_detail.nhn?bid=81838&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://xmlangel.blogspot.com/feeds/8635355224188487201/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://xmlangel.blogspot.com/2015/05/blog-post.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8635355224188487201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9031349244162239552/posts/default/8635355224188487201'/><link rel='alternate' type='text/html' href='http://xmlangel.blogspot.com/2015/05/blog-post.html' title='[책] '/><author><name>xmlangel</name><uri>http://www.blogger.com/profile/06768340561601133092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>