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

<channel>
	<title>yupmin&#039;s another space</title>
	<atom:link href="http://yupmin.net/feed" rel="self" type="application/rss+xml" />
	<link>http://yupmin.net</link>
	<description>developer&#039;s note</description>
	<lastBuildDate>Sun, 22 Apr 2012 14:46:53 +0000</lastBuildDate>
	<language>ko</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>starting with AWS EC2</title>
		<link>http://yupmin.net/starting-with-aws-ec2</link>
		<comments>http://yupmin.net/starting-with-aws-ec2#comments</comments>
		<pubDate>Sun, 22 Apr 2012 14:10:43 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[aws]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=465</guid>
		<description><![CDATA[AWS(Amazon Web Service)를 사용하게 되면 일단 가입한지 일년동안은 AWS Free Usage Tier 로 1년동안 1 Linux Micro Instance, ELB, EBS 10G, S3, SimpleDB, SQS등 무료로 사용이 가능하다. 그러므로 초심자가 접근하는데 너무 걱정을 하지도 않아도 된다. 일단 EC2를 만들기 전에 EC2에서 &#8230; <a href="http://yupmin.net/starting-with-aws-ec2">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://yupmin.net/wp-content/uploads/2011/11/logo_aws.gif" rel="lightbox[465]"><img class="aligncenter size-full wp-image-508" title="logo_aws" src="http://yupmin.net/wp-content/uploads/2011/11/logo_aws.gif" alt="" width="164" height="60" /></a></p>
<p>AWS(Amazon Web Service)를 사용하게 되면 일단 가입한지 일년동안은 <a href="http://aws.amazon.com/free/">AWS Free Usage Tier</a> 로 1년동안 1 Linux Micro Instance, ELB, EBS 10G, S3, SimpleDB, SQS등 무료로 사용이 가능하다. 그러므로 초심자가 접근하는데 너무 걱정을 하지도 않아도 된다.</p>
<p>일단 EC2를 만들기 전에 EC2에서 사용하는 storage 개념부터 이해해야 한다.</p>
<p>AMI(Amazon Machine Images)를 이용해서 서버를 런칭하게 되는데, AMI는 두가지 Storage 종류가 있다. EBS-backed storage device 와 S3-backed storage device인 ephemeral storage 로 두가지다.</p>
<p>보통 micro instance가 아닌 Medium, Large 등으로 돈이 들어 만드는 ami instance에 들어가는 storage는 S3-backed storage를 사용하게 된다. 이 S3-backed storage는 EBS보다 빠르나 instance가 정지(stop)되거나 종료(terminate)되면 storage의 내용은 날라가게 된다.(그 서버는 restart만 가능하게 되는 것이다.) 그러니 일단 그런 storage를 사용하게 되면 주의해야 한다. (단 S3-backed storage로 AMI를 만들게 되면 S3를 이용해서 다른곳으로 이동할수 있다고 한다.)</p>
<p>일단 Free Usage Tier 이므로 Micro Linux Instance + 10G EBS Volume을 사용해 보겠다.</p>
<p>나의 경우에는 ubuntu ami보다 amazon linux ami를 선호하는데, 이유는 ubuntu ami의 경우 가끔씩 리부팅시(극히 낮은 빈도지만, 직접 경험해봤다. aws console에서는 분명 제대로 돌아가고 있는데 ssh 접근이 안된다. 이유가 ubuntu ami라는 확신은 없다.) hang이 걸리기 때문이다.</p>
<p>AWS(<a href="http://aws.amazon.com/">http://aws.amazon.com/</a>)에 접속해서 계정을 만들어라. 신용카드 사용에 대한 좀 복잡한 과정등있으니, 하나하나 다 읽어본 후 계정 만들기를 완료한다.</p>
<p>그리고 AWS Management Console (<a href="https://console.aws.amazon.com">https://console.aws.amazon.com</a>) 들어가 [EC2] 탭으로 들어간다. [Launch Instance]를 눌러서 Basic 32-bit(or 64-bit) Amazon Linux AMI를 선택해서 일단 생성한다.</p>
<p>일단 Unix 콘솔이 있다면 다음과 같이 로그인 한다.</p>
<pre class="brush: shell;">ssh -i xxxx.pem ec2-user@xxx.xxx.xxx.xxx</pre>
<p>xxxx.pem은 key pair 생성과정에서 저장한 개인키이다.  xxx.xxx.xxx.xxx 는 생성한 instance의 public dns 주소다. 접속한 다음 최신 버젼으로 업데이트 하면 일단 서버 하나를 사용하기 위한 기본작업이 완료된다. (이와 더불어 [elastic IPs]를 클릭해서 ip를 할당해주고 서버에 연결해도 좋다.)</p>
<pre class="brush: shell;">sudo yum update;sudo reboot</pre>
<p>AWS 웹콘솔로 가서 [Volumes]을 클릭한후 [Create Volume]으로 10G의 하드 디스크를 만들어주고(Availability Zone에 주의, 서버과 같은 zone에 만든다.) 새로 만든 서버에 만든 볼륨을 attach 한다. 다시 서버 터미널에 접속한후</p>
<pre class="brush: shell;">sudo yum install xfsprogs
grep -q xfs /proc/filesystems || sudo modprobe xfs
sudo mkfs.xfs /dev/sdf

echo "/dev/sdf /mnt xfs noatime 0 0" | sudo tee -a /etc/fstab
sudo mount /mnt</pre>
<p>해주면 10G 하드디스크가 /mnt 마운트 된다.</p>
<p>이 같은 작업으로 8+10G micro서버를 1년동안 무료로 사용할수 있게 되는 것이다. 1년 이후로 좀더 오래 사용한다면, reserved instance 3 year, Medium Utilization, tokyo로 결재를 하면 싸게 사용할수 있다.</p>
<p>3년 예약 비용 : $86(하루에 $0.0785)<br />
3년 예약 일때 하루 사용비용이 $0.264(1 hour $0.011)<br />
10G EBS : 한달에 $1~1.5<br />
대략 micro instance 사용으로 한달 30일로 치면 $11~12 선에서 서버를 사용할수 있다. 국내 다른 클라우드 서버(5000원 하는데도 있으니)에 비하면 싼편은 아니지만 AWS의 다른 기능까지 사용해 본다면 그리 비싼편은 아니다.</p>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/starting-with-aws-ec2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install afpd on hp microserver + ubuntu</title>
		<link>http://yupmin.net/install-afpd-on-hp-microserver-ubuntu</link>
		<comments>http://yupmin.net/install-afpd-on-hp-microserver-ubuntu#comments</comments>
		<pubDate>Fri, 20 Apr 2012 12:24:47 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[HP Microserver]]></category>
		<category><![CDATA[afp]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=602</guid>
		<description><![CDATA[apple제품군의 프로토콜이 업그레이드 되면서 2.2.2를 사용하기 위해 직접 컴파일해서(패키지를 사용하지 말고) 써야 한다고 한다. 2.2.2이후부터는 avahi deamon을 사용하지 않는다고 한다. reference : http://bibo-log.blog.so-net.ne.jp/2012-03-16 sudo apt-get build-dep netatalk wget http://sourceforge.net/projects/netatalk/files/netatalk/2.2.2/netatalk-2.2.2.tar.gz tar zxvf netatalk-2.2.2.tar.gz cd netatalk-2.2.2 ./configure --enable-debian make;sudo make install /usr/local/sbin/afpd &#8230; <a href="http://yupmin.net/install-afpd-on-hp-microserver-ubuntu">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>apple제품군의 프로토콜이 업그레이드 되면서 2.2.2를 사용하기 위해 직접 컴파일해서(패키지를 사용하지 말고) 써야 한다고 한다. 2.2.2이후부터는 avahi deamon을 사용하지 않는다고 한다.</p>
<p>reference : <a href="http://bibo-log.blog.so-net.ne.jp/2012-03-16">http://bibo-log.blog.so-net.ne.jp/2012-03-16</a></p>
<pre class="brush: shell;">sudo apt-get build-dep netatalk
wget http://sourceforge.net/projects/netatalk/files/netatalk/2.2.2/netatalk-2.2.2.tar.gz
tar zxvf netatalk-2.2.2.tar.gz
cd netatalk-2.2.2
./configure --enable-debian
make;sudo make install
/usr/local/sbin/afpd -V
ln -s /usr/local/etc/netatalk/ /etc/netatalk</pre>
<p>필요없는 서비스는 설정에서 주석을 지워 서비스를 해제한다.</p>
<pre class="brush: shell;">vi /etc/default/netatalk

ATALKD_RUN=no
PAPD_RUN=no
TIMELOAD_RUN=no
A2BOOT_RUN=no
</pre>
<p>timemachine을 사용하기 위해서 몇가지 셋팅을 추가한다. </p>
<pre class="brush: shell;">
sudo mkdir /var/timemachine
sudo chmod 777 /var/timemachine
sudo vi /etc/netatalk/AppleVolumes.default

/var/timemachine "timemachine" allow:[username] options:usedots,tm</pre>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/install-afpd-on-hp-microserver-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install airvideo on hp microserver + ubuntu</title>
		<link>http://yupmin.net/install-airvideo-on-hp-microserver-ubuntu</link>
		<comments>http://yupmin.net/install-airvideo-on-hp-microserver-ubuntu#comments</comments>
		<pubDate>Fri, 20 Apr 2012 11:57:03 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[HP Microserver]]></category>
		<category><![CDATA[airvideo]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=607</guid>
		<description><![CDATA[case : ubuntu hp microserver + ubuntu 에 airvideo를 깔아보았다. sudo apt-get install python-software-properties # to use 'add-apt-repository' sudo apt-get install  libmp3lame-dev libfaad-dev libx264-dev libmp3lame-dev libfaad-dev mpeg4ip-server faac openjdk-6-jre mysql-server ruby phonon sudo add-apt-repository ppa:rubiojr/airvideo sudo apt-get update sudo apt-get install airvideo-server sudo apt-get &#8230; <a href="http://yupmin.net/install-airvideo-on-hp-microserver-ubuntu">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>case : ubuntu</strong></p>
<p>hp microserver + ubuntu 에 airvideo를 깔아보았다.</p>
<pre class="brush: shell">sudo apt-get install python-software-properties # to use 'add-apt-repository'
sudo apt-get install  libmp3lame-dev libfaad-dev libx264-dev libmp3lame-dev libfaad-dev mpeg4ip-server faac openjdk-6-jre mysql-server ruby phonon
sudo add-apt-repository ppa:rubiojr/airvideo
sudo apt-get update
sudo apt-get install airvideo-server
sudo apt-get install ttf-unfonts-core ttf-unfonts-extra # to use undotum
sudo vi /opt/airvideo-server/AirVideoServerLinux.properties

path.ffmpeg = /opt/airvideo-server/bin/ffmpeg
path.mp4creator = /usr/bin/mp4creator
path.faac = /usr/bin/faac
password = 123456789a
#subtitles.encoding = windows-1250
subtitles.encoding = euc-kr
subtitles.font = undotum
folders = movies:/home/xxx/movies,series:/home/xxx/series,animations:/home/xxx/animations

sudo vi /etc/init/airvideo.conf

start on runlevel [2345]
stop on shutdown
respawn

exec sudo -H -n -u [account name] LANG=ko_KR.UTF-8 /usr/bin/java -jar /opt/airvideo-server/AirVideoServerLinux.jar /opt/airvideo-server/AirVideoServerLinux.properties

sudo start airvideo</pre>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/install-airvideo-on-hp-microserver-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>전주 영화제 즈음에 전주 맛집</title>
		<link>http://yupmin.net/jeonju-restaurant-pub</link>
		<comments>http://yupmin.net/jeonju-restaurant-pub#comments</comments>
		<pubDate>Tue, 10 Apr 2012 04:41:40 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[전주]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=616</guid>
		<description><![CDATA[전주국제영화제 Staff을 2년간 한 관계로 그나마 서울사람임에도 불구하고 전주 맛집을 많이 알게되었다. 여기 있는 건 그나마 다 가본데이고 전주국제영화제 2년간의 산물이다. 여기 나와 있는 대부분의 맛집들은 검색하면 화려한 사진들과 함께 자세한 위치도 알수 있다. 전주가 생각보다 좁기 때문에 대부분의 맛집을 &#8230; <a href="http://yupmin.net/jeonju-restaurant-pub">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>전주국제영화제 Staff을 2년간 한 관계로 그나마 서울사람임에도 불구하고 전주 맛집을 많이 알게되었다. 여기 있는 건 그나마 다 가본데이고 전주국제영화제 2년간의 산물이다.</p>
<p>여기 나와 있는 대부분의 맛집들은 검색하면 화려한 사진들과 함께 자세한 위치도 알수 있다. 전주가 생각보다 좁기 때문에 대부분의 맛집을 가는 제일 쉬운 방법은 택시를 타고 운전기사 아저씨에게 어디 가겠다라고만해도 짧은 거리라도 데려다 주신다.</p>
<p>그리고 전주 맛집이라고 전주비빔밥 찾는다면 검색해도 나오니 거기 가시라. 여기는 전주사람들이 먹는 음식을 주로 얘기하겠다. 전주사람들이 이글을 보면 이정도 가지고 맛집이라고 할수 있냐는 정도니 일단 영화제일을 하면서 가본데만 적도록 하겠다.</p>
<p>시간이 되는데로 계속 업데이트 하겠다.</p>
<h2>1. 전일수퍼</h2>
<p>가맥(일명 가게맥주)의 진수라고 봐야 할듯 하다. 북어포 구이 및 계란말이가 일품에 싸디싼 가정용 맥주(?)를 맛볼 수 있다. 겨우 맥주따위라고 하겠지만, 한번 가서 맛을 보면 잊지 못할정도다. 일단 전주 지역에 여러 가맥집이 있지만, 전일수퍼는 한번 꼭 가봐줘야 한다. <a href="http://dmaps.kr/9uz2">전주 시청 근처</a>에 하나 있고 서신동에도 <a href="http://dmaps.kr/9uz3">하나</a> 있다. 본점은 전주 시청 근처다.</p>
<h2>2. 막걸리집</h2>
<p>전주시내에는 막걸리 한상(정식 명칭은 아님) 이란 메뉴가 있다. 막걸리를 한동(주전자, 약 12,000원)를 시키면 안주가 돌아가면서 한상 나오는데 전주 사람은 일상이겠지만, 타지역 사람들에게는 눈돌아가는 광경이다.<br />
예전에는 <a href="http://dmaps.kr/9uzz">옛촌막걸리</a>를 갔었는데 옛촌막걸리가 예전같지 않다. 그래서 가는 곳이 <a title="막걸리 일번지" href=" http://dmaps.kr/9tyy ">막걸리 일번지</a> 이다.</p>
<h2>3. 진미집, 오원집</h2>
<p>둘 집다 연탄불에 구운 돼지고기와 김밥을 싸서 먹는 선술집이다. 김밥을 왜 돼지고기와 같이 먹는지는 일단 먹어보면 안다. 값이 싸고 좀 늦게가면 자리가 없다. <a href="http://dmaps.kr/9uz4">진미집</a> 과 <a href="http://dmaps.kr/9uz5">오원집</a> 은 풍남멘션 건너편 중앙시장에 있다.</p>
<h2>4. 콩나물 국밥집</h2>
<p>콩나물 국밥집은 사실 전주가 아닌 지역에서는 애타게 찾을수 밖에 없는 전주만의 맛을 즐길수 있는 필수 아이템이다.</p>
<ul>
<li><a href="http://dmaps.kr/9uz6">투가리</a> : 개인적으로 좋아하는 집이다. 약간 매운듯 하면서도 국물이 맛있다.</li>
<li><a href="http://dmaps.kr/9uz7">왱이집</a> : 양이 많고, 김, 다시다 등이 추가로 나온다.</li>
<li><a href="http://dmaps.kr/9uz8">엄마손</a> : 남부시장에가면 먹을수 있고, 일단 맵지만 맛있다. 피순대도 같이 먹을수 있다.</li>
<li><a href="http://dmaps.kr/9uza">삼백집</a> : 개인적으로는 비추다. 수란이 안나오고 계란후라이로 나온다.</li>
</ul>
<div></div>
<h2>5. 계수나무</h2>
<p>홍합짬뽕으로 유명한 집이자, 가격대 성능비로 최고인집이라 할수 있겠다. 홍합짬뽕외에 다양한 종류의 짬뽕 맛을 즐길수 있다. <a href="http://dmaps.kr/9uzb">경기전 근처</a>에 있다. 여기를 가기전에는 배를 비우고 가야 한다.</p>
<h2>6. 소바집</h2>
<p>영화의 거리에 있는 <a href="http://dmaps.kr/9uzd">한양소바</a>도 괜찮고 좀 시간이 된다면 남부시장에 있는 <a href="http://dmaps.kr/9uzg">진미집</a>(위의 진미집과 다름)에 가보는 것도 좋다. 진미집의 경우 콩국수도 파는데 우리가 먹던 그런 콩국수와는 맛이 다르다. (그러니깐 콩가루가 노란색?)</p>
<h2>7. 이래면옥</h2>
<p>갈비탕과 냉면을 파는데, 특히 갈만탕(갈비탕 + 만두)이라는 메뉴가 있다.  <a href="http://dmaps.kr/9uzh">경기전 근처</a> 계수나무와 가깝다.</p>
<h2>8. 해이루(구 다락방) 해장국</h2>
<p>뼈다귀 해장국집인데 보통 우리가 보아오는 뼈다귀 해장국집과 다르다. 탕안에 뼈가 10개 넘게 들어있고, 고기 바르라고 집게와 장갑을 줄정도. 양이 많으니 주의 <a href="http://dmaps.kr/9uzj">전북대 근처</a>에 있다.</p>
<h2>9. 통집</h2>
<p>대학가 포장마차집으로 보면 되겠다. 꼬막과 닭똥집, 계란말이들이 맛있다. <a href="http://dmaps.kr/9uzk">전북대 근처</a></p>
<h2>10. 반야돌솥</h2>
<p>우리가 평소에 먹는 돌솥밥과는 다른 야채 돌솥밥, 더덕구이도 나온다. 전주가면 꼭 한번 먹게되는 음식 <a href="http://dmaps.kr/9uzm">남문지구대 근처</a></p>
<h2>11. 베테랑 분식</h2>
<p>들깨 칼국수랑 만두를 판다. 드라마 &#8220;단팥빵&#8221;에서 나온 바로 그곳. 단 밀가루 음식이다 보니 1, 2번 먹으면 약간 질린다.<a href="http://dmaps.kr/9uzn"> 성심 여중고 바로 앞</a></p>
<h2>12. 옴시롱감시롱</h2>
<p><a href="http://dmaps.kr/9uzq">영화의 거리</a>에 유명한 떡볶이/순대 분식집. 가격이 쌈.</p>
<h2>13. 남노갈비</h2>
<p><a href="http://dmaps.kr/9uzt">전주시청 근처</a>고, 콩나물, 당면, 물갈비전골이 나온다. 타 지역사람들이 먹기에는 좀 신기한 음식</p>
<h2>14. 정통우동</h2>
<p>밤에 출출하고 야식을 먹고 싶다면 여기가 딱이다. 짜장면과 우동을 먹을수 있다. 밤에만 장사를 하시니 낮에 와봤자다. <a href="http://dmaps.kr/9uzv">홈플러스 근처</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/jeonju-restaurant-pub/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using highpoint rocketraid 272x_1x on hp microserver</title>
		<link>http://yupmin.net/using-highpoint-rocketraid-on-hp-microserver</link>
		<comments>http://yupmin.net/using-highpoint-rocketraid-on-hp-microserver#comments</comments>
		<pubDate>Tue, 10 Apr 2012 04:36:11 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[HP Microserver]]></category>
		<category><![CDATA[hp microserver]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[rocketraid]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=611</guid>
		<description><![CDATA[hp microserver 에 raid 카드를 써보기로 했다. 다른 microserver사용자들이 사용했다는 highpoint rocketraid 2710 카드이고 4port에 raid 0, 1, 5, 6, 10를 지원한다. 여기에 하드 디스크 2T 4개를 꼽았다. 이 raid는 linux 드라이버/관리툴도 지원한다. 메뉴얼에 있는데로 서버(ubuntu)에 깔아봤지만 잘 작동을 하지 않는다. 그래서 &#8230; <a href="http://yupmin.net/using-highpoint-rocketraid-on-hp-microserver">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>hp microserver 에 raid 카드를 써보기로 했다. 다른 microserver사용자들이 사용했다는 <a href="http://www.highpoint-tech.com/USA_new/CS-series_rr272x.htm">highpoint rocketraid 2710</a> 카드이고 4port에 raid 0, 1, 5, 6, 10를 지원한다. 여기에 하드 디스크 2T 4개를 꼽았다.</p>
<p>이 raid는 linux 드라이버/관리툴도 지원한다. 메뉴얼에 있는데로 서버(ubuntu)에 깔아봤지만 잘 작동을 하지 않는다. 그래서 찾아본바 드라이버 소스를 컴파일 하는 방법으로 깔면 된다.</p>
<p>source : <a href="http://www.highpoint-tech.com/USA_new/CS-PCI-E_2_0_x8_Configuration.html">http://www.highpoint-tech.com/USA_new/CS-PCI-E_2_0_x8_Configuration.html</a></p>
<pre class="brush: shell">wget http://www.highpoint-tech.com/BIOS_Driver/rr272x_1x/Linux/RR272x_1x-Linux-Src-v1.3-120217-1736.tar.gz

tar xvfz R272x_1x-Linux-Src-v1.3-120217-1736.tar.gz
cd rr272x_1x-linux-src-v1.3/product/rr272x/linux
make;sudo make install
sudo modprobe rr272x_1x
lsmode | grep rr272x_1x</pre>
<p>2T * 4 이기 때문에 8T 하드 이기 때문에 하드 연결을 위해 parted를 사용한다.</p>
<pre class="brush: shell">parted /dev/sdb
mklabel gpt
mkpart primary 0 100%
exit

mkfs.ext4 /dev/sdb1</pre>
<p>관리툴도 지원해주는데, 웹 관리툴을 사용하기로 했다. 근데 문제는 rpm 패키지 밖에 없다. README.txt 파일을 읽어보면 alien을 써서 rpm패키지를 deb패키지로 바꿔서 설치하라고 나온다.</p>
<pre class="brush: shell">apt-get install alien
wget http://www.highpoint-tech.com/BIOS_Driver/GUI/linux/WebGui/WebGUI-Linux-v1.4-14-100917.tgz
tar xvfz WebGUI-Linux-v1.4-14-100917.tgz
alien -d hptsvr-https-1.4-14.x86_64.rpm
dpkg -i hptsvr-https_1.4-15_amd64.deb</pre>
<p>깔고 나면 다음과 같이 파일이 생성된다.</p>
<pre class="brush: shell">/usr/bin/hptsvr            - service program
/etc/hptcfg                - service config file
/etc/rc.d/init.d/hptdaemon - service control script
/usr/share/hpt/webguiroot  - data files</pre>
<p>https://localhost:7402 접속 아이디/비번 RAID / hpt 이다.</p>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/using-highpoint-rocketraid-on-hp-microserver/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using SimpleDB CLI</title>
		<link>http://yupmin.net/using-simpledb-cli</link>
		<comments>http://yupmin.net/using-simpledb-cli#comments</comments>
		<pubDate>Tue, 17 Jan 2012 06:00:04 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[simpledb]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=565</guid>
		<description><![CDATA[case : amazon linux ami http://aws.amazon.com/code/1136 http://code.google.com/p/amazon-simpledb-cli/ sudo yum install autoconf automake libtool make sudo yum install perl-CPAN perl-YAML sudo yum install openssl-devel sudo yum install perl-Digest-SHA perl-XML-Simple perl-Digest-SHA1 perl-Digest-HMAC perl-Time-HiRes sudo perl -MCPAN -e 'install Bundle::LWP' wget http://aws-libraries.s3.amazonaws.com/perl/AmazonSimpleDB/2009-04-15/AmazonSimpleDB-2009-04-15-perl-library.zip unzip AmazonSimpleDB-2009-04-15-perl-library.zip &#8230; <a href="http://yupmin.net/using-simpledb-cli">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>case : amazon linux ami</strong></p>
<p><a href="http://aws.amazon.com/code/1136">http://aws.amazon.com/code/1136</a><br />
<a href="http://code.google.com/p/amazon-simpledb-cli/">http://code.google.com/p/amazon-simpledb-cli/</a></p>
<pre class="brush: bash;">sudo yum install autoconf automake libtool make
sudo yum install perl-CPAN perl-YAML
sudo yum install openssl-devel
sudo yum install perl-Digest-SHA perl-XML-Simple perl-Digest-SHA1 perl-Digest-HMAC perl-Time-HiRes
sudo perl -MCPAN -e 'install Bundle::LWP'

wget http://aws-libraries.s3.amazonaws.com/perl/AmazonSimpleDB/2009-04-15/AmazonSimpleDB-2009-04-15-perl-library.zip
unzip AmazonSimpleDB-2009-04-15-perl-library.zip
sitelib=$(perl -MConfig -le 'print $Config{sitelib}')
sudo scp -r AmazonSimpleDB-*-perl-library/src/Amazon $sitelib

sudo curl -Lo /usr/local/bin/simpledb http://simpledb-cli.notlong.com
sudo chmod +x /usr/local/bin/simpledb</pre>
<p>몇가지 테스트를 해보자</p>
<pre class="brush: bash;">simpledb create-domain snapshot
simpledb list-domains
simpledb put snapshot test test='abc'
simpledb select "SELECT * FROM snapshot"
simpledb delete snapshot test
simpledb select "SELECT * FROM snapshot"</pre>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/using-simpledb-cli/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install memcached</title>
		<link>http://yupmin.net/install-memcached</link>
		<comments>http://yupmin.net/install-memcached#comments</comments>
		<pubDate>Wed, 19 Oct 2011 01:54:43 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=96</guid>
		<description><![CDATA[아 Memcached 홈페이지 배너가 너무 Geek(덕스럽) 하다. 이 포스트가 이 블로그에서 제일 많이 들어오는 거리 중 하나라서 기념 배너를 추가해봤다. case centos 일단centos 배포본에는 memcached가 없다 그래서 소스컴파일로 설치한다.(root로 가정) yum install libevent libevent-devel wget http://memcached.googlecode.com/files/memcached-1.4.9.tar.gz tar -xvzf memcached-1.4.9.tar.gz cd &#8230; <a href="http://yupmin.net/install-memcached">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://yupmin.net/wp-content/uploads/2010/08/memcached_banner75.jpg" rel="lightbox[96]"><img class="aligncenter size-full wp-image-471" title="memcached_banner75" src="http://yupmin.net/wp-content/uploads/2010/08/memcached_banner75.jpg" alt="" width="785" height="145" /></a></p>
<p>아 <a href="http://memcached.org/">Memcached 홈페이지</a> 배너가 너무 Geek(덕스럽) 하다. 이 포스트가 이 블로그에서 제일 많이 들어오는 거리 중 하나라서 기념 배너를 추가해봤다.</p>
<p><strong>case centos</strong><br />
일단centos 배포본에는 memcached가 없다 그래서 소스컴파일로 설치한다.(root로 가정)</p>
<pre class="brush: shell;">yum install libevent libevent-devel
wget http://memcached.googlecode.com/files/memcached-1.4.9.tar.gz
tar -xvzf memcached-1.4.9.tar.gz
cd memcached-1.4.9
./configure --with-libevent=/usr/lib/
make; make install</pre>
<p>기본 설정 파일도 만들어주자.</p>
<pre class="brush: shell;">vi /etc/memcached.conf
#Memory a usar
-m 16
# default port
-p 11211
# user to run daemon nobody/apache/www-data
-u nobody
# only listen locally
-l 127.0.0.1</pre>
<p>init script 도 생성해준다. 참조 사이트</p>
<ul>
<li><a href="http://www.vbseo.com/blogs/danny-bembibre/daemon-scripts-memcached-44/" target="_self">http://www.vbseo.com/blogs/danny-bembibre/daemon-scripts-memcached-44/</a></li>
<li><a href="http://www.dev411.com/wiki/Memcached_startup_files_for_Red_Hat_%28RHEL%29" target="_self">http://www.dev411.com/wiki/Memcached_startup_files_for_Red_Hat_%28RHEL%29</a></li>
</ul>
<p>일단 만들어 놓은 스크립트가 있으니 다운받아 사용도록 하자</p>
<p>memcached init script downlod : <a href="http://yupmin.net/wp-content/uploads/2010/08/memcached_script.tar.gz">memcached_script.tar.gz</a></p>
<pre class="brush: shell;">wget http://yupmin.net/wp-content/uploads/2010/08/memcached_script.tar.gz
tar xvfz memcached_script.tar.gz
mv start-memcached /usr/local/bin/start-memcached
mv memcached /etc/init.d/memcached
chmod 755 /usr/local/bin/start-memcached
chmod 755 /etc/init.d/memcached</pre>
<p><strong>case ubuntu</strong></p>
<p>유분투에는 쉽게 설치 패키지가 준비되어있다.(root로 가정)</p>
<pre class="brush: shell;">apt-get install memcached
service memcached start</pre>
<p><strong>case centos</strong></p>
<p>memcached php 관련 패키지는 centos에 있다.</p>
<pre class="brush: shell;">yum install php-pecl-memcache</pre>
<p>혹은  php버젼이 업데이트 되거나 몇가지 안되는 경우가 있다 이럴땐 직접 컴파일한다.</p>
<pre class="brush: shell;">wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar xvfz memcache-2.2.5.tgz
cd memcache-2.2.5
phpize
./configure --enable-memcache
make
cp modules/memcache.so /usr/lib/php/modules</pre>
<p>php에 모듈을 셋팅해주자.</p>
<pre class="brush: shell;">vi /etc/php.d/memcache.ini
extension=memcache.so</pre>
<p>memcached php test : <a href="http://dorkage.net/2009/02/memcached-test/" target="_blank">http://dorkage.net/2009/02/memcached-test/</a></p>
<p>이외에 또한 memcache php 모듈과 다르게 memcached php모듈이 있는데 필요하면 깔아둔다.</p>
<p>참조 : <a href="http://libmemcached.org">http://libmemcached.org</a> <a href="http://pecl.php.net/package/memcached">http://pecl.php.net/package/memcached</a></p>
<pre class="brush: shell;">wget http://launchpad.net/libmemcached/1.0/0.53/+download/libmemcached-0.53.tar.gz
./configre
make; make install

wget http://pecl.php.net/get/memcached-2.0.0b2.tgz
tar xvfz memcached-2.0.0b2.tgz
cd memcached-2.0.0b2
phpize
./configure --with-libmemcached-dir=/usr/local/lib/
make; make install

vi /etc/php.d/memached.ini

extension=memcached.so</pre>
<p>A quick way to get memcached status : <a href="http://www.mysqlperformanceblog.com/2008/11/26/a-quick-way-to-get-memcached-status/" rel="bookmark">http://www.mysqlperformanceblog.com/2008/11/26/a-quick-way-to-get-memcached-status/</a></p>
<pre class="brush: shell;">watch "echo stats | nc 127.0.0.1 11211"</pre>
<p>mysql 컨퍼런스에서 한 외국인 강사가 발표했던 키노트 : <a href="http://download.tangent.org/talks/Memcached%20Study.pdf">http://download.tangent.org/talks/Memcached%20Study.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/install-memcached/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install mercurial with nginx</title>
		<link>http://yupmin.net/install-mercurial-with-nginx</link>
		<comments>http://yupmin.net/install-mercurial-with-nginx#comments</comments>
		<pubDate>Sun, 16 Oct 2011 05:29:42 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=443</guid>
		<description><![CDATA[개발을 할때면 간단히 형상관리를 할수 있는 개인만의 repository를 가지고 싶어지는데, AWS 상에서 nginx서버를 이용해서 간단한 mercurial web repository 를 구성해보았다. soruce url : http://geeksharp.com/2010/01/20/mercurial-web-with-fastcgi-nginx/ http://mercurial.selenic.com/wiki/HgWebDirStepByStep case : ubuntu(on aws) apt-get install nginx mercurial python-flup spawn-fcgi mkdir /var/www/hg chown ubuntu:www-data /var/www/hg case : &#8230; <a href="http://yupmin.net/install-mercurial-with-nginx">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>개발을 할때면 간단히 형상관리를 할수 있는 개인만의 repository를 가지고 싶어지는데, AWS 상에서 nginx서버를 이용해서 간단한 mercurial web repository 를 구성해보았다.</p>
<p>soruce url : <a href="http://geeksharp.com/2010/01/20/mercurial-web-with-fastcgi-nginx/">http://geeksharp.com/2010/01/20/mercurial-web-with-fastcgi-nginx/</a> <a href="http://mercurial.selenic.com/wiki/HgWebDirStepByStep">http://mercurial.selenic.com/wiki/HgWebDirStepByStep</a></p>
<p><strong>case</strong> : ubuntu(on aws)</p>
<pre class="brush: shell;">apt-get install nginx mercurial python-flup spawn-fcgi</pre>
<pre class="brush: shell;">mkdir /var/www/hg
chown ubuntu:www-data /var/www/hg</pre>
<p><strong>case</strong> : amazon linux ami(on aws)</p>
<pre class="brush: shell;">sudo yum install nginx spawn-fcgi mercurial
sudo easy_install flup</pre>
<pre class="brush: shell;">mkdir /var/www/hg
chown ec2-user:nginx /var/www/hg</pre>
<p>nginx를 ubuntu, yum 기본패키지를 깔수도 있고, 최신 stable 버젼으로 깔수도(<a href="http://wiki.nginx.org/Install">http://wiki.nginx.org/Install</a>) 있다.</p>
<pre class="brush: shell;">vi /var/www/hg/hgwebdir.fcgi

#!/usr/bin/env python
#
# An example CGI script to export multiple hgweb repos, edit as necessary

# adjust python path if not a system-wide install:
#import sys
#sys.path.insert(0, "/path/to/python/lib")

# enable demandloading to reduce startup time
from mercurial import demandimport; demandimport.enable()

# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb
#cgitb.enable()

# If you'd like to serve pages with UTF-8 instead of your default
# locale charset, you can do so by uncommenting the following lines.
# Note that this will cause your .hgrc files to be interpreted in
# UTF-8 and all your repo files to be displayed using UTF-8.
#
import os
os.environ["HGENCODING"] = "UTF-8"

from mercurial.hgweb.hgwebdir_mod import hgwebdir
from flup.server.fcgi import WSGIServer

# The config file looks like this. You can have paths to individual
# repos, collections of repos in a directory tree, or both.
#
# [paths]
# virtual/path1 = /real/path1
# virtual/path2 = /real/path2
# virtual/root = /real/root/*
# / = /real/root2/*
#
# [collections]
# /prefix/to/strip/off = /root/of/tree/full/of/repos
#
# paths example:
#
# * First two lines mount one repository into one virtual path, like
# '/real/path1' into 'virtual/path1'.
#
# * The third entry tells every mercurial repository found in
# '/real/root', recursively, should be mounted in 'virtual/root'. This
# format is preferred over the [collections] one, using absolute paths
# as configuration keys is not supported on every platform (including
# Windows).
#
# * The last entry is a special case mounting all repositories in
# '/real/root2' in the root of the virtual directory.
#
# collections example: say directory tree /foo contains repos /foo/bar,
# /foo/quux/baz. Give this config section:
# [collections]
# /foo = /foo
# Then repos will list as bar and quux/baz.
#
# Alternatively you can pass a list of ('virtual/path', '/real/path') tuples
# or use a dictionary with entries like 'virtual/path': '/real/path'

WSGIServer(hgwebdir('/var/www/hg/hgweb.config')).run()</pre>
<pre class="brush: shell;">sudo chmod ug+x /var/www/hg/hgwebdir.fcgi</pre>
<p>WSGI 서버를 만들수 있도록 한다.</p>
<pre class="brush: shell;">vi /var/www/hg/hgweb.config

[web]
baseurl = /
allow_push = *
push_ssl = false

[paths]
/ = /var/www/hg/*</pre>
<p>WSGI 서버에서 레포지토리 연결할수 있도록 설정 파일을 설정해준다.</p>
<pre class="brush: shell;">perl -le 'print crypt("[your-password]", "salt-hash")'
vi /var/www/hg/hgusers.config

username:encrypted-password:comment</pre>
<p>접근 암호도 설정해준다.</p>
<pre class="brush: shell;">vi /etc/init.d/fcgi-hg

#! /bin/sh
#
# fcgi-hg Startup script for the nginx HTTP Server
#
# chkconfig: - 84 15
# description: Loading php-cgi using spawn-cgi
# HTML files and CGI.
#
# Author: Ryan Norbauer
# Modified: Geoffrey Grosenbach http://topfunky.com
# Modified: David Krmpotic http://davidhq.com
# Modified: Kun Xi http://kunxi.org
PATH=/opt/python/bin:$PATH
DAEMON=/usr/bin/spawn-fcgi
FCGIHOST=127.0.0.1
FCGIPORT=9003
FCGIUSER=nginx # ubuntu www-data
FCGIGROUP=nginx
FCGIAPP=/var/www/hg/hgwebdir.fcgi
PIDFILE=/var/run/fcgi-hg.pid
DESC="HG in FastCGI mode"

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
test -x $FCGIAPP || exit 0

start() {
$DAEMON -a $FCGIHOST -p $FCGIPORT -u $FCGIUSER -g $FCGIGROUP -f $FCGIAPP -P $PIDFILE 2&gt; /dev/null || echo -en "\n already running"
}

stop() {
kill -QUIT `cat $PIDFILE` || echo -en "\n not running"
}

restart() {
kill -HUP `cat $PIDFILE` || echo -en "\n can't reload"
}

case "$1" in
start)
echo -n "Starting $DESC: "
start
;;
stop)
echo -n "Stopping $DESC: "
stop
;;
restart|reload)
echo -n "Restarting $DESC: "
stop
# One second might not be time enough for a daemon to stop,
# if this happens, d_start will fail (and dpkg will break if
# the package is being upgraded). Change the timeout if needed
# be, or change d_stop to have start-stop-daemon use --retry.
# Notice that using --retry slows down the shutdown process somewhat.
sleep 1
start
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload}" &gt;&amp;2
exit 3
;;
esac

exit $?</pre>
<p>서버 실행시 서비스 등록을 해준다.</p>
<pre class="brush: shell;">sudo chkconfig fcgi-hg on		# case amazon linux ami or centos
sudo update-rc.d fcgi-hg defaults		# case ubuntu</pre>
<p>fcgi-hg 에 대한 init script를 만들어주고 등록한다.</p>
<pre class="brush: shell;">vi /etc/nginx/host.d/xxxxx

server {
	listen 80;
	server_name test.abc.com;
	root /var/www/hg/;
	gzip on;

	location / {
		include fastcgi_params;
		fastcgi_pass 127.0.0.1:9003;
		fastcgi_split_path_info ^(/)(.*)$;
		fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;
		fastcgi_param  PATH_INFO        $fastcgi_path_info;
		fastcgi_param  AUTH_USER        $remote_user;
		fastcgi_param  REMOTE_USER      $remote_user;
		fastcgi_intercept_errors        off;
		limit_except GET HEAD {
			auth_basic  'Geek\'s Repositories';
			auth_basic_user_file /var/www/hg/hgusers.config;
		}
	}
	location /static/ {
		rewrite /static/(.*) /$1 break;
		root /usr/lib/python2.6/site-packages/mercurial/templates/static;
		expires 30d;
	}
}</pre>
<p>nginx 웹설정 파일을 수정해주고 nginx를 restart 를 하면 해당 도메인으로 mercurial web repository가 뜨는 것을 볼 수 있다.</p>
<pre class="brush: shell;">hg init /var/www/hg/[project_name]
sudo chgrp -R nginx /var/www/hg/[project_name]	# case centos
sudo chgrp -R www-data /var/www/hg/[project_name]	# case ubuntu</pre>
<p>[project_name]의 이름의 프로젝트를 위와 같이 추가하면 각각의 프로젝트에 대해 repository 가 생기는 것을 볼수 있다.</p>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/install-mercurial-with-nginx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iptables simple setting</title>
		<link>http://yupmin.net/iptables-simple-setting</link>
		<comments>http://yupmin.net/iptables-simple-setting#comments</comments>
		<pubDate>Fri, 22 Apr 2011 09:33:41 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=318</guid>
		<description><![CDATA[linux 서버를 셋팅할때 각각 배포본마다 설정되어있는 iptables 설정은 배포본의 경계를 넘나들때나, 변경할때 귀찮기 마련이다. 그래서 마련한 간단히 셋팅을 바꿀수 있는 스크립트. referance : http://wiki.centos.org/HowTos/Network/IPTables case : centos vi gen_iptable.sh #!/bin/bash /sbin/iptables -F # Allow SSH connections on tcp port 22 &#8230; <a href="http://yupmin.net/iptables-simple-setting">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>linux 서버를 셋팅할때 각각 배포본마다 설정되어있는 iptables 설정은 배포본의 경계를 넘나들때나, 변경할때 귀찮기 마련이다. 그래서 마련한 간단히 셋팅을 바꿀수 있는 스크립트.</p>
<p>referance : <a href="http://wiki.centos.org/HowTos/Network/IPTables">http://wiki.centos.org/HowTos/Network/IPTables</a></p>
<p><strong>case : centos</strong></p>
<pre class="brush: shell;">vi gen_iptable.sh

#!/bin/bash
/sbin/iptables -F
# Allow SSH connections on tcp port 22
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
# Set default policies for INPUT, FORWARD and OUTPUT chains
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT ACCEPT
# Set access for localhost
/sbin/iptables -A INPUT -i lo -j ACCEPT
# Accept packets belonging to established and related connections
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# My Firewall
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -s xxx.xxx.xxx.xxx -j ACCEPT
# Save settings
/sbin/service iptables save
# List rules
/sbin/iptables -L -v</pre>
<p><strong>case : ubuntu</strong></p>
<pre class="brush: shell;">vi gen_iptable.sh

#!/bin/bash
/sbin/iptables -F
# Allow SSH connections on tcp port 22
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
# Set default policies for INPUT, FORWARD and OUTPUT chains
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT ACCEPT
# Set access for localhost
/sbin/iptables -A INPUT -i lo -j ACCEPT
# Accept packets belonging to established and related connections
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# My Firewall
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -s xxx.xxx.xxx.xxx -j ACCEPT
# Save settings
/sbin/iptables-save &gt; /etc/iptables.rule
# List rules
/sbin/iptables -L -v</pre>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/iptables-simple-setting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using clamav &amp; php-clamv</title>
		<link>http://yupmin.net/using-clamav-php-clamv</link>
		<comments>http://yupmin.net/using-clamav-php-clamv#comments</comments>
		<pubDate>Wed, 20 Apr 2011 08:30:14 +0000</pubDate>
		<dc:creator>yupmin</dc:creator>
				<category><![CDATA[Language]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://yupmin.net/?p=357</guid>
		<description><![CDATA[clamv는 오픈소스로 제공되는 백신프로그램이다. 또한 php-clamv를 이용하면 업로드 되는 파일이 바이러스나 웹쉘, rootkit일 경우 잡아줄수 있는 php 라이브러리이다. hompage : http://www.clamav.net/ case centos : wget http://download.fedora.redhat.com/pub/epel/5/i386/clamav-db-0.97-12.el5.i386.rpm wget http://download.fedora.redhat.com/pub/epel/5/i386/clamav-0.97-12.el5.i386.rpm wget http://download.fedora.redhat.com/pub/epel/5/i386/clamav-devel-0.97-12.el5.i386.rpm wget http://download.fedora.redhat.com/pub/epel/5/i386/clamd-0.97-12.el5.i386.rpm rpm -Uvh clamav-db-0.97-12.el5.i386.rpm clamav-0.97-12.el5.i386.rpm clamav-devel-0.97-12.el5.i386.rpm clamd-0.97-12.el5.i386.rpm referance : &#8230; <a href="http://yupmin.net/using-clamav-php-clamv">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://yupmin.net/wp-content/uploads/2011/04/clam_av_logo.png" rel="lightbox[357]"><img class="aligncenter size-full wp-image-398" title="clam_av_logo" src="http://media0.yupmin.net/wp-content/uploads/2011/04/clam_av_logo.png" alt="" width="200" height="200" /></a>clamv는 오픈소스로 제공되는 백신프로그램이다. 또한 php-clamv를 이용하면 업로드 되는 파일이 바이러스나 웹쉘, rootkit일 경우 잡아줄수 있는 php 라이브러리이다.</p>
<p>hompage : <a href="http://www.clamav.net/">http://www.clamav.net/</a></p>
<p><strong>case centos</strong> :</p>
<pre class="brush: shell;">wget http://download.fedora.redhat.com/pub/epel/5/i386/clamav-db-0.97-12.el5.i386.rpm
wget http://download.fedora.redhat.com/pub/epel/5/i386/clamav-0.97-12.el5.i386.rpm
wget http://download.fedora.redhat.com/pub/epel/5/i386/clamav-devel-0.97-12.el5.i386.rpm
wget http://download.fedora.redhat.com/pub/epel/5/i386/clamd-0.97-12.el5.i386.rpm
rpm -Uvh clamav-db-0.97-12.el5.i386.rpm clamav-0.97-12.el5.i386.rpm clamav-devel-0.97-12.el5.i386.rpm clamd-0.97-12.el5.i386.rpm</pre>
<p>referance : <a href="http://code.google.com/p/clamav-cron/">http://code.google.com/p/clamav-cron/</a></p>
<p>clamav-cron를 이용하면 쉽게 cron등록을 할 수 있다. (단 실제 실행해보니 몇가지 권한 문제가 있어서 몇가지 수정했다. 알맞게 이메일등과 메일 제목들을 수정해준다.)</p>
<pre class="brush: shell;">wget http://clamav-cron.googlecode.com/files/clamav-cron-0.6 -O /usr/local/bin/clamav-cron
chmod 755 /usr/local/bin/clamav-cron
vi /usr/local/bin/clamav-cron 

#!/bin/bash
#
# clamav-cron v. 0.6.1 - Copyright © 2009, Stefano Stagnaro &amp; Yupmin
# This is Free Software released under the GNU GPL license version 3

#============================================#
#        User configuration section          #
#============================================#

# Log file name and its path:
CV_LOGFILE="/var/log/clamav-cron.log"

# Notification e-mail sender (could be fake):
CV_MAILFROM="abc@test.com"

# Notification e-mail recipient:
CV_MAILTO="abc@test.com"

# Notification e-mail secondary recipients:
#CV_MAILTO_CC="stefano@abc.com; danilo@abc.com"

# Notification e-mail subject:
CV_SUBJECT="Test.com - ClamAV scan report"

#============================================#

CV_TARGET="$1"
CV_VERSION="0.6"

if [ -e $CV_LOGFILE ]
then
        /bin/rm $CV_LOGFILE
fi
/bin/touch $CV_LOGFILE
/bin/chmod 666 $CV_LOGFILE
/bin/chmod o+w /var/lib/clamav

if [ -z "$1" ]
then
        CV_TARGET="$HOME"
fi

#To be read on stdout (and root mail):
echo -e `basename $0` v. $CV_VERSION - Copyright 2009, Stefano Stagnaro '\n'

#To be read on logfile (sent via sendmail):
echo -e $CV_SUBJECT - $(date) '\n' &gt;&gt; $CV_LOGFILE
echo -e Script: `basename $0` v. $CV_VERSION - Copyright 2009, Stefano Stagnaro  &gt;&gt; $CV_LOGFILE
echo -e Scanned: $CV_TARGET on $HOSTNAME'\n' &gt;&gt; $CV_LOGFILE

/usr/bin/freshclam --log=$CV_LOGFILE --user $USER --verbose

#To be read on stdout (and root mail):
echo -e '------------------------------------\n'

/usr/bin/clamscan --infected --log=$CV_LOGFILE --recursive $CV_TARGET
CLAMSCAN=$?

if [ "$CLAMSCAN" -eq "1" ]
then
        CV_SUBJECT="[VIRUS!] "$CV_SUBJECT
elif [ "$CLAMSCAN" -gt "1" ]
then
        CV_SUBJECT="[ERR] "$CV_SUBJECT
fi

#/bin/mail -s "$CV_SUBJECT" -c $CV_MAILTO_CC $CV_MAILTO -- -f $CV_MAILFROM &lt; $CV_LOGFILE
/bin/mail -s "$CV_SUBJECT" $CV_MAILTO -- -f $CV_MAILFROM &lt; $CV_LOGFILE</pre>
<p>cron으로 매일 돌리지 말고, 중요한 부위등을 알맞게 나눠서 돌리면 될듯 하다.</p>
<pre class="brush: shell;">vi /etc/crontab
45 23 * * 6 /usr/local/bin/clamav-cron /home</pre>
<p>clamav-php 라이브러리는 다음과 같이 설치한다. 기본 clamav가 깔려있는 clamav database path등에 유의한다.</p>
<p><strong><span style="color: #ff0000;">php-clamav의 경우 centos 5 에 컴파일해서 사용할 경우 아파치 프로세스크가가 5~7배 커지는 것으로 보임. 사용주의 요망.</span></strong></p>
<p>source : <a href="http://php-clamav.sourceforge.net/">http://php-clamav.sourceforge.net/</a></p>
<pre class="brush: shell;">wget http://sourceforge.net/projects/php-clamav/files/0.15/php-clamav_0.15.3.tar.gz/download
tar xvfz php-clamav-0.15.3
cd php-clamav-0.15.3
phpize
./configure --with-clamav
make; make install;
vi /etc/clamav.ini

extension=clamav.so
[clamav]
clamav.dbpath="/var/clamav"
clamav.maxreclevel=16
clamav.maxfiles=10000
clamav.maxfilesize=26214400
clamav.maxscansize=104857600
clamav.keeptmp=0
clamav.tmpdir="/var/tmp"</pre>
]]></content:encoded>
			<wfw:commentRss>http://yupmin.net/using-clamav-php-clamv/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

