<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
	<channel>
		<title><![CDATA[Workbook]]></title>
		<link>http://tuple.net/</link>
		<description><![CDATA[]]></description>
		<language>ko</language>
		<pubDate>Wed, 22 Jul 2026 12:37:19 +0900</pubDate>
		<lastBuildDate>Wed, 22 Jul 2026 12:37:19 +0900</lastBuildDate>
		<generator>XpressEngine</generator>
								<item>
			<title><![CDATA[Enabling and disabling services during start up in GNU/Linux]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143696</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143696</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143696#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;h1 class=&quot;post-title entry-title&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;Link : &lt;a href=&quot;http://www.aboutlinux.info/2006/04/enabling-and-disabling-services-during_01.html&quot;&gt;www.aboutlinux.info/2006/04/enabling-and-disabling-services-during_01.html&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;

&lt;h1 class=&quot;post-title entry-title&quot;&gt;&lt;small class=&quot;post-header-line-1&quot;&gt;&lt;span class=&quot;alignleft&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;date-header&quot;&gt;April 01, 2006&lt;/span&gt; &lt;span class=&quot;post-author vcard&quot;&gt;Posted by &lt;span class=&quot;fn&quot;&gt;Ravi&lt;/span&gt; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/small&gt;&lt;/h1&gt;

&lt;div class=&quot;post-body entry-content&quot;&gt;This guide shows you how to enable and disable services in Linux. This is the command line method of enabling and disabling services. Some Linux distributions like Fedora, Ubuntu and so on do provide a GUI front-end as well.&lt;br /&gt;
&lt;br /&gt;
In any Linux distribution, some services are enabled to start at boot up by default.&lt;br /&gt;
&lt;br /&gt;
On my machine, I have PCMCIA, &lt;a href=&quot;http://www.aboutlinux.info/2005/05/scheduling-tasks-in-linux-using-cron.html&quot;&gt;&lt;font color=&quot;#004d99&quot;&gt;Cron&lt;/font&gt;&lt;/a&gt;, Postfix &lt;a href=&quot;http://www.aboutlinux.info/2005/06/change-your-mail-transport-agent-mta.html&quot;&gt;&lt;font color=&quot;#004d99&quot;&gt;Mail Transport Agent&lt;/font&gt;&lt;/a&gt; ... just to name a few, which start during boot up.&lt;br /&gt;
&lt;a name=&quot;more&quot;&gt;&lt;/a&gt;

&lt;p class=&quot;note&quot;&gt;You should run only those services that are absolutely necessary. Disable the rest, as they can be potential security risks and also waste hardware resources.&lt;/p&gt;
&lt;br /&gt;
For example, my machine does not have any PCMCIA cards so I can safely disable it. Same is the case with Postfix which is also not used.&lt;br /&gt;
&lt;br /&gt;
So how do you disable these services so that they are not started at boot time?&lt;br /&gt;
&lt;br /&gt;
The answer to that depends on the type of Linux distribution you are using.&lt;br /&gt;
&lt;br /&gt;
True, many Linux distributions including Ubuntu bundle with them a GUI front end to accomplish the task which makes it easier to enable and disable the system services.&lt;br /&gt;
&lt;br /&gt;
But there is no standard GUI utility common across all Linux distributions. And this makes it worth while to learn how to enable and disable the services via the command line.&lt;br /&gt;
&lt;br /&gt;
Most Linux distributions have one thing in common. That being, all the start-up scripts are stored in the &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;/etc/init.d/&lt;/font&gt;&lt;/code&gt; directory.&lt;br /&gt;
&nbsp;
&lt;p class=&quot;info&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Update:&lt;/span&gt; As pointed out in the comments below, some Linux distributions such as Slackware use the BSD style of init scripts which are in &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;/etc/rc.d&lt;/font&gt;&lt;/code&gt;&lt;/p&gt;
&lt;br /&gt;
Lets say, you want to enable &lt;a href=&quot;http://www.aboutlinux.info/2006/02/host-websites-on-your-local-machine.html&quot;&gt;&lt;font color=&quot;#004d99&quot;&gt;Apache web server&lt;/font&gt;&lt;/a&gt; in different run levels. Then you should have a script related to the Apache web server in the &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;/etc/init.d/&lt;/font&gt;&lt;/code&gt; directory.&lt;br /&gt;
&lt;br /&gt;
The script is usually created at the time of installing the software. And in my machine (which runs Ubuntu), it is named &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;apache2&lt;/font&gt;&lt;/code&gt;. Where as in Red Hat, it is named &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;httpd&lt;/font&gt;&lt;/code&gt;. Usually, the script will have the same name as the process or daemon.&lt;br /&gt;
&lt;br /&gt;
Here I will explain different ways of enabling and disabling the system services.&lt;br /&gt;
&nbsp;
&lt;h3&gt;How to enable and disable services in Red Hat&lt;/h3&gt;
&lt;br /&gt;
Red Hat, Fedora, and Red Hat based Linux distributions such as CentOS make use of the script called &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;chkconfig&lt;/font&gt;&lt;/code&gt; to enable and disable the system services running in Linux.&lt;br /&gt;
&nbsp;
&lt;h4&gt;How to enable a service&lt;/h4&gt;
&lt;br /&gt;
As an example, lets enable the Apache web server to start in run levels 2, 3, and 5. This is how it is done.&lt;br /&gt;
&lt;br /&gt;
We first add the service using &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;chkconfig&lt;/font&gt;&lt;/code&gt; script. Then turn on the service at the desired run levels.&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# chkconfig httpd &lt;span style=&quot;color: red;&quot;&gt;--add&lt;/span&gt;
# chkconfig  httpd  &lt;span style=&quot;color: red;&quot;&gt;on&lt;/span&gt; --level 2,3,5&lt;/pre&gt;
&lt;br /&gt;
This will enable the Apache web server to automatically start in the run levels 2, 3 and 5. You can check this by running the command -&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# chkconfig &lt;span style=&quot;color: red;&quot;&gt;--list&lt;/span&gt; httpd&lt;/pre&gt;
&nbsp;

&lt;h4&gt;How to disable a service&lt;/h4&gt;
&nbsp;

&lt;pre&gt;
# chkconfig httpd &lt;span style=&quot;color: red;&quot;&gt;off&lt;/span&gt;
# chkconfig httpd &lt;span style=&quot;color: red;&quot;&gt;--del&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
Red Hat/Fedora also have a useful script called &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;service&lt;/font&gt;&lt;/code&gt; which can be used to &lt;span class=&quot;underline&quot;&gt;start or stop&lt;/span&gt; any service. For example, to start Apache web server using the &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;service&lt;/font&gt;&lt;/code&gt; script, the command is as follows -&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# service httpd &lt;span style=&quot;color: red;&quot;&gt;start&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
and to stop the service...&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# service httpd &lt;span style=&quot;color: red;&quot;&gt;stop&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
The options being &lt;span class=&quot;underline&quot;&gt;start&lt;/span&gt;, &lt;span class=&quot;underline&quot;&gt;stop&lt;/span&gt; and &lt;span class=&quot;underline&quot;&gt;restart&lt;/span&gt; which are self explanatory.&lt;br /&gt;
&nbsp;
&lt;h3&gt;How to enable or disable services in Debian / Ubuntu&lt;/h3&gt;
&lt;br /&gt;
To Enable and disable services across runlevels in Debian, Ubuntu, and other Debian based Linux distributions we use a script called &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;update-rc.d&lt;/font&gt;&lt;/code&gt;.&lt;br /&gt;
&nbsp;
&lt;h4&gt;How to enable a service&lt;/h4&gt;
&lt;br /&gt;
As an example, to enable Apache web server in Debian, do the following -&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# update-rc.d apache2 &lt;span style=&quot;color: red;&quot;&gt;defaults&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
... this will enable the Apache web server to start in the default run levels of 2,3,4 and 5. Of course, you can do it explicitly by giving the run levels instead of the &lt;span class=&quot;underline&quot;&gt;defaults&lt;/span&gt; keyword as follows:&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# update-rc.d apache2 &lt;span style=&quot;color: red;&quot;&gt;start&lt;/span&gt; 20 2 3 4 5 . &lt;span style=&quot;color: red;&quot;&gt;stop&lt;/span&gt; 80 0 1 6 .&lt;/pre&gt;
&lt;br /&gt;
The above command modifies the sym-links in the respective &lt;span class=&quot;underline&quot;&gt;/etc/rc&lt;span style=&quot;color: red;&quot;&gt;X&lt;/span&gt;.d&lt;/span&gt; directories to start or stop the service in the destined runlevels. Here &lt;span style=&quot;color: red;&quot;&gt;X&lt;/span&gt; stands for a value of 0 to 6 depending on the runlevel. One thing to note here is the dot (&lt;span style=&quot;color: red;&quot;&gt;.&lt;/span&gt;) which is used to terminate the set which is important. Also 20 and 80 are the sequence codes which decides in what order of precedence the scripts in the /etc/init.d/ directory should be started or stopped.&lt;br /&gt;
&lt;br /&gt;
To enable the service &lt;span class=&quot;underline&quot;&gt;only in runlevel 5&lt;/span&gt;, you do this instead -&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# update-rc.d apache2  start 20 &lt;span style=&quot;color: red;&quot;&gt;5&lt;/span&gt; . stop 80 0 1 2 3 4 6 .&lt;/pre&gt;
&nbsp;

&lt;h4&gt;How to disable a service&lt;/h4&gt;
&lt;br /&gt;
To disable the service in all the run levels, you execute the command:&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# update-rc.d &lt;span style=&quot;color: red;&quot;&gt;-f&lt;/span&gt; apache2 &lt;span style=&quot;color: red;&quot;&gt;remove&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
Here &lt;span style=&quot;color: red;&quot;&gt;-f&lt;/span&gt; option which stands for force is mandatory.&lt;br /&gt;
&nbsp;
&lt;h3&gt;How to enable or disable services in Gentoo&lt;/h3&gt;
&lt;br /&gt;
Gentoo Linux also uses a script to enable or disable services during boot-up. The name of the script is &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;rc-update&lt;/font&gt;&lt;/code&gt;. Gentoo has three default run levels. They are -&lt;br /&gt;
&nbsp;
&lt;ol&gt;
	&lt;li&gt;boot,&lt;/li&gt;
	&lt;li&gt;default and&lt;/li&gt;
	&lt;li&gt;nonetwork.&lt;/li&gt;
&lt;/ol&gt;
&nbsp;

&lt;h4&gt;How to enable a service&lt;/h4&gt;
&lt;br /&gt;
Lets set Apache web server to start in the &lt;span class=&quot;underline&quot;&gt;default&lt;/span&gt; runlevel.&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# rc-update &lt;span style=&quot;color: red;&quot;&gt;add&lt;/span&gt; apache2 default&lt;/pre&gt;
&nbsp;

&lt;h4&gt;How to disable a service&lt;/h4&gt;
&lt;br /&gt;
To remove the web server, use the &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;del&lt;/font&gt;&lt;/code&gt; option as follows.&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# rc-update &lt;span style=&quot;color: red;&quot;&gt;del&lt;/span&gt; apache2&lt;/pre&gt;
&nbsp;

&lt;h4&gt;List all running services&lt;/h4&gt;
&lt;br /&gt;
To &lt;span class=&quot;underline&quot;&gt;list all the running services&lt;/span&gt; at your run level and &lt;span class=&quot;underline&quot;&gt;check their status&lt;/span&gt;, you use the &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;rc-status&lt;/font&gt;&lt;/code&gt; command.&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# rc-status &lt;span style=&quot;color: red;&quot;&gt;--all&lt;/span&gt;&lt;/pre&gt;
&nbsp;

&lt;h3&gt;How to enable and disable services manually&lt;/h3&gt;
&lt;br /&gt;
I remember the first time I started using Linux, there were no such scripts to aid the user in enabling or disabling the services during start-up.&lt;br /&gt;
&lt;br /&gt;
You did it the old fashioned way which was creating or deleting symbolic links in the respective /etc/rc&lt;span style=&quot;color: red;&quot;&gt;X&lt;/span&gt;.d/ directories. Here &lt;span style=&quot;color: red;&quot;&gt;X&lt;/span&gt; in rcX.d is a number which stands for the runlevel.&lt;br /&gt;
&lt;br /&gt;
As an example, here is a listing of all the services started in runlevel 5 in my PC running Ubuntu.&lt;br /&gt;
&nbsp;
&lt;pre&gt;
ls -l /etc/rc5.d&lt;/pre&gt;
&lt;br /&gt;
And the output is ...&lt;br /&gt;
&nbsp;
&lt;pre&gt;
lrwxrwxrwx 1 root root  26 2012-03-18 21:10 S20apache2 -&gt; ../init.d/apache2
lrwxrwxrwx 1 root root  20 2011-10-27 12:46 S20kerneloops -&gt; ../init.d/kerneloops
lrwxrwxrwx 1 root root  17 2012-03-19 13:09 S20postfix -&gt; ../init.d/postfix
lrwxrwxrwx 1 root root  27 2011-10-27 12:46 S20speech-dispatcher -&gt; ../init.d/speech-dispatcher
... Shortened for brevity ...
lrwxrwxrwx 1 root root  22 2011-10-27 12:46 S99acpi-support -&gt; ../init.d/acpi-support
lrwxrwxrwx 1 root root  21 2011-10-27 12:46 S99grub-common -&gt; ../init.d/grub-common
lrwxrwxrwx 1 root root  18 2011-10-27 12:46 S99ondemand -&gt; ../init.d/ondemand
lrwxrwxrwx 1 root root  18 2011-10-27 12:46 S99rc.local -&gt; ../init.d/rc.local
&lt;/pre&gt;
&lt;br /&gt;
As you can see, all the content in the /etc/rc5.d directory are &lt;span class=&quot;underline&quot;&gt;symbolic links&lt;/span&gt; pointing to the corresponding script in the /etc/init.d directory.&lt;br /&gt;
&lt;br /&gt;
There can be two kinds of symbolic links in the /etc/rcX.d/ directories.&lt;br /&gt;
&lt;br /&gt;
One starts with the character &#039;S&#039; followed by a number between 0 and 99 to denote the priority, followed by the name of the service you want to enable.&lt;br /&gt;
&lt;br /&gt;
The second kind of symlink has a name which starts with a &#039;K&#039; followed by a number and then the name of the service you want to disable.&lt;br /&gt;
&lt;br /&gt;
So in any /etc/rcX.d directory, at any given time, for each service, there should be only one symlink of the &#039;S&#039; &lt;span class=&quot;underline&quot;&gt;OR&lt;/span&gt; &#039;K&#039; variety &lt;span class=&quot;underline&quot;&gt;but not both&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
So coming back to our Apache example, suppose I want to enable Apache web server in the run level 5 but want to disable it in all other run levels, I do the following:&lt;br /&gt;
&lt;br /&gt;
First to enable the service for run level 5, I move into &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;/etc/rc&lt;span style=&quot;color: red;&quot;&gt;5&lt;/span&gt;.d/&lt;/font&gt;&lt;/code&gt; directory and &lt;span class=&quot;underline&quot;&gt;create a symlink&lt;/span&gt; to the apache service script residing in the /etc/init.d/ directory as follows:&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# cd /etc/rc5.d/
# ln -s /etc/init.d/apache2 &lt;span style=&quot;color: red;&quot;&gt;S&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;20&lt;/span&gt;apache2&lt;/pre&gt;
&lt;br /&gt;
This creates a symbolic link in the /etc/rc5.d/ directory which the system interprets as - start (&lt;span style=&quot;color: red;&quot;&gt;S&lt;/span&gt;) the apache service before all the services which have a priority number &lt;span class=&quot;underline&quot;&gt;greater than&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;20&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
If you do a long listing of the directory /etc/rc5.d in your system, you can find a lot of symlinks similar to the one below.&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# ls -l /etc/rc5.d |grep apache2
lrwxrwxrwx 1 root root  26 2012-03-18 21:10 S20apache2 -&gt; ../init.d/apache2&lt;/pre&gt;
&lt;br /&gt;
Now if I start a service, I will want to stop the service while rebooting or while moving to single user mode and so on. So &lt;span class=&quot;underline&quot;&gt;in those run levels&lt;/span&gt; I have to create the symlinks starting with character &#039;&lt;span style=&quot;color: red;&quot;&gt;K&lt;/span&gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
So going back to the apache2 service example, if I want to automatically stop the service when the system goes into run level 0, 1 or 6, I will have to create the symlinks in the /etc/rc0.d, /etc/rc1.d/, /etc/rc6.d/ directories as follows -&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# cd /etc/rc0.d
# ln -s /etc/init.d/apache2 &lt;span style=&quot;color: red;&quot;&gt;K&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;80&lt;/span&gt;apache2&lt;/pre&gt;
&lt;br /&gt;
One interesting aspect here is the priority. Lower the number, the higher is the priority.&lt;br /&gt;
&lt;br /&gt;
So since the starting priority of apache2 is 20 - that is apache starts way ahead of other services during startup, we give it a stopping priority of 80.&lt;br /&gt;
&lt;br /&gt;
There is no hard and fast rule for this but usually, you follow the formula as follows:&lt;br /&gt;
&lt;br /&gt;
If you have &#039;N&#039; as the priority number for starting a service, you use the number (100-N) for the stopping priority number and vice versa.&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Mon, 20 Oct 2014 09:39:34 +0900</pubDate>
								</item>
				<item>
			<title><![CDATA[리눅스에서 서비스 설정하기]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143683</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143683</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143683#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;h2 class=&quot;post_title&quot;&gt;&lt;span style=&quot;font-size: 12px;&quot;&gt;&lt;a href=&quot;http://tobby48.egloos.com/1175861&quot; target=&quot;_blank&quot;&gt;tobby48.egloos.com/1175861&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;

&lt;div class=&quot;post_content&quot;&gt;
&lt;div class=&quot;post&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1. 런레벨 이해하기&lt;/span&gt;&lt;br /&gt;
리눅스의 machine state는 총 7개로 이루어져있다. 이는 리눅스의 시스템 가동 상태에 따라 달라지는데&lt;br /&gt;
&lt;br /&gt;
이를 런레벨이라고 한다. 우리가 서비스를 등록할때 어떤 런레벨에서 서비스를 자동 실행할 것인지를&lt;br /&gt;
&lt;br /&gt;
결정하게 되기 때문에 간단히 런레벨에 대해 알아보도록 하겠다.&lt;br /&gt;
&lt;br /&gt;
런레벨의 정의는 /etc/inittab에 주석으로 설명이 잘되어 있다.&lt;br /&gt;
&lt;br /&gt;
# vi /etc/inittab&lt;br /&gt;
&lt;br /&gt;
....&lt;br /&gt;
# Default runlevel. The runlevels used by RHS are:&lt;br /&gt;
#&nbsp;&nbsp; 0 - halt (Do NOT set initdefault to this) 종료모드&lt;br /&gt;
#&nbsp;&nbsp; 1 - Single user mode 단일 사용자 모드&lt;br /&gt;
#&nbsp;&nbsp; 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 다중 사용자 텍스트 모드&lt;br /&gt;
#&nbsp;&nbsp; 하지만 NFS를 쓰지 않는다.&lt;br /&gt;
#&nbsp;&nbsp; 3 - Full multiuser mode 다중 사용자 텍스트 모드&lt;br /&gt;
#&nbsp;&nbsp; 4 - unused 사용하지 않는다.&lt;br /&gt;
#&nbsp;&nbsp; 5 - X11 다중사용자 X windows 모드&lt;br /&gt;
#&nbsp;&nbsp; 6 - reboot (Do NOT set initdefault to this) 재가동 모드&lt;br /&gt;
#&lt;br /&gt;
id:5:initdefault:&lt;br /&gt;
&lt;br /&gt;
맨아래 설정은 부팅시 리눅스 시스템의 가동 방식을 정한다. 5번은 윈도우 부팅시 X windows 시스템에&lt;br /&gt;
&lt;br /&gt;
서 로그인하도록 하는 방식이다. 일반 텍스트 모드는 3번을 지정하면 된다.&lt;br /&gt;
&lt;br /&gt;
4번은 쓰지 않는 것이라기 보다는 사용자가 스스로 서비스를 구성할 수 있는 사용자 정의 런레벨이라&lt;br /&gt;
&lt;br /&gt;
할 수 있다. 나머지는 리눅스 시스템에서 사용하는 런레벨이다.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;2. chkconfig로 서비스 설정하기&lt;/span&gt;&lt;br /&gt;
chkconfig는 쉽게 서비스를 등록하거나 삭제, 혹은 특정 런레벨에서 서비스를 실행시키는 설정을 가능&lt;br /&gt;
&lt;br /&gt;
하게 합니다. man page를 보면 자세한 설명이 나온다.&lt;br /&gt;
&lt;br /&gt;
일단 새로운 서비스를 등록하기 전에 사전 작업이 필요하다.&lt;br /&gt;
&lt;br /&gt;
1) /etc/rc.d/init.d라는 디렉토리에 실행시킬 실행 스크립트를 넣어줘야 한다.&lt;br /&gt;
&lt;br /&gt;
&nbsp;- 이 디렉토리는 시스템 부팅시 초기화 과정 에서 실행 될 서비스들의 실행 스크립트가 모여있는 디렉&lt;br /&gt;
&lt;br /&gt;
토리이다. 그 rc.d 하위의&nbsp; rc.0, rc.1, rc.2 디렉토리는 각 런레벨에 따라 실행될 스크립트들이 init.d에 있&lt;br /&gt;
&lt;br /&gt;
는 스크립트 파일의 링크들을 가지고 있다.&lt;br /&gt;
&lt;br /&gt;
그런 다음에 해당 스크립트에 실행 priority, 중지 priority를 설정하는 엔트리를 넣어주고,&lt;br /&gt;
&lt;br /&gt;
chkconfig, description는 필수적으로 입력해야 서비스에 등록된다. 그외에 엔트리들은 옵션사항이다.&lt;br /&gt;
&lt;br /&gt;
# vi /etc/rc.d/init.d/sendmail&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# sendmail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This shell script takes care of starting and stopping&lt;br /&gt;
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sendmail.&lt;br /&gt;
#&lt;br /&gt;
# chkconfig: 2345 80 30&lt;br /&gt;
# description: Sendmail is a Mail Transport Agent, which is the program \&lt;br /&gt;
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that moves mail from one machine to another.&lt;br /&gt;
# processname: sendmail&lt;br /&gt;
# config: /etc/mail/sendmail.cf&lt;br /&gt;
# pidfile: /var/run/sendmail.pid&lt;br /&gt;
....&lt;br /&gt;
&lt;br /&gt;
chkconfig:&lt;space&gt;run-level&lt;sapce&gt;시작 우선순위&lt;space&gt;종료 우선순위&lt;br /&gt;
run-level은 실행될 수 있는 런레벨을 지정한다. 위에서 2345는 레벨 2, 3, 4, 5라면 이 서비스는 시작된다&lt;br /&gt;
는 의미가 된다.&nbsp; 런레벨을 -로 입력하면 어떤 레벨에서든지 시작하지 않겠다는 뜻이다. 즉, 부팅시 자&lt;br /&gt;
동 시작을 안하겠다는 것이다.&lt;br /&gt;
&lt;br /&gt;
2) service 등록&lt;br /&gt;
# chkconfig --add &lt;service name&gt;&lt;br /&gt;
service name은 init.d에 있는 스크립트의 파일명이 된다.&lt;br /&gt;
&lt;br /&gt;
# chkconfig --add sendmail&lt;br /&gt;
sendmail 서비스를 등록한다.&lt;br /&gt;
add할 경우 chkconfig 엔트리에 내용대로 런레벨의 on/off가 적용된다.&lt;br /&gt;
&lt;br /&gt;
3) service on/off/reset&lt;br /&gt;
해당 서비스를 on/off할 것인 지를 정한다.&lt;br /&gt;
만일,&lt;br /&gt;
# chkconfig sendmail off&lt;br /&gt;
라고 하면, on 되어 있는 모든 런레벨을 off해버린다.&lt;br /&gt;
&lt;br /&gt;
# chkconfig sendmail on&lt;br /&gt;
엔트리의 내용대로 런레벨의 on이 되어 진다.&lt;br /&gt;
&lt;br /&gt;
# chkconfig --level 2345 sendmail on&lt;br /&gt;
위의 명령어는 런레벨 2,3,4,5에서 sendmail 서비스를 시작하겠다는 뜻이다.&lt;br /&gt;
&lt;br /&gt;
# chkconfig sendmail reset&lt;br /&gt;
reset은 on/off 설정을 원래대로 돌리는 것이다. 현재 sendmail이 2,3,4,5 레벨에서 실행하게 되어 있지만,&lt;br /&gt;
이후에 2,3을 off시켰다고 하자. 그런다음 reset을 하면 다시 2,3이 on으로 설정된다.&lt;br /&gt;
&lt;br /&gt;
4) 서비스 삭제&lt;br /&gt;
# chkconfig --del sendmail&lt;br /&gt;
sendmail서비스를 삭제한다.&lt;br /&gt;
&lt;br /&gt;
4) 서비스 리스트 보기&lt;br /&gt;
# chkconfig --list&lt;br /&gt;
이것은 모든 서비스 리스트를 보여주는 것이다.&lt;br /&gt;
&lt;br /&gt;
# chkconfig --list sendmail&lt;br /&gt;
list중에 sendmail만 보여준다.&lt;/div&gt;

&lt;div class=&quot;post&quot;&gt;&nbsp;&lt;/div&gt;

&lt;div class=&quot;post&quot;&gt;&nbsp;&lt;/div&gt;

&lt;div class=&quot;post&quot;&gt;
&lt;h4&gt;How to disable a service&lt;/h4&gt;

&lt;pre&gt;
# chkconfig httpd &lt;span style=&quot;color: red;&quot;&gt;off&lt;/span&gt;
# chkconfig httpd &lt;span style=&quot;color: red;&quot;&gt;--del&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
Red Hat/Fedora also have a useful script called &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;service&lt;/font&gt;&lt;/code&gt; which can be used to &lt;span class=&quot;underline&quot;&gt;start or stop&lt;/span&gt; any service. For example, to start Apache web server using the &lt;code&gt;&lt;font face=&quot;Consolas&quot; style=&quot;background-color: rgb(244, 248, 249);&quot;&gt;service&lt;/font&gt;&lt;/code&gt; script, the command is as follows -&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# service httpd &lt;span style=&quot;color: red;&quot;&gt;start&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
and to stop the service...&lt;br /&gt;
&lt;br /&gt;
&nbsp;
&lt;pre&gt;
# service httpd &lt;span style=&quot;color: red;&quot;&gt;stop&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
The options being &lt;span class=&quot;underline&quot;&gt;start&lt;/span&gt;, &lt;span class=&quot;underline&quot;&gt;stop&lt;/span&gt; and &lt;span class=&quot;underline&quot;&gt;restart&lt;/span&gt; which are self explanatory.&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Mon, 20 Oct 2014 09:29:46 +0900</pubDate>
						<category><![CDATA[service]]></category>
						<category><![CDATA[linux]]></category>
								</item>
				<item>
			<title><![CDATA[Swap 메모리]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143678</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143678</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143678#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;h2&gt;&lt;a href=&quot;http://knight76.tistory.com/entry/Swap-메모리&quot;&gt;Swap 메모리&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;span class=&quot;category&quot;&gt;&lt;a href=&quot;http://knight76.tistory.com/category/c%20or%20%20linux&quot;&gt;c or linux&lt;/a&gt; &lt;/span&gt; &lt;span class=&quot;date&quot;&gt;2012/01/05 12:04&lt;/span&gt; &lt;!-- titleWrap close --&gt;&lt;/p&gt;

&lt;div class=&quot;article&quot;&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size=&quot;4&quot;&gt;시작하며..&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;리눅스의 swap 메모리에 대해서 이해한다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size=&quot;4&quot;&gt;본론&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;만약 어플리케이션의 RAM 용량이 차면, swap 메모리가 자동으로 늘어나도록 되어 있다. 하드디스크의 디스크를 swap 메모리로 만들기 때문에 속도가 느려진다. 또한 RAM의 용량보다 2배로 swap 메모리를 잡도록 되어 있다. (참조 : &lt;a href=&quot;http://vr.org/docs/centos/4/html/rhel-sag-en-4/ch-swapspace.html&quot; title=&quot;http://vr.org/docs/centos/4/html/rhel-sag-en-4/ch-swapspace.html&quot;&gt;http://vr.org/docs/centos/4/html/rhel-sag-en-4/ch-swapspace.html&lt;/a&gt;) 시스템 엔지니어는 이런 이슈로 리눅스 서버를 셋팅할 때 swap 영역을 얼마나 잡을지 판단해야 한다. 때로는 개발자가 이 부분을 고쳐 성능을 향상 시킬 수 있다. (참고 : &lt;a href=&quot;https://wiki.archlinux.org/index.php/Swap&quot; title=&quot;https://wiki.archlinux.org/index.php/Swap&quot;&gt;https://wiki.archlinux.org/index.php/Swap&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
개인적으로는 메모리가 갑자기 부족한 경우를 제외하고는 swap 자체를 안쓰는 것을 선호한다. 성능상 swap 메모리를 쓰는 것보다 swap in , swap out이 성능을 무너뜨리는 것을 많이 봐왔다. 또한 너무 크게 사용하는 것도 경계한다. (난 보수적인 사람이 되었나 보다… 아직 적절히 활용한 대용량 처리 사례를 못해봐서 그런지도 모르겠다. ) 차라리 RAM 하나 더 꽂는게 더 나은 것 같다.&lt;/p&gt;

&lt;p&gt;하지만 DB나, 오픈 소스 대용량 처리 어플리케이션의 경우에서는 swap을 많이 활용하려고 하고 있다는 사실이다. 어떻게 하든 속도를 내기 위해서 메모리에서 처리하려다 보니 swap을 쓸 수 밖에 없는 구조로 가고, 너무 많이 써서 문제가 되니 다시 mlock으로 막는 구조로 가는 부분으로 처리하는 형태로 가고 있다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;1. swap 및 ram 메모리 상태 보기&lt;/p&gt;

&lt;p&gt;free 명령어를 이용해서 간단히 살펴볼 수 있다.&lt;/p&gt;

&lt;table border=&quot;3&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;584&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td valign=&quot;top&quot; width=&quot;578&quot;&gt;# free&lt;br /&gt;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; used&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; free&nbsp;&nbsp;&nbsp;&nbsp; shared&nbsp;&nbsp;&nbsp; buffers&nbsp;&nbsp;&nbsp;&nbsp; cached&lt;br /&gt;
			Mem:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4150252&nbsp;&nbsp;&nbsp; 3991868&nbsp;&nbsp;&nbsp;&nbsp; 158384&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 78504&nbsp;&nbsp;&nbsp; 2265916&lt;br /&gt;
			-/+ buffers/cache:&nbsp;&nbsp;&nbsp; 1647448&nbsp;&nbsp;&nbsp; 2502804&lt;br /&gt;
			Swap:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2096472&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 208&nbsp;&nbsp;&nbsp; 2096264&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;2. Swap 메모리 설정하는 방법&lt;/p&gt;

&lt;p&gt;리눅스 커널 2.6부터 swap 메모리를 설정할 수 있다. swap 영역은 dd 명령어와 mkswap 명령어를 이용해서 swap을 만들 수 있다. (&lt;a href=&quot;http://www.artwork.com/gdsii/qckvu/faq/linux_swap.htm&quot; title=&quot;http://www.artwork.com/gdsii/qckvu/faq/linux_swap.htm&quot;&gt;http://www.artwork.com/gdsii/qckvu/faq/linux_swap.htm&lt;/a&gt;) 이렇게 만들어진 영역은 swap 메모리로 쓰고 있다는 뜻이다. 아래의 예는 swap을 2G 정도만 쓰고 있다는 것을 의미한다.&lt;/p&gt;

&lt;table border=&quot;3&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;582&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td valign=&quot;top&quot; width=&quot;576&quot;&gt;# cat /proc/swaps&lt;br /&gt;
			Filename&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size&nbsp;&nbsp;&nbsp; Used&nbsp;&nbsp;&nbsp; Priority&lt;br /&gt;
			/dev/cciss/c0d0p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; partition&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2096472&nbsp;&nbsp;&nbsp; 208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;3. Swap 메모리 사용 빈도 설정 방법&lt;/p&gt;

&lt;p&gt;swap 메모리를 사용 빈도를 확인하는 방법은 vm.swappiness 정보를 보는 것이다. centos를 비롯한 일부 서버는 디폴트로 60으로 잡혀 있다.&lt;/p&gt;

&lt;table border=&quot;3&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;582&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td valign=&quot;top&quot; width=&quot;576&quot;&gt;]# sysctl vm.swappiness&nbsp;&nbsp; (또는 cat /proc/sys/vm/swappiness 으로 확인 가능)&lt;br /&gt;
			vm.swappiness = 60&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;vm.swapiness 정보는 커널 파라미터이며 swap 영역을 얼마나 더 보겠냐 (또는 회피하겠냐)는 의미를 가지고 있다. (kernel&#039;s preference (or avoidance) of swap space) 여기에 0의 값을 넣으면 swap을 최대한 쓰지 않겠다는 의미이다. 만약 100은 하드디스크의 swap영역을 최대한 활용하겠다는 의미이다.&lt;/p&gt;

&lt;p&gt;제일 이슈는 swap 메모리가 많이 잡혀 있는 것보다 얼마나 사용하고 있는지를 측정하는 것이 좋다. free나 cat /proc/swaps 명령어를 이용해서 해결할 수 있다.&lt;/p&gt;

&lt;p&gt;만약 swap 메모리를 쓰지 않으려면, vm.swappiness를 0으로 셋팅하면 된다.&lt;/p&gt;

&lt;p&gt;/etc/sysctl.conf 에 ‘vm.swappiness=0 ‘ 설정을 추가하고, ‘echo 0 &gt; /proc/sys/vm/swappiness ‘ 명령어를 이용해서 적용한다.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
* Reference&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;line-height: normal; font-size: 18px;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;&lt;a href=&quot;http://forums.gentoo.org/viewtopic.php?t=175419&quot;&gt;http://forums.gentoo.org/viewtopic.php?t=175419&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(254, 254, 184); background-color: rgb(254, 254, 184);&quot;&gt;&lt;span style=&quot;line-height: normal; font-size: 18px;&quot;&gt;&lt;span style=&quot;color: darkblue;&quot;&gt;5. Swappiness (2.6 kernels)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Since 2.6, there has been a way to tune how much Linux favors swapping out to disk compared to shrinking the caches when memory gets full.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: indigo;&quot;&gt;ghoti adds:&lt;/span&gt;&lt;br /&gt;
When an application needs memory and all the RAM is fully occupied, the kernel has two ways to free some memory at its disposal: it can either reduce the disk cache in the RAM by eliminating the oldest data or it may swap some less used portions (pages) of programs out to the swap partition on disk.&lt;br /&gt;
It is not easy to predict which method would be more efficient.&lt;br /&gt;
The kernel makes a choice by roughly guessing the effectiveness of the two methods at a given instant, based on the recent history of activity.&lt;br /&gt;
&lt;br /&gt;
Before the 2.6 kernels, the user had no possible means to influence the calculations and there could happen situations where the kernel often made the wrong choice, leading to thrashing and slow performance. The addition of swappiness in 2.6 changes this.&nbsp;&lt;br /&gt;
&nbsp;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
&nbsp;&lt;/p&gt;

&lt;p&gt;또한 vfs_cache_pressure 라는 값을 0으로 잡아, 커널의 cache를 빨리 날려줄 수 있도록 한다. linux에서는 어플에서 처리한 남는 메모리를 바로 free되지 않고 buffer cache에 남게 한다. 이를 이용하면 free memory를 더 확보할 수 있다.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
4. swap in, swap out 확인하는 방법&lt;/p&gt;

&lt;p&gt;sar 명령어를 이용하면 메모리 상태를 확인할 수 있다.&lt;/p&gt;

&lt;table border=&quot;3&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;576&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td valign=&quot;top&quot; width=&quot;570&quot;&gt;
			&lt;p&gt;]# sar -r -s 11:41:00&lt;br /&gt;
			Linux 2.6.9-78.ELsmp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/p&gt;

			&lt;p&gt;11시 41분 kbmemfree kbmemused&nbsp; %memused kbbuffers&nbsp; kbcached kbswpfree kbswpused&nbsp; %swpused&nbsp; kbswpcad&lt;br /&gt;
			11시 42분&nbsp;&nbsp; 5932304&nbsp; 10700956&nbsp;&nbsp;&nbsp;&nbsp; 64.33&nbsp;&nbsp;&nbsp; 358820&nbsp;&nbsp; 1087040&nbsp;&nbsp; 2096280&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&lt;br /&gt;
			Average:&nbsp;&nbsp;&nbsp; 5932304&nbsp; 10700956&nbsp;&nbsp;&nbsp;&nbsp; 64.33&nbsp;&nbsp;&nbsp; 358820&nbsp;&nbsp; 1087040&nbsp;&nbsp; 2096280&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;sar 명령어의 –B 파라미터는 swapping 통계를 낸다.&lt;/p&gt;

&lt;table border=&quot;3&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;578&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td valign=&quot;top&quot; width=&quot;572&quot;&gt;
			&lt;p&gt;]# sar -B 2 5&lt;br /&gt;
			Linux 2.6.9-78.ELsmp&lt;/p&gt;

			&lt;p&gt;11시 41분 28초&nbsp; pgpgin/s pgpgout/s&nbsp;&nbsp; fault/s&nbsp; majflt/s&lt;br /&gt;
			11시 41분 30초&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.04&nbsp;&nbsp;&nbsp;&nbsp; 75.51&nbsp;&nbsp;&nbsp;&nbsp; 21.43&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&lt;br /&gt;
			11시 41분 32초&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 359.49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&lt;br /&gt;
			11시 41분 34초&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 258.46&nbsp;&nbsp;&nbsp;&nbsp; 19.49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;5. 이슈&lt;/p&gt;

&lt;p&gt;jvm 영역에서 사용된 메모리는 언제나 swap 영역으로 이동될 수 있다.&nbsp;&lt;br /&gt;
jvm 에서 nio를 사용하는 경우 (예, DirectBuffer) 에는 리눅스 운영체제가 언제든지 swap 영역으로 이동할 수 있다. 이를 방지하기 위해서는 mlock/mlockall 시스템 콜을 이용해서 특정 virtual address를 ram 에 묶어 둘 수 있게 한다.&lt;/p&gt;

&lt;p&gt;mlock을 쓰는 방식이 cassandra 0.6.5 에서 추가되었다.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Fri, 17 Oct 2014 11:30:50 +0900</pubDate>
								</item>
				<item>
			<title><![CDATA[ElasticSearch 설치 및 샘플 사용기]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143545</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143545</guid>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;h1&gt;출처: &lt;a href=&quot;http://www.mimul.com/pebble/default/2012/02/23/1329988075236.html&quot;&gt;http://www.mimul.com/pebble/default/2012/02/23/1329988075236.html&lt;/a&gt;&lt;/h1&gt;

&lt;h1&gt;&lt;a href=&quot;http://www.mimul.com/pebble/default/2012/02/23/1329988075236.html&quot;&gt;ElasticSearch 설치 및 샘플 사용기&lt;/a&gt;&lt;/h1&gt;

&lt;h2&gt;Get Started with ElasticSearch&lt;/h2&gt;

&lt;div class=&quot;contentItemBody&quot;&gt;&lt;b&gt;1. ElasticSearch란?&lt;/b&gt;&lt;br /&gt;
- 특징&lt;br /&gt;
. 분산 검색 엔진 : 하나의 shard 가 깨졌을 때에, 다른 replica 되어 있는 곳에서 자동적으로 이동하여 보여줌으로써 SPOF 제거.&lt;br /&gt;
. 다중 타입을 가지는 다중 Tenant(하나 이상의 인덱스를 지원, 인덱스마 다 하나 이상의 타입을 지원, index level 별로 컨트롤 가능).&lt;br /&gt;
. JSON을 사용하여 index Data를 다루기 편함.&lt;br /&gt;
. index 구성을 다양한곳에 가능. 메모리, (분산)파일시스템, NoSQL 등&lt;br /&gt;
. 문서 지향(미리 스키마 정의를 할 필요 없음, 색인 작업의 사용자 정의를 위해 스키마는 타입마다 정의할 수 있음).&lt;br /&gt;
. 장기간 지속을 위해 신뢰, 비동기 쓰기 가능.&lt;br /&gt;
. 실시간 검색 가능&lt;br /&gt;
. 설치 및 사용이 비교적 쉬움.&lt;br /&gt;
. 다양한 API/클라이언트 모듈 지원.&lt;br /&gt;
&lt;br /&gt;
- 아키텍처&lt;br /&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.mimul.com/pebble/default/images/blog/cloud/elasticSearch_arch.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. 설치 및 구동&lt;/b&gt;&lt;br /&gt;
- 설치(mimul01, mimul02 클러스터링 구조)
&lt;pre&gt;
wget --no-check-certificate 
 https://github.com/downloads/elasticsearch/elasticsearch/
  elasticsearch-0.19.0.RC2.tar.gz
tar zvfz elasticsearch-0.19.0.RC2.tar.gz
ln -s elasticsearch-0.19.0.RC2 elasticsearch
//아래처럼 실행 및 설정 옵션을 추가/수정한다.
&lt;/pre&gt;
&lt;br /&gt;
- File Descriptors&lt;br /&gt;
. -Des.max-open-files=true&lt;br /&gt;
&lt;br /&gt;
- Memory Settings&lt;br /&gt;
. bootstrap.mlockall=true(default : false) //호출한 프로세스의 주소 공간에 대응되는 모든 페이지에 대한 페이징을 금지. 만약 true 일 경우, -Xms 와 -Xmx 할당 크기를 동일하게 맞추어 주는 것이 좋다.&lt;br /&gt;
&lt;br /&gt;
- config/elasticsearch.yml 환경 설정(JSON 방식도 있음)&lt;br /&gt;
. cluster.name: 유니크한 클러스트 네임 지정.&lt;br /&gt;
. network.bind_host: mimul01 //해당 호스트 이름.&lt;br /&gt;
. network.publish_host: mimul01 //해당 호스트 이름.&lt;br /&gt;
. network.host: mimul01 //해당 호스트 이름.&lt;br /&gt;
. 9200 : http, 9300 : tcp 통신하는 디폴트 포트임.&lt;br /&gt;
. path.data: /logs/elasticsearch-data1,/logs/elasticsearch-data2&lt;br /&gt;
. path.logs: /logs/elasticsearch-log&lt;br /&gt;
.discovery.zen.ping.unicast.hosts: [&quot;mimul01:9300&quot;, &quot;mimul02:9300&quot;]&lt;br /&gt;
&lt;br /&gt;
- /config/logging.yml(log4j 기반 로그 설정)&lt;br /&gt;
&lt;br /&gt;
- index 설정&lt;br /&gt;
. index.compound_format : 기본 false고, open file handles 갯수 조정이 필요.&lt;br /&gt;
. index.term_index_interval&lt;br /&gt;
&gt; 값이 크면 reader/searcher 에서 memory 사용은 적게 하나, random access 가 느려짐.&lt;br /&gt;
&gt; 값이 작으면 reader/searcher 에서 memory 사용은 많이 하나, random access 가 빨라짐.&lt;br /&gt;
&lt;br /&gt;
- API&lt;br /&gt;
. HTTP, thrift, memcached 지원.&lt;br /&gt;
. parameter option 으로 ?pretty=true 를 주면 JSON 타입을 읽기 편함.&lt;br /&gt;
. JSONP 지원.&lt;br /&gt;
&lt;br /&gt;
- Query &amp; Filter&lt;br /&gt;
. Query는 full text와 Terms, Filter는 Terms만 지원.&lt;br /&gt;
. Query는 Scoring 가능, Filter는 Scoring 불가능.&lt;br /&gt;
. Query는 응답 속도 늦고, Filter는 응답속도 빠름.&lt;br /&gt;
. Query는 캐싱 안되고, Filter는 캐싱됨.&lt;br /&gt;
&lt;br /&gt;
- 구동
&lt;pre&gt;
&gt; bin/elasticsearch -f -Xmx1g -Xms1g -Des.max-open-files=true 
-Des.config=config/elasticsearch.yml
// -f :  //Foreground 로 실행
// -f 생략하면 Background 로 실행 
//포트 바꿀 경우 아래 옵션 사용
//-Des.http.port=14000
//-Des.transport.tcp.port=9400
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. ElasticSearch 구동 확인&lt;/b&gt;&lt;br /&gt;
- 정상 구동 확인
&lt;pre&gt;
[mimul01]/logs&gt; curl -X GET http://mimul01:9200/
{
  &quot;ok&quot; : true,
  &quot;status&quot; : 200,
  &quot;name&quot; : &quot;Lasher&quot;,
  &quot;version&quot; : {
    &quot;number&quot; : &quot;0.19.0.RC2&quot;,
    &quot;snapshot_build&quot; : false
  },
  &quot;tagline&quot; : &quot;You Know, for Search&quot;
} 
&lt;/pre&gt;
&lt;br /&gt;
- cluster state 확인&lt;br /&gt;
. http://mimul01:9200/_status&lt;br /&gt;
. http://mimul01:9200/_cluster/health&lt;br /&gt;
. http://mimul01:9200/_cluster/state&lt;br /&gt;
&lt;br /&gt;
- API 테스트(인덱스 생성/조회)
&lt;pre&gt;
&gt; curl -XPUT &#039;http://mimul01:9200/myindex/user/mimul&#039; -d &#039;{ &quot;name&quot; : &quot;HoJin Ha&quot; }&#039;
{&quot;ok&quot;:true,&quot;_index&quot;:&quot;myindex&quot;,&quot;_type&quot;:&quot;user&quot;,&quot;_id&quot;:&quot;mimul&quot;,&quot;_version&quot;:1}

&gt; curl -XGET &#039;http://mimul01:9200/myindex/user/mimul?pretty=true&#039;
{
  &quot;_index&quot; : &quot;myindex&quot;,
  &quot;_type&quot; : &quot;user&quot;,
  &quot;_id&quot; : &quot;mimul&quot;,
  &quot;_version&quot; : 1,
  &quot;exists&quot; : true, &quot;_source&quot; : { &quot;name&quot; : &quot;HoJin Ha&quot; }
&lt;/pre&gt;
&lt;br /&gt;
- Admin Tool
&lt;pre&gt;
&gt; plugin -install mobz/elasticsearch-head
http://mimul01:9200/_plugin/head/
&lt;/pre&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://www.mimul.com/pebble/default/images/blog/cloud/elasticSearch_head.png&quot; width=&quot;550&quot; /&gt;&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Wed, 08 Oct 2014 16:59:51 +0900</pubDate>
								</item>
				<item>
			<title><![CDATA[ELK Stack 설치 및 테스트]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143543</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143543</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143543#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;p&gt;elasticsearch-1.3.4 / logstash-1.4.2 / kibana-3.1.1 기준으로 재 테스트&lt;/p&gt;

&lt;p&gt;&nbsp;==&gt; 수정사항은 아래에 표기를 따로 하겠슴.&lt;/p&gt;

&lt;h2&gt;&lt;a href=&quot;http://blog.embian.com/29&quot;&gt;Elasticsearch 1.0.1, Logstash 1.4.0, Kibana 3.0.0 GA installation and Kibana Tutorial&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;span class=&quot;category&quot;&gt;&lt;a href=&quot;http://blog.embian.com/category/Real-time%20Big%20Data&quot;&gt;Real-time Big Data&lt;/a&gt; &lt;/span&gt; &lt;span class=&quot;date&quot;&gt;2014/04/15 10:18&lt;/span&gt; &lt;!-- titleWrap close --&gt;&lt;/p&gt;

&lt;div class=&quot;article&quot;&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 20px; font-size: 10pt; background-color: transparent;&quot;&gt;얼마전 &lt;/span&gt;&lt;a class=&quot;tx-link&quot; href=&quot;http://blog.embian.com/18&quot; style=&quot;line-height: 20px; font-size: 10pt; background-color: transparent;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: rgb(65, 116, 217);&quot;&gt;ELK Stack이 Splunk 대체 Solution으로서 적합한가&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 20px; font-size: 10pt; background-color: transparent;&quot;&gt;에 대해 논하고자 글을 적었다. ELK Stack을 사용해보고 Splunk와&nbsp;비교하기 위해 글을 적으며 ELK Stack의 간단한 소개와 설치, 설정, 사용법에 대해 다룬 적이 있다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;하지만 얼마 지나지않아&nbsp;Elasticsearch, Logstash, Kibana가 새로운 버전을 선보였다. 이에 이 글에서는 새로워진 ELK Stack을 사용해보고자 설치와 설정 및 사용법에 대해&nbsp;설명한다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;ELK Stack이 무엇인지 잘 모른다면 &lt;a class=&quot;tx-link&quot; href=&quot;http://blog.embian.com/18&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: rgb(65, 116, 217);&quot;&gt;이전 글&lt;/span&gt;&lt;/a&gt;을 참고하길 바란다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 24pt;&quot;&gt;설치 및 설정&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;아래의 내용은 1대의 Server 환경에서 설치 및 설정한 경우이며, Elasticsearch는 1.0.1,&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;Logstash는 1.4.0 GA, Kibana는 3.0.0 GA를 사용하였다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 14pt;&quot;&gt;Elasticsearch 설치 및 설정&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;(1) Elasticsearch 홈페이지에서 E&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;lasticsearch의&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;zip파일을&nbsp;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.elasticsearch.org/overview/elkdownloads/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: rgb(65, 116, 217);&quot;&gt;다운&lt;/span&gt;&lt;/a&gt;받아 unzip한다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; width: 653px; font-family: 돋움; font-size: 12px; border-collapse: collapse;&quot; width=&quot;653&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 652px; height: 24px;&quot;&gt;
			&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;width: 649px; height: auto; display: inline-block;&quot;&gt;&lt;span dir=&quot;http://cfile25.uf.tistory.com/original/2733D84B53300C79226490&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;364&quot; src=&quot;http://cfile25.uf.tistory.com/image/2733D84B53300C79226490&quot; style=&quot;cursor: pointer;&quot; width=&quot;649&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;(2) Elasticsearch 모니터링을 위한 Plugin을 설치 한다.&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; width: 594px; font-size: 12px; border-collapse: collapse;&quot; width=&quot;594&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 593px; height: 24px; background-color: rgb(255, 217, 236);&quot;&gt;
			&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&nbsp;&lt;span style=&quot;font-family: &quot;Courier New&quot;;&quot;&gt;&nbsp;$ bin/plugin --install mobz/elasticsearch-head&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;(3) config/elasticsearch.yml의 node.name을 지정한다. 이는 노드&nbsp;식별을&nbsp;위한 이름이므로 유일성과 의미를 가진 이름을 사용한다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 14pt;&quot;&gt;Logstash 설치 및 설정&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;(1) Elasticsearch 홈페이지에서 Logstash의&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 20px; font-family: Dotum, 돋움; font-size: 13px; background-color: transparent;&quot;&gt;zip파일을&nbsp;&lt;span style=&quot;color: rgb(65, 116, 217);&quot;&gt;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.elasticsearch.org/overview/elkdownloads/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: rgb(65, 116, 217);&quot;&gt;다운&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;받아 unzip한다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; width: 653px; font-family: 돋움; font-size: 12px; border-collapse: collapse;&quot; width=&quot;653&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 652px; height: 24px;&quot;&gt;
			&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;width: 649px; height: auto; display: inline-block;&quot;&gt;&lt;span dir=&quot;http://cfile6.uf.tistory.com/original/2618154A53300CAE35EE28&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;372&quot; src=&quot;http://cfile6.uf.tistory.com/image/2618154A53300CAE35EE28&quot; style=&quot;cursor: pointer;&quot; width=&quot;649&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;text-align: center; color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;(2) Logstash&nbsp;Config File을 생성하여 다음과 같이 저장한다.&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; font-size: 12px; border-collapse: collapse;&quot; width=&quot;594&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 594px; height: 24px; background-color: rgb(255, 217, 236);&quot;&gt;
			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;은 바탕&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; input {&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;은 바탕&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; file {&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; &nbsp; path =&gt; &quot;/var/log/apache2/access.log&quot;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; &nbsp; type =&gt; &quot;apache&quot;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; }&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; }&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&nbsp;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; filter {&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; grok {&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; &nbsp; type =&gt; &quot;apache&quot;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; &nbsp; pattern =&gt; &quot;%{COMBINEDAPACHELOG}&quot;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; }&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&nbsp;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; date {&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; &nbsp; type =&gt; &quot;apache&quot;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; &nbsp; match =&gt; [ &quot;timestamp&quot;, &quot;dd/MMM/yyyy:HH:mm:ss Z&quot; ]&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; &nbsp; }&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; }&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&nbsp;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;&nbsp; output {&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

			&lt;p style=&quot;line-height: 12px; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elasticsearch {&lt;br /&gt;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host =&gt; localhost&lt;br /&gt;
			&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&lt;br /&gt;
			&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stdout { codec =&gt; rubydebug }&lt;/span&gt;&lt;br /&gt;
			&lt;font color=&quot;#000000&quot;&gt;&lt;font face=&quot;은 바탕&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;font-family: &quot;Courier New&quot;; font-size: 10pt; background-color: transparent;&quot;&gt;&nbsp; }&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;==&gt; logstach1.4.3 버젼에서 Error 가 발생되어&nbsp; output 부분은 수정함.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 14pt;&quot;&gt;Kibana 설치 및 설정&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;(1) Elasticsearch 홈페이지에서 Kibana&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;의&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;zip파일을&nbsp;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.elasticsearch.org/overview/elkdownloads/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: rgb(65, 116, 217);&quot;&gt;다운&lt;/span&gt;&lt;/a&gt;받아 unzip한다.&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; width: 654px; font-size: 12px; border-collapse: collapse;&quot; width=&quot;654&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 653px; height: 24px;&quot;&gt;
			&lt;p&gt;&nbsp;&lt;span class=&quot;imageblock&quot; style=&quot;width: 649px; height: auto; text-align: center; line-height: 1.5; font-size: 9pt; display: inline-block; background-color: transparent;&quot;&gt;&lt;span dir=&quot;http://cfile25.uf.tistory.com/original/275E194C53300CE5145E9E&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;463&quot; src=&quot;http://cfile25.uf.tistory.com/image/275E194C53300CE5145E9E&quot; style=&quot;cursor: pointer;&quot; width=&quot;649&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;(2) unzip한 파일은 Elasticsearch의 Plugin에 넣어 사용한다. 경로는 다음과 같다.&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; font-size: 12px; border-collapse: collapse;&quot; width=&quot;594&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 594px; height: 24px; background-color: rgb(255, 217, 236);&quot;&gt;
			&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;&nbsp;&nbsp;&lt;span style=&quot;font-family: &quot;Courier New&quot;;&quot;&gt;path/to/elasticsearch/plugins/&lt;b&gt;kibana/_site&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(3) path/to/elasticsearch&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;plugins/kibana/_site/config.js의 Elasticsearch Server URL을 지정한다.&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;&nbsp; &nbsp; &nbsp;(예:&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;elasticsearch: &quot;http://localhost:9200&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&nbsp;==&gt; config.js 파일에서 localhost 를 실제 IP 로 작성해야, 다른 서버에서는 접속 가능한 것 같다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 24pt;&quot;&gt;실행&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 14pt;&quot;&gt;Elasticsearch 실행&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;unzip한&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;Elasticsearch 디렉토리안에서 실행한다.&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; font-size: 12px; border-collapse: collapse;&quot; width=&quot;594&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 594px; height: 24px; background-color: rgb(255, 217, 236);&quot;&gt;
			&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;&nbsp;&lt;span style=&quot;font-family: &quot;Courier New&quot;;&quot;&gt;&nbsp;$&nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;bin/elasticsearch&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;b style=&quot;font-family: Dotum, 돋움;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 14pt;&quot;&gt;Logstash&nbsp;실행&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;unzip한 Logstash&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;&nbsp;디렉토리안에서 실행한다.&lt;/span&gt;&lt;/p&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;txc-table&quot; style=&quot;border: currentColor; font-size: 12px; border-collapse: collapse;&quot; width=&quot;594&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); width: 594px; height: 24px; background-color: rgb(255, 217, 236);&quot;&gt;
			&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;&nbsp;&nbsp;&lt;span style=&quot;font-family: &quot;Courier New&quot;;&quot;&gt;$ bin/Logstash -f&nbsp;&lt;b&gt;logstash.conf&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: &quot;Courier New&quot;; font-size: 10pt;&quot;&gt;logstash.conf&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;는 앞서 생성한 Logstash의 Config File이다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;b style=&quot;font-family: Dotum, 돋움;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 14pt;&quot;&gt;Kibana 실행&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;Elasticsearch의 Plugin안에 넣었기 때문에 따로 실행할 필요가&nbsp;없다.&nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;http://localhost:9200/_plugin/kibana/#/dashboard에서 Kibana가 잘 뜨는지&nbsp;확인한다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot; size=&quot;3&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 24pt;&quot;&gt;사용&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Dashboard 생성&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;(1) http://localhost:9200/_plugin/kibana/#/dashboard에서 Blank Dashboard를 클릭한다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;349&quot; id=&quot;tx_entry_31132_&quot; src=&quot;http://cfile5.uf.tistory.com/image/2509E247532FDC2B056070&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;clear: none; float: none;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(2) 설정 아이콘을 클릭한다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; id=&quot;tx_entry_44116_&quot; src=&quot;http://cfile27.uf.tistory.com/image/2212CE4D532FE03B20C482&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;clear: none; float: none;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(3) Dashboard의 Title을 입력하고 저장하면 새로운&nbsp;Dashboard가 생성된다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;107&quot; id=&quot;tx_entry_28374_&quot; src=&quot;http://cfile30.uf.tistory.com/image/232FFF50532FE5012A0916&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 14pt;&quot;&gt;Panel 생성&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(1) &#039;ADD A ROW&#039; 버튼을 클릭 한다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;136&quot; id=&quot;tx_entry_58137_&quot; src=&quot;http://cfile5.uf.tistory.com/image/253F5C4B532FE412179866&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(2) Rows의 Title을 입력하고, &#039;Create Row&#039; 버튼을 클릭하여 Row를 생성한 후 저장하고 창을 닫는다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;160&quot; id=&quot;tx_entry_56443_&quot; src=&quot;http://cfile30.uf.tistory.com/image/213B7F4B532FE41219DE50&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(3) Panel 생성을 위해 &#039;Add panel to empty row&#039; 버튼을 클릭한다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;212&quot; id=&quot;tx_entry_47275_&quot; src=&quot;http://cfile8.uf.tistory.com/image/2708AA4B532FE414352455&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(4) Panel Type을 선택하고 저장한후 창을 닫는다. 여기서는 &#039;histogram&#039;을 선택하였다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;121&quot; id=&quot;tx_entry_87039_&quot; src=&quot;http://cfile24.uf.tistory.com/image/2712E04D532FE4B740A4FC&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(5) Panel의 Title 및 사용자가 원하는 설정을 하고난 후 &#039;Add Panel&#039; 버튼을 클릭하여 Panel을 생성하고 창을 닫는다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;649&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;474&quot; id=&quot;tx_entry_72771_&quot; src=&quot;http://cfile9.uf.tistory.com/image/264FA24B532FE4140B3D87&quot; width=&quot;649&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(6) 위에서 선택한 Type의 Panel이 생성되었음을 확인할수 있다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align:center; clear:none&quot;&gt;&lt;img actualwidth=&quot;463&quot; alt=&quot;&quot; class=&quot;txc-image&quot; exif=&quot;{}&quot; height=&quot;514&quot; id=&quot;tx_entry_59774_&quot; src=&quot;http://cfile5.uf.tistory.com/image/2433044B532FE4151EC2F4&quot; width=&quot;463&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 14pt;&quot;&gt;Query&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;다양한 Query를 이용하여 Search하고 결과를 확인할 수 있다.&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(Query문의 종류 : &nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;&lt;a class=&quot;tx-link&quot; href=&quot;http://lucene.apache.org/core/3_5_0/queryparsersyntax.html&quot; target=&quot;_blank&quot;&gt;http://lucene.apache.org/core/3_5_0/queryparsersyntax.html&lt;/a&gt;&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;width: 649px; height: auto; display: inline-block;&quot;&gt;&lt;span dir=&quot;http://cfile9.uf.tistory.com/original/27075E49532FECA8326CD1&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;324&quot; src=&quot;http://cfile9.uf.tistory.com/image/27075E49532FECA8326CD1&quot; style=&quot;cursor: pointer;&quot; width=&quot;649&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;Apache로그를 이용하여 위와 같은 작업을 거쳐 Dashboard를 완성해 보았다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;width: 650px; height: auto; display: inline-block;&quot;&gt;&lt;span dir=&quot;http://cfile29.uf.tistory.com/original/2423754E532FEE532C0D39&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;481&quot; src=&quot;http://cfile29.uf.tistory.com/image/2423754E532FEE532C0D39&quot; style=&quot;cursor: pointer;&quot; width=&quot;650&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;b style=&quot;line-height: 24px; font-family: Dotum, 돋움; font-size: 12pt; background-color: transparent;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 24pt;&quot;&gt;Reference Sites&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;(1) Elasticsearch :&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.elasticsearch.org/&quot; target=&quot;_blank&quot;&gt;http://www.elasticsearch.org/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;(2) ELK Download :&nbsp;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.elasticsearch.org/overview/elkdownloads/&quot; target=&quot;_blank&quot;&gt;http://www.elasticsearch.org/overview/elkdownloads/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;(3)&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 20px; font-size: 13px;&quot;&gt;Logstash 1.4.0 Docs&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;&nbsp;:&nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 20px; font-size: 9pt; background-color: transparent;&quot;&gt;&lt;font size=&quot;2&quot;&gt;http://logstash.net/docs/1.4.0/tutorials/getting-started-with-logstash&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;(4)&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-size: 10pt; background-color: transparent;&quot;&gt;&nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 20px; font-family: Dotum, 돋움; font-size: 13px;&quot;&gt;Elasticsearch 1.x version set up&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;&nbsp;:&nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 20px; background-color: transparent;&quot;&gt;&lt;font size=&quot;2&quot;&gt;http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt; background-color: transparent;&quot;&gt;(5) Whats cooking kibana :&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); line-height: 1.5; font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;&nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;&lt;font face=&quot;Dotum, 돋움&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 10pt;&quot;&gt;&lt;a class=&quot;tx-link&quot; href=&quot;http://www.elasticsearch.org/blog/whats-cooking-kibana/&quot; target=&quot;_blank&quot;&gt;http://www.elasticsearch.org/blog/whats-cooking-kibana/&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;&lt;/div&gt;]]></description>
						<pubDate>Wed, 08 Oct 2014 16:49:28 +0900</pubDate>
								</item>
				<item>
			<title><![CDATA[Tomcat 의 logging.properties 및 log 디렉토리 설정]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143541</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143541</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143541#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;h2&gt;원본 : &lt;a href=&quot;http://linuxism.tistory.com/519&quot;&gt;http://linuxism.tistory.com/519&lt;/a&gt;&lt;/h2&gt;

&lt;h2&gt;&lt;a href=&quot;http://linuxism.tistory.com/519&quot;&gt;Tomcat 의 logging.properties 및 log 디렉토리 설정&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;span class=&quot;category&quot;&gt;&lt;a href=&quot;http://linuxism.tistory.com/category/Web/WAS&quot;&gt;Web/WAS&lt;/a&gt; &lt;/span&gt; &lt;span class=&quot;date&quot;&gt;2012/04/04 23:55&lt;/span&gt; &lt;!-- titleWrap close --&gt;&lt;/p&gt;

&lt;div class=&quot;article&quot;&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;안녕하세요..&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;오늘 살펴볼 주제는 Tomcat 의 log 관련설정법입니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;많은 개발자들이 개발환경으로&nbsp;Tomcat 을 많이 사용하고 있습니다. 그리고 log 처리는&nbsp;log4j를 사용합니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;그러나 JDK에서 기본으로 제공하는 Logging 클래스도 꽤 쓸만한 기능을 제공하고 있습니다.&lt;/span&gt;&lt;/p&gt;
&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 16px; font-family: dotum;&quot; /&gt;
&lt;strong style=&quot;color: rgb(102, 102, 102); line-height: 16px; font-family: dotum;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;java.util.logging 추상 클래스가 바로 그것인데요,&nbsp;이 클래스를 상속받아 구현한 클래스를 줄여서 JULI 라고 부릅니다.&lt;/span&gt;&lt;/strong&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;운영시에야 효율을 위해 최소한의 로그를 남기는것이 좋겠지만,&nbsp;반대로 개발시에는 최대한의 많은 로그를 남기는것이 디버깅에 효과적입니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;1.&nbsp;logging.properties의 위치&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;a)&nbsp;기본적인 Global 설정은 tomcat 디렉토리의 conf 입니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp; -&nbsp;이곳에 파일을 두고 설정하면 해당&nbsp;컨테이너에 등록되는 모든 Application설정을 한방에 할수 있습니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;b) Application 별로 설정하고 싶다면, /WEB-INF/classes/ 밑에 logging.properties 를 두면 됩니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;2. 설정방법&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- 기본적으로 제공하는 핸들러는 java.util.logging.FileHandler 와 java.util.logging.ConsoleHandler 가 있습니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- java.util.logging.ConsoleHandler&nbsp;는 기본출력 (catalina.out)으로 출력하는 핸들러이고,&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- java.util.logging.FileHandler 는 날짜별로 롤링되는 특정파일에 출력하는 핸들러입니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- level 은 다음과 같이&nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;를 지원하며&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- 오늘쪽으로 갈수록 로그량이 적습니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;3. 설정예제&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- org.apache.tomcat.util.net.TcpWorkerThread 클래스에 대해서 로그를 추가하고 싶을때&lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;ex)&lt;/span&gt;&lt;/div&gt;

&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;org.apache.tomcat.util.net.TcpWorkerThread&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;.level = ALL&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;

&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;org.apache.tomcat.util.net.TcpWorkerThread&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;.handler = java.util.logging.ConsoleHandler&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- org.apache.tomcat.util.net 하위 클래스에 대해서 로그를 추가하고 싶을때&lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;ex)&lt;/span&gt;&lt;/div&gt;

&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;org.apache.tomcat.util.net&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;.level = ALL&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;

&lt;div style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;org.apache.tomcat.util.net&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;.handler = java.util.logging.ConsoleHandler&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;이런식으로 로깅하고 싶은 클래스 또는 패키지를 지정해서&nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;.level = XXX ,&nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;.handler = java.util.logging.ConsoleHandler&nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;를 달아주기만 하면 됩니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;참 쉽죠~?&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;출처 -&nbsp;&lt;/span&gt;&lt;a href=&quot;http://cafe.naver.com/hermeneus.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=98&amp;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;http://cafe.naver.com/hermeneus.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=98&amp;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;===================================================================================&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;tomcat&nbsp;로그 저장 위치 변경 하기&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;tomcat logs 디렉토리(${catalina.base}/logs)에 저장되는 로그는 아래와 같은 곳에서 설정이 가능합니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;-&nbsp;catalina.out&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp; ${catalina.base}/bin/catalina.sh&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;-&nbsp;host-manager, localhost, manager&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&nbsp;${catalina.base}/conf/logging.properties&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;- localhost_access_log&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&nbsp;${catalina.base}/conf/server.xml&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;로그 저장 위치를 원하는 곳으로 변경 하는 방법은&nbsp;두가지로 생각해 볼 수 있습니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;첫번째는 logging.properies, catalina.sh, server.xml 등에서 디렉토리를 변경하는 방법이고&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;두번째는&nbsp;${catalina.base}/logs 디렉토리를 원하는 디렉토리로 soft link 시키는 방법입니다.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;1. 각 설정에서 logging 디렉토리 변경&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;# vi /usr/local/tomca&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;t/conf/&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;logging.properties&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;변경 전&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;1catalina.org.apache.juli.FileHandler.level = FINE&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;1catalina.org.apache.juli.FileHandler.directory = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;${catalina.base}/logs&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;1catalina.org.apache.juli.FileHandler.prefix = catalina.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;변경 후&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;1catalina.org.apache.juli.FileHandler.level = FINE&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;1catalina.org.apache.juli.FileHandler.directory = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;/var/log/tomcat&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;1catalina.org.apache.juli.FileHandler.prefix = catalina.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;# vi /user/local/tomcat/bin/catalina.sh&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;변경 전&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(51, 51, 51); line-height: 18px; font-family: 돋움; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;if [ -z &quot;$CATALINA_OUT&quot; ] ; then&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(51, 51, 51); line-height: 18px; font-family: 돋움; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;CATALINA_OUT=&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px; font-family: dotum;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&quot;$CATALINA_BASE&quot;/logs/catalina.out&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(51, 51, 51); line-height: 18px; font-family: 돋움; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;fi&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;변경 후&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;if [ -z &quot;$CATALINA_OUT&quot; ] ; then&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt; CATALINA_OUT=/var/log/tomcat/catalina.out&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font color=&quot;#666666&quot; face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51); line-height: 16px;&quot;&gt;fi&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;# vi /user/local/tomcat/conf/server.xml&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;변경 전&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;Valve className=&quot;org.apache.catalina.valves.AccessLogValve&quot; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;directory=&quot;logs&quot;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;prefix=&quot;localhost_access_log.&quot; suffix=&quot;.txt&quot;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; list-style-type: none;&quot;&gt;&lt;font face=&quot;dotum&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;pattern=&quot;%h %l %u %t &amp;quot;%r&amp;quot; %s %b&quot; /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;color: rgb(51, 51, 51); line-height: 18px; font-family: 돋움;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(102, 102, 102); line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;변경 후&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; color: rgb(51, 51, 51); list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;Valve className=&quot;org.apache.catalina.valves.AccessLogValve&quot; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;directory=&quot;/var/log/tomcat&quot;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&nbsp;prefix=&quot;localhost_access_log.&quot; suffix=&quot;.txt&quot;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;pattern=&quot;%h %l %u %t &amp;quot;%r&amp;quot; %s %b&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&nbsp;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;2.&nbsp;${catalina.base}/logs 디렉토리를 원하는 디렉토리로 soft link&nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;margin: 0px; padding: 0px; line-height: 16px; font-family: dotum; list-style-type: none;&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;# ln -s /var/log/tomcat /usr/local/tomcat/logs&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Wed, 08 Oct 2014 16:24:01 +0900</pubDate>
								</item>
				<item>
			<title><![CDATA[리눅스(Linux) 포트(port)  열기, 방화벽(firewall)  설정/해제 등 안내]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143539</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143539</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143539#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;p&gt;&lt;span id=&quot;writeContents&quot; style=&quot;font-size: 12px;&quot;&gt;리눅스(Linux) 포트(port) &nbsp;열기, 방화벽(firewall)&nbsp;&nbsp;설정/해제 등 안내&lt;br /&gt;
--------------------------------------&lt;/span&gt;&lt;br /&gt;
&nbsp;&lt;/p&gt;

&lt;div&gt;&lt;span id=&quot;writeContents&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;리눅스 port를&nbsp;열기 위해서는 &nbsp;iptables를 통해서, 포트를 열고 막고를&nbsp; 할 수 있습니다.&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;아래의 예제 부분만 따라 하시면 해당 port에 대해 모두 열 수 있습니다.&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;Inbound (외부에서 서버로 들어오는) , Outbound( 서버에서 외부로 나가는 )&nbsp; 모두 port를 열기 위해서는 아래의 iptables로 INPUT, OUPUT 을 해주면 모두 열립니다.&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;권한은 root에서 해주시기 바랍니다.&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;iptables -I INPUT 1 -p tcp --dport&nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;5900&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;&nbsp;-j ACCEPT&nbsp;&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;iptables -I OUTPUT 1 -p tcp --dport&nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: black; background-color: yellow;&quot;&gt;5900&nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;-j ACCEPT&nbsp;&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;예를 들면 ) FTP&nbsp;port 21번을 열고 싶다.&lt;/span&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;strong style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#iptables -I INPUT 1 -p tcp --dport&nbsp;21 -j ACCEPT&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;br style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot; /&gt;
&lt;strong style=&quot;color: rgb(102, 102, 102); line-height: 15px; font-family: 굴림, gulim, verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#iptables -I OUTPUT 1 -p tcp --dport&nbsp;21 -j ACCEPT&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&nbsp;&lt;/span&gt;&lt;/strong&gt; &lt;/span&gt;&lt;/div&gt;

&lt;div&gt;&nbsp;&lt;/div&gt;

&lt;div&gt;&lt;span id=&quot;writeContents&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;text-align: justify; color: rgb(109, 109, 109); font-family: Gulim, sans-serif; font-size: x-small; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;line-height: 19px; font-family: verdana; font-size: 10pt;&quot;&gt;#service iptables save&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;text-align: justify; color: rgb(102, 102, 102); font-family: &quot;Trebuchet MS&quot;, Trebuchet, Verdana, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);&quot; /&gt;
&lt;span style=&quot;text-align: justify; color: rgb(109, 109, 109); font-family: Gulim, sans-serif; font-size: x-small; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;line-height: 19px; font-family: verdana; font-size: 10pt;&quot;&gt;#/etc/init.d/iptables restart&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;

&lt;div&gt;&nbsp;&lt;/div&gt;

&lt;div&gt;&lt;span id=&quot;writeContents&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;text-align: justify; color: rgb(109, 109, 109); font-family: Gulim, sans-serif; font-size: x-small; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;line-height: 19px; font-family: verdana; font-size: 10pt;&quot;&gt;*확인 /etc/sysconfig/iptables (직접 추가해도 가능.)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Wed, 08 Oct 2014 14:40:24 +0900</pubDate>
								</item>
				<item>
			<title><![CDATA[Maven 기초 사용법]]></title>
			<dc:creator><![CDATA[Albert]]></dc:creator>
			<link>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143361</link>
			<guid isPermaLink="true">http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143361</guid>
						<comments>http://tuple.net/index.php?mid=upgletyle&amp;document_srl=143361#comment</comments>
									<description><![CDATA[&lt;div class=&quot;xe_content&quot;&gt;&lt;h2&gt;※ 참고용으로 링크 합니다.&nbsp; 원글 주소 &lt;a href=&quot;http://javacan.tistory.com/129&quot;&gt;http://javacan.tistory.com/129&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;h2&gt;&lt;a href=&quot;http://javacan.tistory.com/entry/MavenBasic&quot;&gt;Maven 기초 사용법&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;span class=&quot;category&quot;&gt;&lt;a href=&quot;http://javacan.tistory.com/category/Maven-Gradle-Ant&quot;&gt;Maven-Gradle-Ant&lt;/a&gt; &lt;/span&gt; &lt;span class=&quot;date&quot;&gt;2008/12/17 10:32&lt;/span&gt; &lt;!-- titleWrap close --&gt;&lt;/p&gt;

&lt;div class=&quot;article&quot;&gt;
&lt;div class=&quot;tt_article_useless_p_margin&quot;&gt;
&lt;p&gt;필자의 경우 Maven을 사용한지 2년이 넘어가는 데, Maven을 접한 이후 특별한 제약이 없는 한 Maven을 이용해서 프로젝트를 진행하고 있다. 흔히 Maven을 Ant와 비슷한 빌드(build) 도구로 생각하기도 하는데, Ant가 Build에 초점이 맞춰져 있다면 Maven은 프로젝트의 빌드 라이프사이클 기반 프레임워크를 제공하는데 초점이 맞춰져 있다.&lt;br /&gt;
&lt;br /&gt;
본 글에서는 Maven을 이용해서 프로젝트를 생성하는 방법과, 디렉토리 구조, POM 파일 기본 구성, Maven 라이프 사이클 그리고 Maven 프로젝트를 이클립스 프로젝트로 생성하는 방법을 살펴보도록 하겠다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(254, 137, 67); background-color: rgb(254, 222, 199);&quot;&gt;
&lt;p&gt;본 글의 내용 중 일부를 현재 메이븐 버전인 3.2에 맞게 수정했다. - 2014년 7월&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;strong&gt;Maven 설치&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
http://maven.apache.org/ 사이트를 방문하면, 최신 버전의 메이븐을 다운로드 받을 수 있다. 이 글을 쓰는 시점에서 메이븐 최신 버전은 3.2.2다. 바이너리 배포판을 다운로드 받은 아무 곳이나 원하는 디렉토리에 압축을 푼다. 설치 과정은 다음과 같다.&lt;/p&gt;

&lt;ol style=&quot;list-style-type: decimal;&quot;&gt;
	&lt;li&gt;다운로드 받은 파일의 압축을 푼다. 예, apache-maven-3.2.2.zip 파일의 압축을 C:에 풀면 c:\apache-maven-3.2.2 디렉토리가 생성된다.&lt;/li&gt;
	&lt;li&gt;PATH 환경 변수에서 메이븐 bin 디렉토리를 추가한다.&lt;/li&gt;
	&lt;li&gt;예) PATH=c:\apache-maven-3.2.2\bin;%PATH%&lt;/li&gt;
	&lt;li&gt;JAVA_HOME 환경 변수가 올바르게 설정되어 있는지 확인한다. 참고로, 메이븐 3.2 버전은 자바 1.6 이상을 요구한다.&lt;/li&gt;
	&lt;li&gt;설치를 끝냈으면, 다음 명령어를 실행해서 메이븐이 올바르게 동작하는지 확인한다.&lt;/li&gt;
&lt;/ol&gt;

&lt;div&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;환경 변수를 모두 설정해 주었다면 아래의 명령어를 사용해서 Maven이 제대로 실행되는 지 확인해보자.&lt;/span&gt;&lt;br /&gt;
&nbsp;&lt;/div&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;div&gt;C:\Users\madvirus&gt;mvn -version&lt;/div&gt;

&lt;div&gt;Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T22:51:42+09:00)&lt;/div&gt;

&lt;div&gt;Maven home: C:\devtool\apache-maven-3.2.2\bin\..&lt;/div&gt;

&lt;div&gt;Java version: 1.7.0_05, vendor: Oracle Corporation&lt;/div&gt;

&lt;div&gt;Java home: C:\Java\jdk1.7.0_05\jre&lt;/div&gt;

&lt;div&gt;Default locale: ko_KR, platform encoding: MS949&lt;/div&gt;

&lt;div&gt;OS name: &quot;windows 7&quot;, version: &quot;6.1&quot;, arch: &quot;amd64&quot;, family: &quot;windows&quot;&lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&nbsp;&lt;/div&gt;

&lt;div&gt;&lt;strong style=&quot;line-height: 1.5; font-size: 11pt; background-color: transparent;&quot;&gt;Maven 프로젝트 생성하기&lt;/strong&gt;&lt;/div&gt;

&lt;p&gt;설치가 끝났다면 Maven 프로젝트를 생성해 보자. 명령 프롬프트에서 아래 명령어를 실행하면 된다. (아래 명령어를 처음 실행할 경우 꽤 오랜 시간이 걸리는데, 그 이유는 Maven이 필요한 플러그인과 모듈을 다운로드 받기 때문이다. Maven 배포판은 최초로 Maven을 사용하는 데 필요한 모듈만 포함하고 있고, 그 외에 archetype 플러그인, compiler 플러그인 등 Maven을 사용하는 데 필요한 모듈은 포함하고 있지 않다. 이들 모듈은 실제로 필요할 때 Maven 중앙 리포지토리에서 로딩된다.)&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;p&gt;mvn archetype:generate&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;위 명령어를 실행하면 Maven 프로젝트를 생성하는 데 필요한 정보를 입력하라는 메시지가 단계적으로 뜨고, 각 항목별로 알맞은 값을 입력해주면 된다. 아래는 실행 화면 예이다. 붉은색으로 표시한 것은 입력한 값이다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;p&gt;C:\Users\madvirus&gt;mvn archetype:generate&lt;/p&gt;

&lt;p&gt;[INFO] Scanning for projects...&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Building Maven Stub Project (No POM) 1&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;...생략&lt;/p&gt;

&lt;p&gt;Choose archetype:&lt;/p&gt;

&lt;p&gt;1: remote -&gt; br.com.ingenieux:elasticbeanstalk-service-webapp-archetype (A Maven Archetype Encompassing RestAssured, Jetty, Jackson, Guice and Jersey for Publishing JAX-RS-based Services on AWS&#039; Elastic Beanstalk Service)&lt;/p&gt;

&lt;p&gt;2: remote -&gt; br.com.otavio.vraptor.archetypes:vraptor-archetype-blank (A simple project to start with VRaptor 4)&lt;/p&gt;

&lt;p&gt;...생략&lt;/p&gt;

&lt;p&gt;&lt;b&gt;436&lt;/b&gt;: remote -&gt;&nbsp;&lt;b&gt;&lt;u&gt;org.apache.maven.archetypes:maven-archetype-quickstart&lt;/u&gt;&lt;/b&gt;&nbsp;(An archetype which contains a sample Maven project.)&lt;/p&gt;

&lt;p&gt;437: remote -&gt; org.apache.maven.archetypes:maven-archetype-site (An archetype which contains a sample Maven site which demonstrates some of the supported document types like&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; APT, XDoc, and FML and demonstrates how to i18n your site. This archetype can be layered&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; upon an existing Maven project.)&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt;&quot;&gt;...생략&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;1090: remote -&gt; uk.ac.rdg.resc:edal-ncwms-based-webapp (-)&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 436:&lt;/u&gt;&nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[엔터]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Choose version:&lt;/p&gt;

&lt;p&gt;1: 1.0-alpha-1&lt;/p&gt;

&lt;p&gt;2: 1.0-alpha-2&lt;/p&gt;

&lt;p&gt;3: 1.0-alpha-3&lt;/p&gt;

&lt;p&gt;4: 1.0-alpha-4&lt;/p&gt;

&lt;p&gt;5: 1.0&lt;/p&gt;

&lt;p&gt;6: 1.1&lt;/p&gt;

&lt;p&gt;Choose a number: 6:&nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[엔터]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Define value for property &#039;&lt;b&gt;groupId&lt;/b&gt;&#039;: :&nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(9, 0, 255);&quot;&gt;net.madvirus&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Define value for property &#039;&lt;b&gt;artifactId&lt;/b&gt;&#039;: :&nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(9, 0, 255);&quot;&gt;sample&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Define value for property &#039;&lt;b&gt;version&lt;/b&gt;&#039;: &nbsp;1.0-SNAPSHOT: :&nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[엔터]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Define value for property &#039;&lt;b&gt;package&lt;/b&gt;&#039;: &nbsp;net.madvirus: : &nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[엔터]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Confirm properties configuration:&lt;/p&gt;

&lt;p&gt;groupId: net.madvirus&lt;/p&gt;

&lt;p&gt;artifactId: sample&lt;/p&gt;

&lt;p&gt;version: 1.0-SNAPSHOT&lt;/p&gt;

&lt;p&gt;package: net.madvirus&lt;/p&gt;

&lt;p&gt;&nbsp;Y: :&nbsp;&lt;b&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;[엔터]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;[INFO] ----------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.1&lt;/p&gt;

&lt;p&gt;[INFO] ----------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Parameter: groupId, Value: net.madvirus&lt;/p&gt;

&lt;p&gt;[INFO] Parameter: packageName, Value: net.madvirus&lt;/p&gt;

&lt;p&gt;[INFO] Parameter: package, Value: net.madvirus&lt;/p&gt;

&lt;p&gt;[INFO] Parameter: artifactId, Value: sample&lt;/p&gt;

&lt;p&gt;[INFO] Parameter: basedir, Value: C:\Users\madvirus&lt;/p&gt;

&lt;p&gt;[INFO] Parameter: version, Value: 1.0-SNAPSHOT&lt;/p&gt;

&lt;p&gt;[INFO] project created from Old (1.x) Archetype in dir: C:\Users\madvirus\sample&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO]&nbsp;&lt;b&gt;BUILD SUCCESS&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Total time: 25:52 min&lt;/p&gt;

&lt;p&gt;[INFO] Finished at: 2014-07-02T15:17:56+09:00&lt;/p&gt;

&lt;p&gt;[INFO] Final Memory: 12M/111M&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt;&quot;&gt;C:\Users\madvirus&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;위 &lt;/span&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;과정에서 실제로 입력하는 값은 다음과 같다.&lt;/span&gt;&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;&lt;strong&gt;groupId &lt;/strong&gt;- 프로젝트 속하는 그룹 식별 값. 회사, 본부, 또는 단체를 의미하는 값이 오며, 패키지 형식으로 계층을 표현한다. 위에서는 net.daum.cafe를 groupId로 이용하였다.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;artifactId &lt;/strong&gt;- 프로젝트 결과물의&nbsp;식별 값. 프로젝트나 모듈을 의미하는 값이 온다. 위에서는 simple-app을 artifactId로 이용하였다.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;version &lt;/strong&gt;- 결과물의 버전을 입력한다. 위에서는 기본 값인 1.0-SNAPSHOT을 사용하였다.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;package &lt;/strong&gt;- 기본적으로 생성할 패키지를 입력한다. 별도로 입력하지 않을 경우 groupId와 동일한 구조의 패키지를 생성한다.&lt;/li&gt;
&lt;/ul&gt;

&lt;div&gt;&lt;strong style=&quot;line-height: 1.5; font-size: 11pt; background-color: transparent;&quot;&gt;Maven 프로젝트의 기본 디렉토리 구조&lt;/strong&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
archetype:generate 골이 성공적으로 실행되면, artifactId에 입력한 값과 동일한 이름의 디렉터리가 생성된다.&nbsp;위 경우에는 현재 디렉터리에 sample 이라는 하위 디렉터리가 생성된다. 위 과정에서 선택한 archetype은 maven-archetype-quickstart 인데, 이 archetype을 선택했을 때 생성되는 디렉터리 구조는 다음과 같다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;sample&lt;br /&gt;
├─src&lt;br /&gt;
│&nbsp;&nbsp; ├─main&lt;br /&gt;
│&nbsp;&nbsp; │&nbsp; └─java&lt;br /&gt;
│&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └─net&lt;br /&gt;
│&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └─madvirus&lt;br /&gt;
│&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─App.java&lt;br /&gt;
│&nbsp;&nbsp; ├─test&lt;br /&gt;
│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └─java&lt;br /&gt;
│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └─net&lt;br /&gt;
│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └─madvirus&lt;br /&gt;
│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─AppTest.java&lt;br /&gt;
└─pom.xml&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;기본적으로 생성되는 디렉터리를 포함한 Maven 프로젝트의 주요 디렉터리는 다음과 같다.&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;src/main/java - 자바 소스 파일이 위치한다.&lt;/li&gt;
	&lt;li&gt;src/main/resources - 프로퍼티나 XML 등 리소스 파일이 위치한다. 클래스패스에 포함된다.&lt;/li&gt;
	&lt;li&gt;src/main/webapp - 웹 어플리케이션 관련 파일이 위치한다. (WEB-INF 디렉터리, JSP 파일&nbsp;등)&lt;/li&gt;
	&lt;li&gt;src/test/java - 테스트 자바 소스 파일이 위치한다.&lt;/li&gt;
	&lt;li&gt;src/test/resources - 테스트 과정에서 사용되는 리소스 파일이 위치한다. 테스트 시에 사용되는 클래스패스에 포함된다.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;기본적으로 생성되지 않은 디렉터리라 하더라도 직접 생성해주면 된다. 예를 들어, src/main 디렉터리에 resources 디렉터리를 생성해주면 Maven은 리소스 디렉터리로 인식한다.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;strong&gt;컴파일 해보기/테스트 실행 해보기/패키지 해보기&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
이제 간단하게 컴파일과 테스트를 실행해보자. 소스 코드를 컴파일 하려면 다음과 같은 명령어를 실행해주면 된다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;div&gt;C:\Users\madvirus\sample&gt;&lt;b&gt;mvn compile&lt;/b&gt;&lt;/div&gt;

&lt;div&gt;[INFO] Scanning for projects...&lt;/div&gt;

&lt;div&gt;[INFO]&lt;/div&gt;

&lt;div&gt;[INFO] ------------------------------------------------------------------------&lt;/div&gt;

&lt;div&gt;[INFO] Building sample 1.0-SNAPSHOT&lt;/div&gt;

&lt;div&gt;[INFO] ------------------------------------------------------------------------&lt;/div&gt;

&lt;div&gt;[INFO]&lt;/div&gt;

&lt;div&gt;[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sample ---&lt;/div&gt;

&lt;div&gt;[INFO] Using &#039;UTF-8&#039; encoding to copy filtered resources.&lt;/div&gt;

&lt;div&gt;[INFO] skip non existing resourceDirectory C:\Users\madvirus\sample\src\main\resources&lt;/div&gt;

&lt;div&gt;[INFO]&lt;/div&gt;

&lt;div&gt;[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ sample ---&lt;/div&gt;

&lt;div&gt;[INFO] Compiling 1 source file to C:\Users\madvirus\sample\target\classes&lt;/div&gt;

&lt;div&gt;[INFO] ------------------------------------------------------------------------&lt;/div&gt;

&lt;div&gt;[INFO] BUILD SUCCESS&lt;/div&gt;

&lt;div&gt;[INFO] ------------------------------------------------------------------------&lt;/div&gt;

&lt;div&gt;[INFO] Total time: 2.205 s&lt;/div&gt;

&lt;div&gt;[INFO] Finished at: 2014-07-03T09:51:15+09:00&lt;/div&gt;

&lt;div&gt;[INFO] Final Memory: 11M/110M&lt;/div&gt;

&lt;div&gt;[INFO] ------------------------------------------------------------------------&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;컴파일 된 결과는 target/classes 디렉터리에 생성된다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;테스트 클래스를 실행해보고 싶다면, 다음과 같은 명령어를 사용하면 된다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;p&gt;$ &lt;b&gt;mvn test&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;[INFO] Scanning for projects...&lt;/p&gt;

&lt;p&gt;[INFO] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Building sample 1.0-SNAPSHOT&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Using &#039;UTF-8&#039; encoding to copy filtered resources.&lt;/p&gt;

&lt;p&gt;[INFO] skip non existing resourceDirectory /Users/madvirus/sample/src/main/resources&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Compiling 1 source file to /Users/madvirus/sample/target/classes&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Using &#039;UTF-8&#039; encoding to copy filtered resources.&lt;/p&gt;

&lt;p&gt;[INFO] skip non existing resourceDirectory /Users/madvirus/sample/src/test/resources&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Compiling 1 source file to /Users/madvirus/sample/target/test-classes&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ sample ---&lt;/p&gt;

&lt;p&gt;...최초 실행시 관련 플러그인 파일 다운로드&lt;/p&gt;

&lt;p&gt;-------------------------------------------------------&lt;/p&gt;

&lt;p&gt;&nbsp;T E S T S&lt;/p&gt;

&lt;p&gt;-------------------------------------------------------&lt;/p&gt;

&lt;p&gt;Running net.madvirus.AppTest&lt;/p&gt;

&lt;p&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;Results :&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] BUILD SUCCESS&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Total time: 10.238 s&lt;/p&gt;

&lt;p&gt;[INFO] Finished at: 2014-07-03T22:20:08+09:00&lt;/p&gt;

&lt;p&gt;[INFO] Final Memory: 13M/228M&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;그러면, 테스트 코드를 컴파일한 뒤 테스트 코드를 실행한다. 그리고 테스트 성공 실패 여부를 화면에 출력한다. 컴파일 된 테스트 클래스들은 target/test-classes 디렉터리에 생성되고, 테스트 결과 리포트는 target/surefire-reports 디렉터리에 저장된다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
(아무것도 한게 없으니 당연하지만) 모든 코드가 정상적으로 만들어지고 테스트도 통과했으니, 이제 배포 가능한 jar 파일을 만들어보자. 아래 명령어를 실행하면 프로젝트를 패키징해서 결과물을 생성한다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;p&gt;$ &lt;b&gt;mvn package&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;[INFO] Scanning for projects...&lt;/p&gt;

&lt;p&gt;[INFO] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Building sample 1.0-SNAPSHOT&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Using &#039;UTF-8&#039; encoding to copy filtered resources.&lt;/p&gt;

&lt;p&gt;[INFO] skip non existing resourceDirectory /Users/madvirus/sample/src/main/resources&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Nothing to compile - all classes are up to date&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Using &#039;UTF-8&#039; encoding to copy filtered resources.&lt;/p&gt;

&lt;p&gt;[INFO] skip non existing resourceDirectory /Users/madvirus/sample/src/test/resources&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Nothing to compile - all classes are up to date&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Surefire report directory: /Users/madvirus/sample/target/surefire-reports&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;-------------------------------------------------------&lt;/p&gt;

&lt;p&gt;&nbsp;T E S T S&lt;/p&gt;

&lt;p&gt;-------------------------------------------------------&lt;/p&gt;

&lt;p&gt;Running net.madvirus.AppTest&lt;/p&gt;

&lt;p&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;Results :&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;Tests run: 1, Failures: 0, Errors: 0, Skipped: 0&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;[INFO]&lt;/p&gt;

&lt;p&gt;[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ sample ---&lt;/p&gt;

&lt;p&gt;[INFO] Building jar: /Users/madvirus/sample/target/&lt;b&gt;sample-1.0-SNAPSHOT.jar&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] BUILD SUCCESS&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;[INFO] Total time: 1.783 s&lt;/p&gt;

&lt;p&gt;[INFO] Finished at: 2014-07-03T22:21:59+09:00&lt;/p&gt;

&lt;p&gt;[INFO] Final Memory: 8M/156M&lt;/p&gt;

&lt;p&gt;[INFO] ------------------------------------------------------------------------&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot;&gt;mvn package가 성공적으로 실행되면, target 디렉터리에 프로젝트 이름과 버전에 따라 알맞은 이름을 갖는 jar 파일이 생성된다. 위 예제의 경우에는 sample-1.0-SNAPSHOT.jar 파일이 생성된 것을 확인할 수 있다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;strong&gt;POM 파일 기본&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Maven 프로젝트를 생성하면 pom.xml 파일이 프로젝트 루트 디렉터리에 생성된다. 이 pom.xml 파일은&nbsp;Project Object Model 정보를 담고 있는&nbsp;파일로서, 이 파일에서 다루는 주요 설정 정보는 다음과 같다.&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;프로젝트 정보 - 프로젝트의 이름, 개발자 목록, 라이센스 등의 정보를 기술&lt;/li&gt;
	&lt;li&gt;빌드 설정 - 소스, 리소스, 라이프 사이클 별 실행할 플러그인 등 빌드와 관련된 설정을 기술&lt;/li&gt;
	&lt;li&gt;빌드 환경 - 사용자 환경 별로 달라질 수 있는 프로파일 정보를 기술&lt;/li&gt;
	&lt;li&gt;POM 연관 정보 - 의존 프로젝트(모듈), 상위 프로젝트, 포함하고 있는 하위 모듈 등을 기술&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;archetype:create 골 실행시 maven-archetype-quickstart Archetype을 선택한 경우 생성되는 pom.xml 파일은 다음과 같다.&lt;br /&gt;
&lt;br /&gt;
[기본으로 생성되는 pom.xml 파일]&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px solid rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;
&lt;p&gt;&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/p&gt;

&lt;p&gt;&nbsp; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;groupId&gt;net.madvirus&lt;/groupId&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;artifactId&gt;sample&lt;/artifactId&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;packaging&gt;jar&lt;/packaging&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;name&gt;sample&lt;/name&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;url&gt;http://maven.apache.org&lt;/url&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;properties&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;/properties&gt;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;dependencies&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &lt;dependency&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &nbsp; &lt;groupId&gt;junit&lt;/groupId&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &nbsp; &lt;artifactId&gt;junit&lt;/artifactId&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &nbsp; &lt;version&gt;3.8.1&lt;/version&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &nbsp; &lt;scope&gt;test&lt;/scope&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &nbsp; &lt;/dependency&gt;&lt;/p&gt;

&lt;p&gt;&nbsp; &lt;/dependencies&gt;&lt;/p&gt;

&lt;p&gt;&lt;/project&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;위 POM 파일에서 프로젝트 정보를 기술하는 태그는 다음과 같다.&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;&lt;name&gt; - 프로젝트 이름&lt;/li&gt;
	&lt;li&gt;&lt;url&gt; - 프로젝트 사이트 URL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;POM 연관 정보는 프로젝트간 연관 정보를 기술하는데, 관련 태그는 다음과 같다.&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;&lt;groupId&gt; - 프로젝트의 그룹 ID 설정&lt;/li&gt;
	&lt;li&gt;&lt;artifactId&gt; - 프로젝트의 Artifact ID 설정&lt;/li&gt;
	&lt;li&gt;&lt;version&gt; - 버전 설정&lt;/li&gt;
	&lt;li&gt;&lt;packaging&gt; - 패키징 타입 설정. 위 코드의 경우 프로젝트의 결과 Artifact가 jar 파일로 생성됨을 의미한다. jar 뿐만 아니라 웹 어플리케이션을 위한 war나 JEE를 위한 ear 등의 패키징 타입이 존재한다.&lt;/li&gt;
	&lt;li&gt;&lt;dependencies&gt; - 이 프로젝트에서 의존하는 다른 프로젝트 정보를 기술한다.
	&lt;ul&gt;
		&lt;li&gt;&lt;dependency&gt; - 의존하는 프로젝트 POM 정보를 기술
		&lt;ul&gt;
			&lt;li&gt;&lt;groupId&gt; - 의존하는 프로젝트의 그룹 ID&lt;/li&gt;
			&lt;li&gt;&lt;artifactId&gt; - 의존하는 프로젝트의 artifact ID&lt;/li&gt;
			&lt;li&gt;&lt;version&gt; - 의존하는 프로젝트의 버전&lt;/li&gt;
			&lt;li&gt;&lt;scope&gt; - 의존하는 범위를 설정&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;의존 설정&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;dependency&gt; 부분의 설정에 대해서 좀 더 살펴보도록 하자.&lt;br /&gt;
&lt;br /&gt;
Maven을 사용하지 않을 경우&nbsp;개발자들은 코드에서 필요로 하는 라이브러리를 각각 다운로드 받아야 한다. 예를 들어, 아파치 commons DBCP 라이브러리를 사용하기 위해서는 DBCP 뿐만 아니라 common pool 라이브러리도 다운로드 받아야 한다. 물론, commons logging을 비롯한 라이브러리도 모두 추가로 다운로드 받아 설치해 주어야 한다. 즉, 코드에서 필요로 하는 라이브러리 뿐만 아니라 그 라이브러리가 필요로 하는 또 다른 라이브러리도 직접 찾아서 설치해 주어야 한다.&lt;br /&gt;
&lt;br /&gt;
하지만, Maven을 사용할 경우에는 코드에서 직접적으로 사용하는 모듈에 대한 의존만 추가해주면 된다. 예를 들어, commons-dbcp 모듈을 사용하고 싶은 경우 다음과 같은 &lt;dependency&gt; 코드만 추가해주면 된다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;&lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;version&gt;1.2.1&lt;/version&gt;&lt;br /&gt;
&lt; /dependency&gt;&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;그러면, Maven은 commons-dbcp 뿐만 아니라 commons-dbcp가 의존하는 라이브러리가 자동으로 처리해준다. 실제로 1.2.1 버전의 commons-dbcp 모듈의 pom.xml 파일을 보면 의존 부분이 다음과 같이 설정되어 확인할 수 있다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;&nbsp; &lt;dependencies&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;commons-collections&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;2.1&lt;/version&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;commons-pool&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;commons-pool&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;1.2&lt;/version&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;javax.sql&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;jdbc-stdext&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;2.0&lt;/version&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;optional&gt;true&lt;/optional&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;junit&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;junit&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;3.8.1&lt;/version&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;scope&gt;test&lt;/scope&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;xml-apis&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;xml-apis&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;2.0.2&lt;/version&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;dependency&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;xerces&lt;/groupId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;xerces&lt;/artifactId&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;version&gt;2.0.2&lt;/version&gt;&lt;br /&gt;
&nbsp;&nbsp;&nbsp; &lt;/dependency&gt;&lt;br /&gt;
&nbsp; &lt;/dependencies&gt;&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;Maven은 commons-dbcp 모듈을 다운로드 받을 때 관련 POM 파일도 함께 다운로드 받는다. (다운로드 받은 파일은 로컬 리포지토리에 저장되는데 이에 대한 내용은 뒤에서 다시 설명하겠다.) 그리고 POM 파일에 명시한 의존 모듈을 함께 다운로드 받는다. 즉, commons-dbcp&nbsp;1.2.1 버전의 경우 commons-collections 2.1 버전과 commons-pool 1.2 버전 등을 함께 다운로드 받는다. 이런 식으로 반복해서 다운로드 받은 모듈이 필요로 하는 모듈을 다운로드 받고 이들 모듈을 현재 프로젝트에서 사용할 클래스패스에 추가해준다.&lt;br /&gt;
&lt;br /&gt;
따라서, 개발자는 일일이 필요한 모듈을 다운로드 받을 필요가 없으며, 현재 코드에서 직접적으로 필요로 하는 모듈에 대해서만&nbsp;&lt;dependency&gt;로 추가해주면 된다. 나머지 의존은 모두 Maven이 알맞게 처리해준다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(243, 197, 52); background-color: rgb(254, 254, 184);&quot;&gt;search.maven.org&nbsp;사이트에서 POM 정보 찾기&lt;br /&gt;
&lt;br /&gt;
Maven을 사용할 때 자주&nbsp;찾게 되는 사이트가 search.maven.org 이다. search.maven.org는 Maven 중앙 리포지토리에 등록된 POM 정보를 검색해주는 기능을 제공해준다. 이 사이트를 통해서 추가할 라이브러리의 &lt;dependency&gt; 설정 정보를 구할 수 있다.&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;의존의 scope: compile, runtime, provided, test&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
앞의 pom.xml 파일에서 &lt;dependency&gt; 부분을 보면 &lt;scope&gt;를 포함하고 있는 것과 그렇지 않은 것이 존재한다는 것을 알 수 있다. &lt;scope&gt;는 의존하는 모듈이 언제 사용되는 지를 설정할 때 사용되며, &lt;scope&gt;에 올 수 있는 값은 다음의 네 가지가 존재한다.&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;compile - 컴파일 할 때 필요. 테스트 및 런타임에도 클래스패스에 포함된다. &lt;scope&gt;를 설정하지 않을 경우 기본 값은 compile 이다.&lt;/li&gt;
	&lt;li&gt;runtime - 런타임에 필요. JDBC 드라이버 등이 예가 된다. 프로젝트의 코드를 컴파일 할 때는 필요하지 않지만, 실행할 때 필요하다는 것을 의미한다. 배포시 포함된다.&lt;/li&gt;
	&lt;li&gt;provided - 컴파일 할 때 필요하지만, 실제 런타임 때에는 컨테이너 같은 것에서 기본으로 제공되는 모듈임을 의미한다. 예를 들어, 서블릿이나 JSP API 등이 이에 해당한다. 배포시 제외된다.&lt;/li&gt;
	&lt;li&gt;test - 테스트 코드를 컴파일 할 때 필요. Mock 테스트를 위한 모듈이 예이다. 테스트 시에 클래스패스에 포함되며, 배포시 제외된다.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;strong&gt;원격 리포지토리와 로컬 리포지토리&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Maven은 컴파일이나 패키징 등 작업을 실행할 때 필요한 플러그인이나 pom.xml 파일의 &lt;dependency&gt; 등에 설정한 모듈을 Maven 중앙 리포지토리에서 다운로드 받는다. 현재 중앙 리포지토리의 주소는 &lt;a href=&quot;http://repo1.maven.org/maven2/&quot;&gt;http://repo1.maven.org/maven2/&lt;/a&gt;&nbsp;이다.&lt;br /&gt;
&lt;br /&gt;
원격 리포지토리에서 다운로드 받은 모듈은 로컬 리포지토리에 저장된다. 로컬 리포지토리는 [USER_HOME]/.m2/repository 디렉터리에 생성되며, 로컬 리포지토리에는 다음과 같은 형식의 디렉터리를 생성한 뒤 다운로드 받은 모듈을 저장한다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;[groupId]/[artifactId]/[version]&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;예를 들어, commons-dbcp 1.2.1 버전의 경우, 모듈 및 관련 POM 파일이 저장되는 디렉터리는 다음과 같다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;[USER_HOME]/.m2/repository/commons-dbcp/commons-dbcp/1.2.1&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;위 디렉터리에 저장되는 파일은 패키징 된 모듈 파일, pom 파일, 그리고 소스 코드 다운로드 옵션을 실행한 경우에는 소스 코드를 포함한 jar 파일이 포함된다.&lt;br /&gt;
&lt;br /&gt;
일단 원격 리포지토리로부터 파일을 다운로드해서 로컬 리포지토리에 저장하면, 그 뒤로는 로컬 리포지토리에 저장된 파일을 사용하게 된다.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;strong&gt;Maven 라이프사이클(Lifecycle)과 플러그인 실행&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
본 글의 서두에 Maven은 프로젝트의 라이프사이클 기반 프레임워크를 제공한다고 했다. 앞서 프로젝트를 생성한 뒤 컴파일하고(mvn compile), 테스트 하고(mvn test), 패키징 하는(mvn package) 과정을 정해진 명령어를 이용해서 실행했는데, 이때 compile, test, package는 모두 빌드 라이프사이클에 속하는 단계이다.&lt;br /&gt;
&lt;br /&gt;
Maven은 clean, build (default), site의 세 가지 라이프사이클을 제공하고 있다. 각 라이프사이클은 순서를 갖는 단계(phase)로 구성된다. 또한, 각 단계별로 기본적으로 실행되는 플러그인(plugin) 골(goal)이 정의되어 있어서 각 단계마다 알맞은 작업이 실행된다. 아래 표는 디폴트 라이프사이클을 구성하고 있는 주요 실행 단계를 순서대로 정리한 것이다.&lt;br /&gt;
&lt;br /&gt;
[표] 디폴트 라이프사이클의 주요 단계(phase)&lt;/p&gt;
&nbsp;

&lt;table bgcolor=&quot;#ffffff&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;border-collapse: collapse;&quot;&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;&nbsp;단계&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;설명&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;단계에&nbsp;묶인&nbsp;플러그인 실행&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;generate-sources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;컴파일 과정에 포함될 소스를 생성한다. 예를 들어,&nbsp; DB 테이블과 매핑되는 자바 코드를 생성해주는 작업이 이 단계에서 실행된다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;&nbsp;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;process-sources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;필터와 같은 작업을 소스 코드에 처리한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;&nbsp;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;generate-resources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;패키지에 포함될 자원을 생성한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;&nbsp;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;process-resources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;필터와 같은 작업을 자원 파일에 처리하고, 자원 파일을&nbsp;클래스 출력 디렉토리에 복사한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;resources:resources&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;compile&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;소스 코드를 컴파일해서 클래스 출력 디렉터리에 클래스를 생성한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;compiler:compile&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;generate-test-sources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;테스트 소스 코드를 생성한다. 예를 들어, 특정 클래스에서 자동으로 테스트 케이스를 만드는 작업이 이 단계에서 실행된다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;&nbsp;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;process-test-sources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;필터와 같은 작업을 테스트 소스 코드에 처리한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;resources:testResources&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;generate-test-resources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;테스트를 위한 자원 파일을 생성한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;&nbsp;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;process-test-resources&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;필터와 같은 작업을 테스트 자원 파일에 처리하고, 테스트 자원 파일을 테스트 클래스 출력 디렉터리에 복사한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;&nbsp;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;test-compile&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;테스트 소스 코드를 컴파일해서 테스트 클래스 추력 디렉터리에 클래스를 생성한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;compiler:testCompile&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;test&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;테스트를 실행한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;surefire:test&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;package&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;컴파일 된 코드와 자원 파일들을 jar, war와 같은 배포 형식으로 패키징한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;패키징에 따라 다름&lt;br /&gt;
			jar - jar:jar&lt;br /&gt;
			war - war:war&lt;br /&gt;
			pom - site:attach-descriptor&lt;br /&gt;
			ejb - ejb:ejb&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;install&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;로컬 리포지토리에 패키지를 복사한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;install:install&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 159px;&quot; width=&quot;33%&quot;&gt;deploy&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 270px;&quot; width=&quot;33%&quot;&gt;생성된 패키지 파일을 원격 리포지토리에 등록하여, 다른 프로젝트에서&nbsp;사용할 수 있도록 한다.&lt;/td&gt;
			&lt;td style=&quot;border: 1px solid rgb(218, 218, 218); width: 174px;&quot; width=&quot;33%&quot;&gt;deploy:deploy&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
라이프사이클의 특정 단계를 실행하려면 다음과 같이 mvn [단계이름] 명령어를 실행하면 된다.
&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;mvn test&lt;br /&gt;
mvn deploy&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;라이프사이클의 특정 단계를 실행하면 그 단계의 앞에 위치한 모든 단계가 실행된다. 예를 들어, test 단계를 실행하면 test 단계를 실행하기에 앞서 &#039;generate-sources&#039; 단계부터 &#039;test-compile&#039; 단계까지 각 단계를 순서대로 실행한다. 각 단계가 실행될 때는 각 단계에 묶인 골(goal)이 실행된다.&lt;br /&gt;
&lt;br /&gt;
플러그인을 직접 실행할 수도 있다. mvn 명령어에 단계 대신 실행할 플러그인을 지정하면 된다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(193, 193, 193); background-color: rgb(238, 238, 238);&quot;&gt;mvn surefire:test&lt;/div&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;p&gt;단, 플러그인 골을 직접 명시한 경우에는 해당 플러그인만 실행되기 때문에 라이프사이클의 단계가 실행되지는 않는다.&lt;/p&gt;

&lt;p&gt;&nbsp;&lt;/p&gt;

&lt;div class=&quot;txc-textbox&quot; style=&quot;padding: 10px; border: 1px dashed rgb(243, 197, 52); background-color: rgb(254, 254, 184);&quot;&gt;플러그인 골(Plugin Goal)&lt;br /&gt;
&lt;br /&gt;
Maven에서 플러그인을 실행할 때에는 &#039;플러그인이름:플러그인지원골&#039;의 형식으로 실행할 기능을 선택한다. 예를 들어, compiler:compile은 &#039;compiler&#039;는 플러그인에서 &#039;compile&#039; 기능(goal)을 실행한다는 것을 뜻한다.&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;맺음말&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
이번 글에서는 Maven의 기본 사용법을 살펴봤다. Maven이 제공하는 의존 관리는 개발자를 jar 지옥(?)에서 구해준다는 것을 알 수 있었다. 또한, Maven은 표준화된 라이프사이클을 제공하고 있기 때문에 개발자가 컴파일-테스트-패키징 등의 과정을 손으로 정의하지 않아도 되며, 개발자는 Maven이 제공하는 단계 중 필요한 단계만 실행하면 된다. 그럼, 나머지 작업(컴파일, 테스트 실행, jar 파일 생성)은 모두 Maven이 처리해준다.&lt;br /&gt;
&lt;br /&gt;
다음 글에서는 많이 사용되고 있는 개발툴인 이클립스에서 Maven 프로젝트를 import하는 방법과 컴파일러 버전을 명시하는 방법을 살펴보도록 하겠다.&lt;br /&gt;
&lt;br /&gt;
관련 자료:&lt;/p&gt;

&lt;ul style=&quot;list-style-type: disc;&quot;&gt;
	&lt;li&gt;Maven 홈 페이지: &lt;a href=&quot;http://maven.apache.org/&quot;&gt;http://maven.apache.org&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://foreign.aladdin.co.kr/shop/wproduct.aspx?ISBN=0596517335&quot; target=&quot;_blank&quot; title=&quot;[http://foreign.aladdin.co.kr/shop/wproduct.aspx?ISBN=0596517335]로 이동합니다.&quot;&gt;Maven: The Definitive Guide (Sonatype, Oreilly)&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://javacan.tistory.com/entry/HowToSetJavaVersionOfMavenCompilerPlugin&quot; style=&quot;line-height: 1.5; font-size: 9pt; background-color: transparent;&quot; target=&quot;_blank&quot;&gt;Maven 컴파일러 버전 설정&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;]]></description>
						<pubDate>Wed, 01 Oct 2014 10:44:50 +0900</pubDate>
								</item>
			</channel>
</rss>
