<?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>IT блог - полезные заметки. &#187; Unix</title>
	<atom:link href="http://itblog.su/category/unix/feed" rel="self" type="application/rss+xml" />
	<link>http://itblog.su</link>
	<description>IT blog - авторский блог о Linux, windows, php, mysql.</description>
	<lastBuildDate>Wed, 04 Apr 2012 10:50:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Proftpd listen ip</title>
		<link>http://itblog.su/proftpd-listen-ip.html</link>
		<comments>http://itblog.su/proftpd-listen-ip.html#comments</comments>
		<pubDate>Mon, 30 May 2011 16:08:31 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=548</guid>
		<description><![CDATA[По умолчанию Proftpd слушает порт 21 на всех интерфейсах, если же нужно указать ему отвечать строго на определенном интерфейсе используйте конфигурацию: SocketBindTight on Port 21 DefaultAddress 192.168.3.1 192.168.3.1 замените на нужный Вам ip адрес.]]></description>
			<content:encoded><![CDATA[<p>По умолчанию Proftpd слушает порт 21 на всех интерфейсах, если же нужно указать ему отвечать строго на определенном интерфейсе используйте конфигурацию:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><pre class="de1">SocketBindTight                 on
Port                            <span class="nu0">21</span>
DefaultAddress                 192.168.3.1</pre></div></div></div></div></div></div></div>


<p>192.168.3.1 замените на нужный Вам ip адрес.</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/proftpd-listen-ip.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>как нагнать траф?</title>
		<link>http://itblog.su/kak-nagnat-traf.html</link>
		<comments>http://itblog.su/kak-nagnat-traf.html#comments</comments>
		<pubDate>Tue, 28 Jul 2009 00:20:41 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=313</guid>
		<description><![CDATA[Возникла типичная для многих ситуация, на одном из серверов в одном из ДЦ оказалось что входящего трафа больше чем исходящего. причем нехватает пару терабайт исходящего. ничего страшного :) /dev/urandom безлимитный, осталось только выбрать ДЦ и сервер на который можно его перегнать. А перегонять будем так: cat /dev/urandom &#124; ssh server 'cat &#62; /traff' время от [...]]]></description>
			<content:encoded><![CDATA[<p>Возникла типичная для многих ситуация, на одном из серверов в одном из ДЦ оказалось что входящего трафа больше чем исходящего. причем нехватает пару терабайт исходящего.</p>
<p>ничего страшного :) /dev/urandom безлимитный, осталось только выбрать ДЦ и сервер на который можно его перегнать. А перегонять будем так:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>urandom <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> server <span style="color: #ff0000;">'cat &gt; /traff'</span></div></div>
<p>время от времени (по крону например) на принимающем сервере будем обнулять файлик traff</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>traff</div></div>
<p>пока писал, пришла в голову мысль, что можно передавать сразу в /dev/null</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>urandom <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> server <span style="color: #ff0000;">'cat &gt; /dev/null'</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/kak-nagnat-traf.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>простановка прав на папки и файлы сайта</title>
		<link>http://itblog.su/prostanovka-prav-na-papki-i-fajjly-sajjta.html</link>
		<comments>http://itblog.su/prostanovka-prav-na-papki-i-fajjly-sajjta.html#comments</comments>
		<pubDate>Thu, 12 Mar 2009 22:48:38 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[lang]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=279</guid>
		<description><![CDATA[Пришла заявка от клиента, человек по незнанию поставил рекурсивно на все файлы и папки своих сайтов права доступа 777. Захотелось человеку выставить 755 на папки и 644 на файлы, делать вручную это при паре десятков доменов и паре тысяч файлов упрятанных в запутанной структуре папок ну просто нереально. Тут ему пришел на помощь простой скрипт [...]]]></description>
			<content:encoded><![CDATA[<p>Пришла заявка от клиента, человек по незнанию поставил рекурсивно на все файлы и папки своих сайтов права доступа 777. Захотелось человеку выставить 755 на папки и 644 на файлы, делать вручную это при паре десятков доменов и паре тысяч файлов упрятанных в запутанной структуре папок ну просто нереально. Тут ему пришел на помощь простой скрипт запускаемый по ssh который просто ищет все папки в текущей директории и ставит им chmod 755 ну и файлы аналогично, только chmod 644.</p>
<p>Ну и собственно сам &#171;скрипт&#187;:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;<br />
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/prostanovka-prav-na-papki-i-fajjly-sajjta.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>резервное копирование (backup) всех баз mysql</title>
		<link>http://itblog.su/rezervnoe-kopirovanie-backup-vsekh-baz-mysql.html</link>
		<comments>http://itblog.su/rezervnoe-kopirovanie-backup-vsekh-baz-mysql.html#comments</comments>
		<pubDate>Wed, 11 Feb 2009 17:23:25 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backup mysql]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=272</guid>
		<description><![CDATA[Прошелся по нескольким блогам. почитал и удивился тому что для того чтобы сделать дампы всех баз mysql люди используют mysqldump &#8212;all-databases. На мой взгляд вариант более чем неудобный. Предложу более правильный вариант, снимаются дампы со всех баз данных каждая база в отдельный файл. Для пояснения: /backup/mysql/ &#8212; папка куда будем складывать дампы. megapass &#8212; пароль [...]]]></description>
			<content:encoded><![CDATA[<p>Прошелся по нескольким блогам. почитал и удивился тому что для того чтобы сделать дампы всех баз mysql люди используют mysqldump &#8212;all-databases. На мой взгляд вариант более чем неудобный.</p>
<p>Предложу более правильный вариант, снимаются дампы со всех баз данных каждая база в отдельный файл. Для пояснения:<br />
/backup/mysql/ &#8212; папка куда будем складывать дампы.<br />
megapass &#8212; пароль root к mysql</p>
<p>итак собственно сам скрипт:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>mysql <span style="color: #660033;">-pmegapass</span> <span style="color: #660033;">-e</span><span style="color: #ff0000;">'show databases;'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> information_schema <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> Database<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> mysqldump <span style="color: #660033;">-pmegapass</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y-<span style="color: #000000; font-weight: bold;">%</span>m-<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #000000; font-weight: bold;">`</span>-<span style="color: #007800;">$i</span>; <span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y-<span style="color: #000000; font-weight: bold;">%</span>m-<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #000000; font-weight: bold;">`</span>-<span style="color: #007800;">$i</span>;<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>теперь поясню что делается, в цикле вывода имен всех баз данных кроме information_schema и Database выполняется mysqldump в файл дата-имя_базы, затем дамп жмется gzip-ом.</p>
<p>На выходе получаем пачку файлов на подобии:<br />
2009-02-11-shakirov_kayako.gz<br />
2009-02-11-shakirov_mantis.gz<br />
2009-02-11-shakirov_openfire.gz</p>
<p>Например если в системе несколько пользователей и базы данных у них сделаны правильно (имя базы с префиксом имени пользователя, например shakirov_base), то можно делать бакапы баз разных пользователей в разные папки. С полученными бакапами можно поступать как удобно, хранить на отдельном диске, разделе. внешнем ftp сервере или заливать куда-то по scp.</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/rezervnoe-kopirovanie-backup-vsekh-baz-mysql.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to kill TCP connection in CentOS</title>
		<link>http://itblog.su/how-to-kill-tcp-connection-in-centos.html</link>
		<comments>http://itblog.su/how-to-kill-tcp-connection-in-centos.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 23:13:27 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[dsniff]]></category>
		<category><![CDATA[epel]]></category>
		<category><![CDATA[eth]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[lang]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[tcpkill]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=224</guid>
		<description><![CDATA[Убить tcp соединения в Centos (да и не только) можно утилитой tcpkill. Утилита входит в пакет dsniff, ставим из репозитория epel (на данный момент в этом репозитарии dsniff новее) или rpmforge под CentOS 5.2 &#91;root@srv001 ~&#93;# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm &#91;root@srv001 ~&#93;# yum install dsniff Ну, и несколько примеров использования: 1. убить все исходящие соединения с [...]]]></description>
			<content:encoded><![CDATA[<p>Убить tcp соединения в Centos (да и не только) можно утилитой tcpkill. Утилита входит в пакет dsniff, ставим из репозитория epel (на данный момент в этом репозитарии dsniff новее) или rpmforge под CentOS 5.2</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>srv001 ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>srv001 ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install dsniff</span></div></div>
<p>Ну, и несколько примеров использования:<br />
1. убить все исходящие соединения с интерфейса eth0 на порт 21</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tcpkill <span style="color: #660033;">-i</span> eth0 port <span style="color: #000000;">21</span></div></div>
<p>2. убить все соединения исходящие/входящие с хоста</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tcpkill host 192.168.0.1<br />
tcpkill host hostname.ru</div></div>
<p>3. убить все ip пакеты между хостом 192.168.0.1 и любым другим, кроме 192.168.0.10</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tcpkill <span style="color: #c20cb9; font-weight: bold;">ip</span> host 192.168.0.1 and not 192.168.0.10</div></div>
<p>Ну и различные от этого вариации. Прошу учесть тот факт что если пакеты убивать нужно идущие на/с ip &#171;зацепленного&#187; на логический интерфейс (например eth0:1), то нужно явно это указать, как-то так:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tcpkill <span style="color: #660033;">-i</span> eth0:<span style="color: #000000;">1</span> host 123.123.123.1</div></div>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/how-to-kill-tcp-connection-in-centos.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>sendmail: rejecting connections on daemon MTA: load average</title>
		<link>http://itblog.su/sendmail-rejecting-connections-on-daemon-mta-load-average.html</link>
		<comments>http://itblog.su/sendmail-rejecting-connections-on-daemon-mta-load-average.html#comments</comments>
		<pubDate>Mon, 06 Oct 2008 12:39:11 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=201</guid>
		<description><![CDATA[У sendmail есть такая забавная настройка, позволяющая не релеить письма в случае высокого load average. По умолчанию, если не ошибаюсь, значение авг не должно превышать 12-ти. Если avg выше, то будут лезть ошибки вроде этой: sendmail: rejecting connections on daemon MTA: load average: 26 Лечится это внесением в конфиг /etc/mail/sendmail.cf строчек: O QueueLA=100 O RefuseLA=100 [...]]]></description>
			<content:encoded><![CDATA[<p>У sendmail есть такая забавная настройка, позволяющая не релеить письма в случае высокого load average. По умолчанию, если не ошибаюсь, значение авг не должно превышать 12-ти. Если avg выше, то будут лезть ошибки вроде этой:<br />
sendmail: rejecting connections on daemon MTA: load average: 26</p>
<p>Лечится это внесением в конфиг /etc/mail/sendmail.cf строчек:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">O <span style="color: #007800;">QueueLA</span>=<span style="color: #000000;">100</span><br />
O <span style="color: #007800;">RefuseLA</span>=<span style="color: #000000;">100</span></div></div>
<p>Или же в конфиге /etc/mail/sendmail.mc директивы:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">`</span>confQueueLA<span style="color: #ff0000;">', `100'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>dnl<br />
define<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">`</span>confRefuseLA<span style="color: #ff0000;">', `100'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>dnl</div></div>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/sendmail-rejecting-connections-on-daemon-mta-load-average.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>аналог seq для freeBSD</title>
		<link>http://itblog.su/analog-seq-dlya-freebsd.html</link>
		<comments>http://itblog.su/analog-seq-dlya-freebsd.html#comments</comments>
		<pubDate>Mon, 29 Sep 2008 23:16:32 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=191</guid>
		<description><![CDATA[утилита seq присутствующая в linux весьма полезна, что она делает? просто считает от и до. Например: &#91;root@rhca ~&#93;# seq 1 5 1 2 3 4 5 В написании минискриптов, вещь не заменимая.. но в FreeBSD нет утилиты seq, зато есть аналог: jot Приведу пример, например есть логи /var/httpd/logs/error_log.0 &#8230; error_log.9 нужно их &#171;обнулить&#187; в linux [...]]]></description>
			<content:encoded><![CDATA[<p>утилита seq присутствующая в linux весьма полезна, что она делает? просто считает от и до. Например:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># seq 1 5</span><br />
<span style="color: #000000;">1</span><br />
<span style="color: #000000;">2</span><br />
<span style="color: #000000;">3</span><br />
<span style="color: #000000;">4</span><br />
<span style="color: #000000;">5</span></div></div>
<p>В написании минискриптов, вещь не заменимая.. но в FreeBSD нет утилиты seq, зато есть аналог: jot</p>
<p>Приведу пример, например есть логи /var/httpd/logs/error_log.0 &#8230; error_log.9 нужно их &#171;обнулить&#187; в linux я бы сделал так:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">seq</span> <span style="color: #000000;">0</span> <span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span>error_log.<span style="color: #007800;">$i</span>;<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>а во FreeBSD делаем так:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>jot <span style="color: #000000;">10</span> <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>logs<span style="color: #000000; font-weight: bold;">/</span>error_log.<span style="color: #007800;">$i</span>;<span style="color: #000000; font-weight: bold;">done</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/analog-seq-dlya-freebsd.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Включаем IP Forwarding в Linux</title>
		<link>http://itblog.su/vklyuchaem-ip-forwarding-v-linux.html</link>
		<comments>http://itblog.su/vklyuchaem-ip-forwarding-v-linux.html#comments</comments>
		<pubDate>Sat, 23 Aug 2008 10:26:06 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[CentOS Linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=182</guid>
		<description><![CDATA[По умолчанию в большинстве дистрибутивов IP Forwarding выключен, но форвардинг может понадобится если на сервере будет подниматься VPN или например это будет роутер. Проверить включен ли IP Forwarding можно так: sysctl net.ipv4.ip_forward cat /proc/sys/net/ipv4/ip_forward Включить можно так (действовать будет до перезагрузки): sysctl -w net.ipv4.ip_forward=1 или echo 1 &#62; /proc/sys/net/ipv4/ip_forward Или жётско включить (действовать будет и [...]]]></description>
			<content:encoded><![CDATA[<p>По умолчанию в большинстве дистрибутивов IP Forwarding выключен, но форвардинг может понадобится если на сервере будет подниматься VPN или например это будет роутер. </p>
<p>Проверить включен ли IP Forwarding можно так:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sysctl net.ipv4.ip_forward<br />
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ip_forward</div></div>
<p>Включить можно так (действовать будет до перезагрузки):</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sysctl <span style="color: #660033;">-w</span> net.ipv4.ip_forward=<span style="color: #000000;">1</span><br />
или<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ip_forward</div></div>
<p>Или жётско включить (действовать будет и после перезагрузки):</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># grep forward /etc/sysctl.conf</span><br />
net.ipv4.ip_forward = <span style="color: #000000;">1</span></div></div>
<p>В RedHat подобных:</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># grep -i forward /etc/sysconfig/network</span><br />
<span style="color: #007800;">FORWARD_IPV4</span>=<span style="color: #c20cb9; font-weight: bold;">true</span></div></div>
<p>в Debian (Ubuntu):</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># grep -i forward /etc/network/options</span><br />
<span style="color: #007800;">ip_forward</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span></div></div>
<p>После правки конфигов (перманентное включение) необходимо перезапустить сеть. например, /etc/init.d/network restart</p>
<p>Note that: В OpenVPN используется первый способ (изменение на лету), это прописано в стартап скриптах.</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/vklyuchaem-ip-forwarding-v-linux.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>создание и копирование ssh ключа на удалённый сервер</title>
		<link>http://itblog.su/sozdanie-i-kopirovanie-ssh-klyucha-na-udaljonnyjj-server.html</link>
		<comments>http://itblog.su/sozdanie-i-kopirovanie-ssh-klyucha-na-udaljonnyjj-server.html#comments</comments>
		<pubDate>Tue, 29 Jul 2008 20:59:57 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=161</guid>
		<description><![CDATA[Создаём пару ключей (публичный и приватный) на локальной машине. Вместо пароля жмём Enter (удобно для безпарольной авторизации по ssh). &#91;root@dev2 ~&#93;# ssh-keygen  -t dsa Generating public/private rsa key pair. Enter file in which to save the key &#40;/root/.ssh/id_rsa&#41;: Enter passphrase &#40;empty for no passphrase&#41;: Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. [...]]]></description>
			<content:encoded><![CDATA[<p>Создаём пару ключей (публичный и приватный) на локальной машине. Вместо пароля жмём Enter (удобно для безпарольной авторизации по ssh).</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dev2 ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ssh-keygen  -t dsa</span><br />
Generating public<span style="color: #000000; font-weight: bold;">/</span>private rsa key pair.<br />
Enter <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">which</span> to save the key <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa<span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
Enter passphrase <span style="color: #7a0874; font-weight: bold;">&#40;</span>empty <span style="color: #000000; font-weight: bold;">for</span> no passphrase<span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
Enter same passphrase again:<br />
Your identification has been saved <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.<br />
Your public key has been saved <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.pub.<br />
The key fingerprint is:<br />
b8:5d:<span style="color: #000000;">63</span>:6b:<span style="color: #000000;">98</span>:09:b9:<span style="color: #000000;">48</span>:f0:9d:b1:<span style="color: #000000;">91</span>:fa:<span style="color: #000000;">22</span>:e1:3d root<span style="color: #000000; font-weight: bold;">@</span>dev2</div></div>
<p>Теперь копируем свой публичный ключ ssh на удалённую машину в список допустимых ключей.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>dev2 .ssh<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ssh-copy-id -i ~/.ssh/id_rsa.pub localhost</span><br />
<span style="color: #000000;">21</span><br />
The authenticity of host <span style="color: #ff0000;">'localhost (127.0.0.1)'</span> can<span style="color: #ff0000;">'t be established.<br />
RSA key fingerprint is 24:e5:61:b4:26:72:9e:fa:c9:d0:76:93:c4:49:05:ba.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added '</span>localhost<span style="color: #ff0000;">' (RSA) to the list of known hosts.<br />
root@localhost'</span>s password:<br />
Now try logging into the machine, with <span style="color: #ff0000;">&quot;ssh 'localhost'&quot;</span>, and check in:<br />
<br />
.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys<br />
<br />
to <span style="color: #c20cb9; font-weight: bold;">make</span> sure we haven<span style="color: #ff0000;">'t added extra keys that you weren'</span>t expecting.</div></div>
<p>теперь по команде ssh localhost мы без ввода паролей сможем зайти на сервер localhost.<br />
<strong>примечание</strong>: Замените localhost на хостнэйм/ip удалённой машины.</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/sozdanie-i-kopirovanie-ssh-klyucha-na-udaljonnyjj-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Устанавливаем xCache с php 5.2.6 на CentOS</title>
		<link>http://itblog.su/ustanavlivaem-xcache-s-php-526-na-centos.html</link>
		<comments>http://itblog.su/ustanavlivaem-xcache-s-php-526-na-centos.html#comments</comments>
		<pubDate>Tue, 08 Jul 2008 15:12:31 +0000</pubDate>
		<dc:creator>Артур Шакиров</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://itblog.su/?p=144</guid>
		<description><![CDATA[&#91;root@rhca /&#93;# wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz &#91;root@rhca /&#93;# tar zxf xcache-1.2.2.tar.gz &#91;root@rhca /&#93;# cd xcache-1.2.2 &#91;root@rhca /&#93;# phpize &#91;root@rhca /&#93;# ./configure --enable-xcache &#91;root@rhca /&#93;# make &#38;&#38; &#160;make install теперь правим php.ini примерно так: &#91;root@rhca /&#93;# cat /usr/local/Zend/etc/php.ini &#91;xcache-common&#93; ;; install as zend extension &#40;recommended&#41;, normally &#34;$extension_dir/xcache.so&#34; &#160;zend_extension = &#160;/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so ; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so ;; For windows users, [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># tar zxf xcache-1.2.2.tar.gz</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd xcache-1.2.2</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># phpize</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ./configure --enable-xcache</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># make &amp;&amp; &nbsp;make install</span></div></div>
<p>теперь правим php.ini примерно так:<br />
<span id="more-144"></span></p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:700px;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>rhca <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /usr/local/Zend/etc/php.ini</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>xcache-common<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000; font-weight: bold;">;;</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">as</span> zend extension <span style="color: #7a0874; font-weight: bold;">&#40;</span>recommended<span style="color: #7a0874; font-weight: bold;">&#41;</span>, normally <span style="color: #ff0000;">&quot;<span style="color: #007800;">$extension_dir</span>/xcache.so&quot;</span><br />
&nbsp;zend_extension = &nbsp;<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>extensions<span style="color: #000000; font-weight: bold;">/</span>no-debug-non-zts-<span style="color: #000000;">20060613</span><span style="color: #000000; font-weight: bold;">/</span>xcache.so<br />
; zend_extension_ts = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>extensions<span style="color: #000000; font-weight: bold;">/</span>non-debug-zts-xxx<span style="color: #000000; font-weight: bold;">/</span>xcache.so<br />
<span style="color: #000000; font-weight: bold;">;;</span> For windows <span style="color: #c20cb9; font-weight: bold;">users</span>, replace xcache.so with php_xcache.dll<br />
;zend_extension_ts = c:<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>extensions<span style="color: #000000; font-weight: bold;">/</span>php_xcache.dll<br />
<span style="color: #000000; font-weight: bold;">;;</span> or <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">as</span> extension, <span style="color: #c20cb9; font-weight: bold;">make</span> sure your extension_dir setting is correct<br />
; extension = xcache.so<br />
<span style="color: #000000; font-weight: bold;">;;</span> or win32:<br />
; extension = php_xcache.dll<br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>xcache.admin<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
xcache.admin.enable_auth = On<br />
xcache.admin.user = <span style="color: #ff0000;">&quot;mOo&quot;</span><br />
; xcache.admin.pass = md5<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$your_password</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
xcache.admin.pass = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>xcache<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
; ini only settings, all the values here is default unless explained<br />
<br />
; <span style="color: #000000; font-weight: bold;">select</span> low level shm<span style="color: #000000; font-weight: bold;">/</span>allocator scheme implemenation<br />
xcache.shm_scheme = &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;mmap&quot;</span><br />
; to disable: xcache.size=<span style="color: #000000;">0</span><br />
; to <span style="color: #7a0874; font-weight: bold;">enable</span> : xcache.size=64M etc <span style="color: #7a0874; font-weight: bold;">&#40;</span>any <span style="color: #c20cb9; font-weight: bold;">size</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> and your system mmap allows<br />
xcache.size &nbsp;= &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32M<br />
; <span style="color: #000000; font-weight: bold;">set</span> to cpu count <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>cpuinfo <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-c</span> processor<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
xcache.count = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span><br />
; just a <span style="color: #7a0874; font-weight: bold;">hash</span> hints, you can always store count<span style="color: #7a0874; font-weight: bold;">&#40;</span>items<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> slots<br />
xcache.slots = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;8K<br />
; ttl of the cache item, <span style="color: #000000;">0</span>=forever<br />
xcache.ttl &nbsp; = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
; interval of <span style="color: #c20cb9; font-weight: bold;">gc</span> scanning expired items, <span style="color: #000000;">0</span>=no scan, other values is <span style="color: #000000; font-weight: bold;">in</span> seconds<br />
xcache.gc_interval = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
<br />
; same <span style="color: #c20cb9; font-weight: bold;">as</span> aboves but <span style="color: #000000; font-weight: bold;">for</span> variable cache<br />
xcache.var_size &nbsp;= &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0M<br />
xcache.var_count = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span><br />
xcache.var_slots = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;8K<br />
; default ttl<br />
xcache.var_ttl &nbsp; = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
xcache.var_maxttl &nbsp; = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
xcache.var_gc_interval = &nbsp; &nbsp; <span style="color: #000000;">300</span><br />
<br />
xcache.test = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Off<br />
; N<span style="color: #000000; font-weight: bold;">/</span>A <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero<br />
xcache.readonly_protection = Off<br />
; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">*</span>nix, xcache.mmap_path is a <span style="color: #c20cb9; font-weight: bold;">file</span> path, not directory.<br />
; Use something like <span style="color: #ff0000;">&quot;/tmp/xcache&quot;</span> <span style="color: #000000; font-weight: bold;">if</span> you want to turn on ReadonlyProtection<br />
; <span style="color: #000000;">2</span> group of php won<span style="color: #ff0000;">'t share the same /tmp/xcache<br />
; for win32, xcache.mmap_path=anonymous map name, not file path<br />
xcache.mmap_path = &nbsp; &nbsp;&quot;/dev/zero&quot;<br />
<br />
<br />
; leave it blank(disabled) or &quot;/tmp/phpcore/&quot;<br />
; make sure it'</span>s writable by php <span style="color: #7a0874; font-weight: bold;">&#40;</span>without checking open_basedir<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
xcache.coredump_directory = &nbsp; <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
; per request settings<br />
xcache.cacher = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; On<br />
xcache.stat &nbsp; = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; On<br />
xcache.optimizer = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Off<br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>xcache.coverager<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
; per request settings<br />
; <span style="color: #7a0874; font-weight: bold;">enable</span> coverage data collecting <span style="color: #000000; font-weight: bold;">for</span> xcache.coveragedump_directory and xcache_coverager_start<span style="color: #000000; font-weight: bold;">/</span>stop<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>clean<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> functions <span style="color: #7a0874; font-weight: bold;">&#40;</span>will hurt executing performance<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
xcache.coverager = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Off<br />
<br />
; ini only settings<br />
; <span style="color: #c20cb9; font-weight: bold;">make</span> sure it<span style="color: #ff0000;">'s readable (care open_basedir) by coverage viewer script<br />
; requires xcache.coverager=On<br />
xcache.coveragedump_directory = &quot;&quot;<br />
<br />
[Zend]<br />
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so<br />
zend_extension_ts = /usr/local/ioncube/ioncube_loader_lin_5.2_ts.so<br />
<br />
zend_optimizer.optimization_level=15<br />
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3<br />
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3<br />
<br />
zend_optimizer.version=3.3.3<br />
<br />
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so<br />
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so</span></div></div>
<p>Учтите что eAccelerator не живёт вместе с xСache.</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.su/ustanavlivaem-xcache-s-php-526-na-centos.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

