<?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/"
	>

<channel>
	<title>Mustafa Çayköylü</title>
	<atom:link href="http://www.caykoylu.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.caykoylu.com</link>
	<description>Mustafa Çayköylü</description>
	<pubDate>Sun, 01 Mar 2009 19:33:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Centos 5 ffmpeg Kurulumu,FlvTool Kurulumu</title>
		<link>http://www.caykoylu.com/archives/10/centos-5-ffmpeg-kurulumuflvtool-kurulumu.php</link>
		<comments>http://www.caykoylu.com/archives/10/centos-5-ffmpeg-kurulumuflvtool-kurulumu.php#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:33:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux Server Yönetimi]]></category>

		<guid isPermaLink="false">http://www.caykoylu.com/?p=10</guid>
		<description><![CDATA[I recently had the need to install FfMpeg for a project I am working on. After Googling for some time I learned a little bit about the ffmpeg project. The most interesting thing I learned was their are no formal releases of the project. So I just downloaded it from SVN using the following command:
svn [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the need to install FfMpeg for a project I am working on. After Googling for some time I learned a little bit about the ffmpeg project. The most interesting thing I learned was their are no formal releases of the project. So I just downloaded it from SVN using the following command:</p>
<p><code>svn export svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg</code></p>
<p>Then I just ran</p>
<p><code>./configure</code></p>
<p>In the directory I downloaded ffmpeg too, and finally</p>
<p><code>make &amp;&amp; make install</code></p>
<p>That’s it, it was up and running in a few minutes. I have added this here because so many of the blogs</p>
<div class="KonaBody">
<div id="post_message_4543533">I seen where a lot of server management companies are charging big bucks for this, so this might save you some time and money.<br />
First</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; height: 34px; text-align: left;" dir="ltr">nano -w /etc/yum.repos.d/dag.repo</pre>
</div>
<p>Insert</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; height: 98px; text-align: left;" dir="ltr">[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1</pre>
</div>
<p>Then yum update and search for ffmpeg and install all ffmpeg packages including devel.<br />
Seems there is some lib problems along the way so  in /etc/ld.so.conf<br />
add<br />
/usr/local/lib<br />
then<br />
ldconfig -v<br />
To install the php extension follow the simple directions on http://ffmpeg-php.sourceforge.net/<br />
Then you should be all set!</p>
<p>Tried and tested on 2 different centos server, works fine.</p></div>
</div>
<p><!-- / message -->with information regarding Ffmpeg and CentOS 5 were out of date or wrong. It also helps that my version of CentOS already had gcc and gcc-c++ installed, both of which are needed to compile these from their sources.</p>
<p><span id="more-10"></span></p>
<p><strong>How to install ffmpeg on centos</strong></p>
<div class="entry-head">
<h3 class="entry-title">A Robust FFMPEG Install for CentOS 5</h3>
</div>
<p><!-- .entry-head --></p>
<div class="entry-content">
<p>A little while back, I posted a basic install of ffmpeg for CentOS 5. After working with that build over the last month, I found I needed to expand it to include many different video codecs. Because of licensing restrictions, binaries of the build cannot be distributed. However, instructions for a similar build can! I spent several days (or more) researching the packages I would need and I must have combed dozens of blogs to find this information. <span style="text-decoration: line-through;">The build I made strips sound from videos</span> [See update at the end of this post for more information on this subject], this decreases the final file size. If you need sound, you will not want to follow these steps exactly. I also stripped ffserver and ffplay from my build.</p>
<p>These packages were executed in the following order. I cannot say for certain this exact order must be followed, it was the order in which ffmpeg threw the errors. This tutorial assumes you have wget, bzip2, tar and subversion installed on your system. If you do not, please find and install the lastest versions of these utilities for CentOS 5. Additionally, I have allowed all packages to install into their default directories, typically this is /usr/local/[bin | lib]. If at any point during the process of a ‘make’ you run into errors, be sure and run ‘make clean’ before running ‘make’ again. You will either need root access of su access to install ffmpeg. The marker ‘codec:$’ is my prompt, it is merely to indicate separate commands.</p>
<ul>
<li>Package a52</li>
<li>Package FAAD2</li>
<li> Package FAAC</li>
<li>Package LAME</li>
<li>Package yasm</li>
<li>Package X264</li>
<li>Package Xvid</li>
<li>Package libraw1394</li>
<li>Package libdc1394</li>
</ul>
<p><strong>Getting Started</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$
codec:$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> .<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>ffmpeg-packages
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> .<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>ffmpeg-packages</pre>
</div>
</div>
<p><strong>Installing a52</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>liba52.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>a52dec-0.7.4.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxf</span> a52dec-0.7.4.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> a52dec-0.7.4
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-shared</span>=PKGS
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing FAAD2</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>faac<span style="color: #000000; font-weight: bold;">/</span>faad2-2.6.1.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxf faad2-2.6.1.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> faad2
codec:$ autoreconf <span style="color: #660033;">-vif</span>
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--disable-drm</span> <span style="color: #660033;">--disable-mpeg4ip</span>
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing FAAC</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>faac<span style="color: #000000; font-weight: bold;">/</span>faac-1.26.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxfv faac-1.26.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> faac
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>bootstrap
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--disable-mp4v2</span>
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing LAME</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> \
http:<span style="color: #000000; font-weight: bold;">//</span>superb-east.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">lame</span><span style="color: #000000; font-weight: bold;">/</span>\
lame-3.98b8.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxfv lame-3.98b8.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> lame-3.98b8
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing yasm</strong></p>
<p>YASM is a modular assembler, it is required by the x264 package.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> \
http:<span style="color: #000000; font-weight: bold;">//</span>www.tortall.net<span style="color: #000000; font-weight: bold;">/</span>projects<span style="color: #000000; font-weight: bold;">/</span>yasm<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>yasm-0.7.0.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zfvx yasm-0.7.0.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> yasm-0.7.0
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing x264</strong><br />
The x264 package is under git revision control, which is much like CVS or SVN. Thankfully, they provide daily tarballs. I grabbed this one:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> \
<span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.videolan.org:<span style="color: #000000;">21</span><span style="color: #000000; font-weight: bold;">//</span>pub<span style="color: #000000; font-weight: bold;">/</span>videolan<span style="color: #000000; font-weight: bold;">/</span>x264<span style="color: #000000; font-weight: bold;">/</span>snapshots<span style="color: #000000; font-weight: bold;">/</span>\
x264-snapshot-<span style="color: #000000;">20080513</span>-2245.tar.bz2</pre>
</div>
</div>
<p>I just did a little exploring via an FTP program to find the snapshot I was after. If you are feeling adventurous, download git and try checking out the latest version from their repository.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">bzip2</span> <span style="color: #660033;">-d</span> x264-snapshot-<span style="color: #000000;">20080513</span>-2245.tar.bz2
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xfv x264-snapshot-<span style="color: #000000;">20080513</span>-2245.tar
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> x264-snapshot-<span style="color: #000000;">20080513</span>-<span style="color: #000000;">2245</span>
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-mp4-output</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-pthread</span>
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing Xvid</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.xvid.org<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>xvidcore-1.1.3.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxfv xvidcore-1.1.3.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> xvidcore-1.1.3<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>generic
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..</pre>
</div>
</div>
<p><strong>Installing libraw1394</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.linux1394.org<span style="color: #000000; font-weight: bold;">/</span>dl<span style="color: #000000; font-weight: bold;">/</span>libraw1394-1.3.0.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxfv libraw1394-1.3.0.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> libraw1394-1.3.0
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> dev
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing libdc1394</strong></p>
<p>This project requires libraw1394, you must build it first. This project is a little confusing there is both a libdc1394 and a libdc1394-2. I have only installed the former. Visit Sourceforge here. I grabbed the tarball here:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">wget</span> \
http:<span style="color: #000000; font-weight: bold;">//</span>superb-west.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>libdc1394<span style="color: #000000; font-weight: bold;">/</span>\
libdc1394-1.2.2.tar.gz
codec:$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxfv libdc1394-1.2.2.tar.gz
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> libdc1394-1.2.2
codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre>
</div>
</div>
<p><strong>Installing ffmpeg</strong></p>
<p>For FFMPEG, you will need to get the latest out of SVN. FFMPEG doesn’t ever make releases. To do so, run:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #c20cb9; font-weight: bold;">svn</span> checkout <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.mplayerhq.hu<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span><span style="color: #000000; font-weight: bold;">/</span>trunk <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span></pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-gpl</span>  <span style="color: #660033;">--enable-postproc</span> <span style="color: #660033;">--enable-nonfree</span> <span style="color: #660033;">--enable-postproc</span> <span style="color: #660033;">--enable-libfaad</span> <span style="color: #660033;">--enable-swscale</span> <span style="color: #660033;">--enable-avfilter</span> <span style="color: #660033;">--enable-pthreads</span> <span style="color: #660033;">--enable-libxvid</span> <span style="color: #660033;">--enable-libx264</span> <span style="color: #660033;">--enable-libmp3lame</span> <span style="color: #660033;">--enable-libdc1394</span> <span style="color: #660033;">--enable-liba52</span> <span style="color: #660033;">--enable-libfaac</span> <span style="color: #660033;">--disable-ffserver</span> <span style="color: #660033;">--disable-ffplay</span>
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span>
codec:$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre>
</div>
</div>
<p>It usually takes at least 5 mins for ‘make’ to run, be sure you have a good file before attempting to install. You will need to be sure and run the ldconfig setting if you have to re-compile, otherwise ffmpeg will throw an error that it cannot find library files. Here is a good resource for using ffmpeg.</p>
<p><strong>Post-Installation Actions</strong></p>
<p>After the install in complete, you may need to add the /usr/local/lib directory to your ld.so.config file. Do the following:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>
codec:$ <span style="color: #7a0874; font-weight: bold;">cd</span> ld.so.conf.d
codec:$ <span style="color: #c20cb9; font-weight: bold;">vi</span> ffmpeg.conf</pre>
</div>
</div>
<p>You need to add ‘/usr/local/lib’ [sans-quotes] to this file and save it. Press Esc, :, x to do so in vi. Afterwords you need to run the following from the commandline</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;">codec:$ ldconfig</pre>
</div>
</div>
<p>That’s it, you now have a fairly robust build of ffmpeg that can take almost anything you can throw at it. Sadly, licensing restrictions prevent binaries from being made of the above steps. Happy (video) encoding!</p>
<p><strong>Update:</strong> This build doesn’t actually strip sound from videos, I am doing that with a flag when I run ffmpeg, however, it should be noted that all the audio codecs you may find in many common video formats may not be supported in this build of ffmpeg, which is why I am choosing to strip audio entirely from videos.</div>
<p><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.caykoylu.com/archives/10/centos-5-ffmpeg-kurulumuflvtool-kurulumu.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>RKhunter kurulumu RootkitHunter Kurulumu</title>
		<link>http://www.caykoylu.com/archives/7/rkhunter-kurulumu-rootkithunter-kurulumu.php</link>
		<comments>http://www.caykoylu.com/archives/7/rkhunter-kurulumu-rootkithunter-kurulumu.php#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:27:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux Server Yönetimi]]></category>

		<category><![CDATA[RKhunter kurulumu]]></category>

		<category><![CDATA[RootkitHunter]]></category>

		<guid isPermaLink="false">http://www.caykoylu.com/?p=7</guid>
		<description><![CDATA[Rkhunter trojan,rootkit ve diğer güvenlik sorunları için çok yararlı bir araçtır.
SSH a root olarak bağlanıyoruz ve komutları çalıştırıyoruz.
 wget http://downloads.rootkit.nl/rkhunter-1.2.7.tar.gz
tar -zxvf rkhunter-1.2.7.tar.gz
cd rkhunter
./installer.sh

Şimd manuel bir tarama yapmak için komutumuzu yazalım:
 /usr/local/bin/rkhunter -c
 Günlük crona almak ve otomatik tarama yaptırmak için dosyayı açalım:

pico /etc/cron.daily/rkhunter.sh

Ve mail kısmına kendi mailinizi yazdıktan sonra dosyaya bunu yapıştırın ve kaydedip çıkın:
#!/bin/bash
(/usr/local/bin/rkhunter [...]]]></description>
			<content:encoded><![CDATA[<div id="post_message_472"><strong>Rkhunter trojan,rootkit ve diğer güvenlik sorunları için çok yararlı bir araçtır.</p>
<p><abbr title="Secure Shell">SSH</abbr> a root olarak bağ<abbr title="Local Area Network">lan</abbr>ıyoruz ve komutları çalıştırıyoruz.<br />
</strong> <span style="font-size: x-small;"><span style="color: #993333;">wget <a rel="nofollow" href="http://downloads.rootkit.nl/rkhunter-1.2.7.tar.gz" target="_blank">http://downloads.rootkit.nl/rkhunter-1.2.7.tar.gz</a><br />
</span></span><span style="font-size: x-small;"><span style="color: #993333;">tar -zxvf <span style="color: #0071dd;">rkhunter-1.2.7.tar.gz</span><br />
cd rkhunter<br />
./installer.sh<br />
</span></span><span id="more-7"></span><br />
<strong>Şimd manuel bir tarama yapmak için komutumuzu yazalım:</p>
<p></strong> <span style="font-size: x-small;"><span style="color: #993300;">/usr/local/bin/rkhunter -c</p>
<p></span></span> <strong>Günlük crona almak ve otomatik tarama yaptırmak için dosyayı açalım:<br />
</strong><br />
<span style="color: #993300;">pico /etc/cron.daily/rkhunter.sh<br />
</span><br />
<strong>Ve mail kısmına kendi mailinizi yazdıktan sonra dosyaya bunu yapıştırın ve kaydedip çıkın</strong>:</p>
<p>#!/bin/bash<br />
(/usr/local/bin/rkhunter -c &#8211;cronjob 2&gt;&amp;1 | mail -s &#8220;Daily Rkhunter Scan Report&#8221; <a href="mailto:email@domain.com">email@domain.com</a>)</p>
<p><span style="color: #000000;"><strong>rkhunter güncelleme :</strong><br />
rkhunter güncelleme işlemi için şu komutu yazmanız yeterli<br />
</span></p>
<p><strong><span style="color: #000000;">rkhunter &#8211;update</span></strong></div>
]]></content:encoded>
			<wfw:commentRss>http://www.caykoylu.com/archives/7/rkhunter-kurulumu-rootkithunter-kurulumu.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Brute Force Detection Kurulumu BFD Kurlumu</title>
		<link>http://www.caykoylu.com/archives/5/brute-force-detection-kurulumu-bfd-kurlumu.php</link>
		<comments>http://www.caykoylu.com/archives/5/brute-force-detection-kurulumu-bfd-kurlumu.php#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:25:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux Server Yönetimi]]></category>

		<category><![CDATA[BFD Kurlumu]]></category>

		<category><![CDATA[Brute Force Detection]]></category>

		<guid isPermaLink="false">http://www.caykoylu.com/?p=5</guid>
		<description><![CDATA[SSH&#8217;a root olarak giris yapiniz 
cd /root/downloads
wget http://www.rfxnetworks.com/downloads/bfd-current.tar.gz
tar -xvzf bfd-current.tar.gz
cd bfd-0.7
./install.sh

BFD (Brute Force Detection) kurulmustur, simdi config dosyasini editlemliyiz.
-nano /usr/local/bfd/conf.bfd
Su yazinin altinda : Enable brute force hack attempt alerts:
BUNU BUL :  
ALERT_USR=&#8221;0&#8243; 
BUNUNLA DEGiSTiR :
ALERT_USR=&#8221;1&#8243;
BUNU BUL :
EMAIL_USR=&#8221;root&#8221; 
BUNUNLA DEGiSTiR :

EMAIL_USR=&#8221;senin@mailin.com&#8221;
BFD (Brute Force Detection) çalistirmak için :
-/usr/local/sbin/bfd -s
Yine ayni sekilde bunu eger cron job seçenegi [...]]]></description>
			<content:encoded><![CDATA[<p><em>SSH&#8217;a root olarak giris yapiniz </em></p>
<p><strong>cd /root/downloads<br />
wget <a href="http://www.rfxnetworks.com/downloads/bfd-current.tar.gz" target="_blank">http://www.rfxnetworks.com/downloads/bfd-current.tar.gz</a><br />
tar -xvzf bfd-current.tar.gz<br />
cd bfd-0.7<br />
./install.sh</strong><br />
<span id="more-5"></span><br />
<em>BFD (Brute Force Detection) kurulmustur, simdi config dosyasini editlemliyiz.</em></p>
<p><strong>-nano /usr/local/bfd/conf.bfd</strong></p>
<p><em>Su yazinin altinda :</em> <strong>Enable brute force hack attempt alerts:</strong></p>
<p><!--coloro:#cc0000--><span style="color: #cc0000;"><!--/coloro--><em>BUNU BUL : </em> <!--colorc--></span><!--/colorc--></p>
<p><strong>ALERT_USR=&#8221;0&#8243; </strong></p>
<p><!--coloro:#cc0000--><span style="color: #cc0000;"><!--/coloro-->BUNUNLA DEGiSTiR :<!--colorc--></span><!--/colorc--></p>
<p><strong>ALERT_USR=&#8221;1&#8243;</strong></p>
<p><!--coloro:#cc0000--><span style="color: #cc0000;"><!--/coloro--><em>BUNU BUL :</em><!--colorc--></span><!--/colorc--></p>
<p><strong>EMAIL_USR=&#8221;root&#8221; </strong></p>
<p><!--coloro:#cc0000--><span style="color: #cc0000;"><!--/coloro--><em>BUNUNLA DEGiSTiR :</em><!--colorc--></span><!--/colorc--><br />
<strong><br />
EMAIL_USR=&#8221;senin@mailin.com&#8221;</strong></p>
<p><em>BFD (Brute Force Detection) çalistirmak için :</em></p>
<p><strong>-/usr/local/sbin/bfd -s</strong></p>
<p><em>Yine ayni sekilde bunu eger cron job seçenegi varsa ekleyebilirsiniz, günlük sizin belirttiginiz saatlerde scan yapacaktir.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.caykoylu.com/archives/5/brute-force-detection-kurulumu-bfd-kurlumu.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>APF Firewall Kurulumu SSH</title>
		<link>http://www.caykoylu.com/archives/3/apf-firewall-kurulumu-ssh.php</link>
		<comments>http://www.caykoylu.com/archives/3/apf-firewall-kurulumu-ssh.php#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:23:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux Server Yönetimi]]></category>

		<category><![CDATA[APF Firewall]]></category>

		<guid isPermaLink="false">http://www.caykoylu.com/?p=3</guid>
		<description><![CDATA[APF Nedir ?
APF kural tabanlı bir iptables güvenlik duvarıdır.Ayarlanması ve kullanılması özellikle sunucular için çok kolaydır.

Özellikleri
- Kolay anlaşılan kural tabanlı ayar dosyası.
- Bağımsız giriş ve çıkış filtreleme.
- ID tabanlı çıkış kontrolu bu sayede belirtilen uygulamanın sahibine bakarak çıkış yapıp yapmamasına izin verebilirsiniz.
- Genel tcp/udp port ve icmp tipi ayarlar
- Sistemdeki her ip için özel yapılandırma.
icmp [...]]]></description>
			<content:encoded><![CDATA[<p><strong>APF Nedir ?</strong></p>
<p>APF kural tabanlı bir iptables güvenlik duvarıdır.Ayarlanması ve kullanılması özellikle sunucular için çok kolaydır.<br />
<span id="more-3"></span><br />
<strong>Özellikleri</strong></p>
<p>- Kolay anlaşılan kural tabanlı ayar dosyası.<br />
- Bağımsız giriş ve çıkış filtreleme.<br />
- ID tabanlı çıkış kontrolu bu sayede belirtilen uygulamanın sahibine bakarak çıkış yapıp yapmamasına izin verebilirsiniz.<br />
- Genel tcp/udp port ve icmp tipi ayarlar<br />
- Sistemdeki her ip için özel yapılandırma.<br />
icmp ataklarını önlemek için icmp tabanlı koruma sistemi<br />
antidos yazılımı<br />
- dshield.org engel listesi bu listede aktif olan saldırganlar tüm apf kullanan sunucularda erişim hakları engellenir.<br />
- tcp/ip saldırılarını engelleemk için özel sysctl ayar dosyası<br />
- İstenmiyen trafiği engellemekiçin özel hazırlanabilen kural dizisi<br />
- Kernel seçeneklerini kullanabilme abort_on_overflow ve tcp syncookies gibi.<br />
- Kolay yönetilebilir bir güvenlik duvarı yazılımı.<br />
- Güvenebileceğiniz ve direk olarak engelleyeceğiniz hostları belirtebileceğiniz kural dosyası.<br />
- APF ile uyumlu 3. parti uygulamaları.</p>
<p>Çok etkili bir güvenlik duvarı olmakla beraber sunucuların genelinde bu güvenlik duvarı kullanılmaktadır.Ayar dosyaları ve kurulumu kolaydır ve etkilidir.</p>
<p><strong>KURULUM</strong></p>
<p>PHP Kodu:<br />
- /usr/local/src dizinine geçiyoruz</p>
<p>PHP Kodu:<br />
cd /usr/local/src</p>
<p>- Dosyayı sunucuya indiriyoruz.</p>
<p>PHP Kodu:<br />
wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz</p>
<p>Sıkıştırılmış arşiv dosyasını açıyoruz.<br />
PHP Kodu:<br />
tar -xvzf apf-current.tar.gz</p>
<p>Uygulamanın bulunduğu dizine giriyoruz.</p>
<p>PHP Kodu:<br />
cd apf-0.9.5-1/</p>
<p>Kurulum scriptini çalıştırıyoruz</p>
<p>PHP Kodu:<br />
./install.sh</p>
<p>.: APF installed<br />
Install path: /etc/apf<br />
Config path: /etc/apf/conf.apf<br />
Executable path: /usr/local/sbin/apf<br />
AntiDos install path: /etc/apf/ad/<br />
AntiDos config path: /etc/apf/ad/conf.antidos<br />
DShield Client Parser: /etc/apf/extras/dshield/</p>
<p>- Ayar dosyasını açıp gerekli düzenlemeleri yapacağız<br />
PHP Kodu:<br />
pico /etc/apf/conf.apf</p>
<p>İlk önce değişkenlerin ne olduğunu size açıklayacağım sonra gerekli düzenlemeri yapacağız.</p>
<p>DEVM=&#8221;1&#8243;<br />
Devolopment mod olarak açıklanıyor güvenlik duvarı ilk kurulduğunda standart olarak bu modda siz ayarları yapana kadar her 5 dakikada bir güvenlik duvarı kurallarını temizliyor.Böylece ssh portunu engelleseniz bile 5 dakika içerisinde girebilirsiniz.Herşeyin yolunda gittiğini anladıktan sonra bu değeri 0 olarak ayarlayın ve güvenlik duvarını yeniden başlatın.<br />
LGATE_MAC=&#8221;"<br />
Yerek ağ mac adresidir.Buraya bir değer girildiği zaman sadece buradan gelen isteklere izin verilicektir.Biz bu değeri boş bırakacağız.<br />
LGATE_LOG=&#8221;0&#8243;<br />
Değeri 1 olarak ayarlarsanız bütün ağ trafiğinin kayıdı tutulucaktır.Biz bu değeride 0 olarak bırakacağız.<br />
EN_VNET=&#8221;0&#8243;<br />
Bu değeri 1 olarak ayarlarsanız sistemdeki tüm ipler için farklı kurallar kurabilirsiniz./etc/apf/vnet/ dizinine bu kuralı yerleştirebilrisiniz gene standart olarak bir template bu dizinde var.<br />
TIF=&#8221;"<br />
Güvenilen ağlar .<br />
DROP_LOG=&#8221;1&#8243;<br />
Kernel tabanlı loglama.<br />
LRATE=&#8221;60&#8243;<br />
Iptables in dakikada logladığı olay sayısı.<br />
IG_TCP_CPORTS=&#8221;22&#8243;<br />
S istemde içeriye tcp portlarını belirtir.22 yazan yere virgul ile açılıcak portları yazının devamında ekleyeceğiz.<br />
IG_UDP_CPORTS=&#8221;"<br />
İçeriye açılıcak udp portlarını gösterir.<br />
EGF=&#8221;0&#8243;<br />
Bu değeri 1 olarak açıcağız çıkan paketlerin filtrelenmesi.<br />
EG_TCP_CPORTS=&#8221;22&#8243;<br />
Sitemden dışarıya açılacak tcp portları.<br />
EG_UDP_CPORTS=&#8221;"<br />
Sistemden dışarıya açılıcak udp portları.<br />
USE_DS=&#8221;0&#8243;<br />
Dshield.org un engellenenler listesine bu seçeneği 1 olarak seçerseniz katkıda bulunursunuz.</p>
<p><strong>Cpanel de Yapılacak değişiklikler</strong></p>
<p>- Ayar dosyamızı açıyoruz:<br />
PHP Kodu:<br />
pico /etc/apf/conf.apf<br />
- Dosya içinde aşağıdaki değişiklikleri yapıyoruz:</p>
<p>Alıntı:<br />
USE_DS=&#8221;0&#8243;<br />
ve 3 satır altındaki</p>
<p>USE_AD=&#8221;0&#8243;<br />
kısımlarını bulup</p>
<p>USE_DS=&#8221;1&#8243;<br />
USE_AD=&#8221;1&#8243;<br />
olarak değiştiriyoruz.</p>
<p>- IG_TCP_CPORTS yazan kısmı buluyoruz</p>
<p>içindeki portları silip aşağıdaki portları ekliyoruz<br />
PHP Kodu:<br />
IG_TCP_CPORTS=&#8221;20,21,22,25,26,53,80,110,143,443,465,993,995,2082, 2083,2086,2087,2095,2096&#8243;</p>
<p>- IG_UDP_CPORTS kısmını buluyoruz, içindeki portları silip aşağıdaki portları eklliyoruz:<br />
PHP Kodu:<br />
IG_UDP_CPORTS=&#8221;21,53,873&#8243;</p>
<p>- EFG kısmını buluyoruz EGF=&#8221;0&#8243; olan değeri EGF=&#8221;1&#8243; olarak değiştiriyoruz</p>
<p>EG_TCP_CPORTS kısmını buluyoruz içindeki port listesini temizleyip aşağıdaki portları ekliyoruz.<br />
PHP Kodu:<br />
EG_TCP_CPORTS=&#8221;21,22,25,26,27,37,43,53,80,110,113,443,465,873,208 9&#8243;</p>
<p>EG_UDP_CPORTS kısmını buluyoruz içindeki port listesini temizleyip aşağıdaki portları ekliyoruz</p>
<p>PHP Kodu:<br />
EG_UDP_CPORTS=&#8221;20,21,37,53,873&#8243;</p>
<p>Çalıştırma</p>
<p>Kod:<br />
/usr/local/sbin/apf -s</p>
<p>komutunu uygulayarak güvenlik duvarımızı başlatıyoruz. SSH oturumumuzu kapatıp yeni bir oturum açıp sunucuya girmeye çalışıyoruz. Eğer herhangi bir sorunla karşılaşırda giremezseniz güvenlik duvarı kurallarının 5 dakika içinde silineceğini unutmayın.</p>
<p>Başarılı bir şekilde giriş yaptıysanız editörümüz ile apf nin ayar dosyasını tekrar açıp devolopment moddan çıkartıcaz böylece artık güvenlik duvarı kuralları 5 dakikada bir temizlenmeyecektir:</p>
<p>Kod:<br />
pico /etc/apf/conf.apf<br />
DEVM=&#8221;1&#8243; olan kısımı bulup DEVM=&#8221;0&#8243; değiştiriyorsunuz.</p>
<p>Kod:<br />
/usr/local/sbin/apf -r<br />
komutu ile tekrar başlatıyoruz&#8230;<br />
Güvenlik Duvarı ile kullanabileceğiniz parametreler</p>
<p>/usr/local/sbin/apf -s<br />
Güvenlik Duvarını açar.</p>
<p>/usr/local/sbin/apf -r<br />
Güvenlik Duvarını yeniden başlatır.</p>
<p>/usr/local/sbin/apf -st<br />
Güvenlik Duvarının durumunu gösterir.</p>
<p>/usr/local/sbin/apf -f<br />
Güvenlik Duvarını durdurur.</p>
<p>/usr/local/sbin/apf -l<br />
Kuralları listeler.<br />
Bir kullanıcının apf yardımı ile sistemden uzaklaştırılması</p>
<p>Kod:<br />
/usr/local/sbin/apf -d ipnumarası</p>
<p>şeklindedir.</p>
<p>Sistemden uzaklaştırmak istediğiniz ip numarası 81.214.247.127 ise</p>
<p>Kod:<br />
/usr/local/sbin/apf -d 81.214.247.127</p>
<p>yazmanız yeterlidir.<br />
Otomatik çalıştırma</p>
<p>Son olarak apf nin sunucu yeniden başlatıldığında otomatik olarak başlatılmasını sağlamak için aşağıdkai komutu giriyoruz.</p>
<p>Kod:<br />
chkconfig &#8211;level 2345 apf on<br />
APF antidos modülünün kurulumu</p>
<p>Antidos modülü bir log analiz modülüdür arka arkaya gelen istekleri değerlendirerek bunu sizin belirlediğiniz değeri aştığında saldırganların sistemden uzaklaştırılmasını sağlamaktadır.</p>
<p>/etc/apf/ad/conf.antidos<br />
yazıp konfigurasyon dosyasını açıyoruz,<br />
LP_KLOG=&#8221;0&#8243; kısmını bulup<br />
LP_KLOG=&#8221;1&#8243; şeklinde değiştiriyoruz<br />
DET_SF=&#8221;0&#8243; kısmını bulup<br />
DET_SF=&#8221;1&#8243; şeklinde değiştiriyoruz<br />
TRIG=&#8221;12&#8243; kısmını bulup<br />
TRIG=&#8221;10&#8243; şeklinde değiştiriyoruz<br />
SF_TRIG=&#8221;25&#8243; kısmını bulup<br />
SF_TRIG=&#8221;12&#8243; şeklinde değiştiriyoruz<br />
DROP_IF=&#8221;0&#8243; kısmını bulup<br />
DROP_IF=&#8221;1&#8243; şeklinde değiştiriyoruz<br />
IPT_BL=&#8221;0&#8243; kısmını bulup<br />
IPT_BL=&#8221;1&#8243; şeklinde değiştiriyoruz<br />
USR_ALERT=&#8221;0&#8243; kısmını bulup,USR_ALERT=&#8221;1&#8243; olarak değiştiriyoruz. DET_SF=&#8221;0&#8243; kısmını bulup, DET_SF=&#8221;1&#8243; olarak değiştiriyoruz. Option: USR=&#8221;you@yourco.com&#8221;kısmını bulup mail adresinizi yazıyorsunuz.</p>
<p>- Dosyayı kaydedip çıktıktan sonra :</p>
<p>Kod:<br />
crontab -e</p>
<p>yazarak crpntab ı açıyoruz buraya aşağıdaki girdiyi yazıyoruz.</p>
<p>Kod:<br />
*/2 * * * * root /etc/apf/ad/antidos -a &gt;&gt; /dev/null 2&gt;&amp;1</p>
<p>ve contabdan çıkıp</p>
<p>Kod:<br />
/usr/local/sbin/apf -r</p>
<p>komutu ile güvenlik duvarını tekrar başlatıyoruz.<br />
APF Güvenlik Duvarının durumunu size mail ile bildirilsin</p>
<p>APF güvenlik duvarının durumunun yani çalışıp çalışmadığının ve loglarının size bildirilmesini istiyorsanız aşağıdaki değişikliği yapın.</p>
<p>- /etc/cron.daily/ klasörüne giriyoruz.</p>
<p>cd /etc/cron.daily</p>
<p>Bilgilendirme dosyasını açıyoruz.</p>
<p>pico apfdurumbilgisi.sh</p>
<p>İçinde aşağıdaki kodu yapıştırıyoruz mail adresinizi değiştirmeyi unutmayın.</p>
<p>Kod:<br />
#!/bin/bash<br />
tail -100 /var/log/apf_log | mail -s &#8220;APF Durum Bilgisi&#8221; service@lnwservers.com</p>
<p>Kaydedip çıkıyoruz ve dosyaya gerekli izini vereceğiz şimdi.</p>
<p>Kod:<br />
chmod 755 apfdurumbilgisi.sh</p>
<p>Artık hergün elinize çalışıp çalışmadığına dair bir rapor gelicektir.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caykoylu.com/archives/3/apf-firewall-kurulumu-ssh.php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.caykoylu.com/archives/1/hello-world.php</link>
		<comments>http://www.caykoylu.com/archives/1/hello-world.php#comments</comments>
		<pubDate>Sun, 01 Mar 2009 17:43:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux Server Yönetimi]]></category>

		<guid isPermaLink="false">http://www.caykoylu.com/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caykoylu.com/archives/1/hello-world.php/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
