<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://178.140.10.58:8080/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://178.140.10.58:8080/feed.php">
        <title>Библиотека знаний - debian</title>
        <description>Заметки IT программиста</description>
        <link>http://178.140.10.58:8080/</link>
        <image rdf:resource="http://178.140.10.58:8080/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-17T08:13:00+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:backup"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:jessie"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:locale"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:mount-ntfs"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:remove-systemd"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:repaire"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:restoration-rights"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:restore-rights"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:server-install-d7"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:server-install-d8"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:server-install-d9"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:server-install-d10"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:server-install.sh"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:server-install"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:squeeze"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:start"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:stretch"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:update-alternatives"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:usb-flash"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:wheezy"/>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=debian:xfce"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://178.140.10.58:8080/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Библиотека знаний</title>
        <link>http://178.140.10.58:8080/</link>
        <url>http://178.140.10.58:8080/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:backup">
        <dc:format>text/html</dc:format>
        <dc:date>2016-01-25T09:48:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Бэкап MBR</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:backup</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:backup&amp;amp;do=showtag&amp;amp;tag=backup&quot; class=&quot;wikilink1&quot; title=&quot;tag:backup&quot; rel=&quot;tag&quot;&gt;backup&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;бэкап_mbr&quot;&gt;Бэкап MBR&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0411\u044d\u043a\u0430\u043f MBR&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0431\u044d\u043a\u0430\u043f_mbr&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;17-46&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;бэкап_mbr_таблица_разделов&quot;&gt;Бэкап MBR + таблица разделов&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;dd if=/dev/sda of=/backup/boot.mbr bs=512 count=1&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0411\u044d\u043a\u0430\u043f MBR + \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0431\u044d\u043a\u0430\u043f_mbr_\u0442\u0430\u0431\u043b\u0438\u0446\u0430_\u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;47-161&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;бэкап_файловой_системы_с_помощью_rsync&quot;&gt;Бэкап файловой системы с помощью rsync&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=system:%D0%B1%D1%8D%D0%BA%D0%B0%D0%BF_%D1%81_%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E_rsync_%D0%BD%D0%B0_debian&quot; class=&quot;wikilink1&quot; title=&quot;system:бэкап_с_помощью_rsync_на_debian&quot; data-wiki-id=&quot;system:бэкап_с_помощью_rsync_на_debian&quot;&gt;Бэкап с помощью rsync на Debian&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Подробне о &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=system:rsync&quot; class=&quot;wikilink1&quot; title=&quot;system:rsync&quot; data-wiki-id=&quot;system:rsync&quot;&gt;rsync&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0411\u044d\u043a\u0430\u043f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e rsync&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0431\u044d\u043a\u0430\u043f_\u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439_\u0441\u0438\u0441\u0442\u0435\u043c\u044b_\u0441_\u043f\u043e\u043c\u043e\u0449\u044c\u044e_rsync&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;162-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:jessie">
        <dc:format>text/html</dc:format>
        <dc:date>2016-02-16T14:29:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Jessie</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:jessie</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:repository&amp;amp;do=showtag&amp;amp;tag=repository&quot; class=&quot;wikilink1&quot; title=&quot;tag:repository&quot; rel=&quot;tag&quot;&gt;repository&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;jessie&quot;&gt;Jessie&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;deb http://ftp.pl.debian.org/debian jessie main contrib
deb-src http://ftp.pl.debian.org/debian jessie main contrib

deb http://ftp.debian.org/debian/  jessie-updates main contrib
deb-src http://ftp.debian.org/debian/  jessie-updates main contrib

deb http://security.debian.org/  jessie/updates main contrib
deb-src http://security.debian.org/  jessie/updates main contrib&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Jessie&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;jessie&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;27-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:locale">
        <dc:format>text/html</dc:format>
        <dc:date>2018-10-16T10:35:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Locale</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:locale</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;locale&quot;&gt;Locale&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
nano /etc/default/locale 
&lt;/p&gt;
&lt;pre class=&quot;code code&quot;&gt;LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LC_TYPE=en_US.UTF-8&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Locale&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;locale&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-145&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;установка_локализации&quot;&gt;Установка локализации&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 locale-gen en_US.UTF-8 (Предварительно поправить файл sudo nano /etc/default/locale)
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
или
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;strong&gt;dpkg-reconfigure locales&lt;/strong&gt; 
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430_\u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;146-361&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;вывод_списка_установленных_локалей&quot;&gt;Вывод списка установленных локалей&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 locale -a
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u043b\u0435\u0439&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u044b\u0432\u043e\u0434_\u0441\u043f\u0438\u0441\u043a\u0430_\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445_\u043b\u043e\u043a\u0430\u043b\u0435\u0439&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;362-455&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;проверка&quot;&gt;Проверка&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 locale
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;456-497&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit5&quot; id=&quot;ошибки&quot;&gt;Ошибки&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041e\u0448\u0438\u0431\u043a\u0438&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043e\u0448\u0438\u0431\u043a\u0438&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;498-523&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit6&quot; id=&quot;section1&quot;&gt;1&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Проблема
&lt;/div&gt;&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;pre class=&quot;code&quot;&gt;locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory&lt;/pre&gt;

&lt;p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Исправление
&lt;/div&gt;&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;strong&gt;dpkg-reconfigure locales&lt;/strong&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 localedef ru_RU.UTF-8 -i ru_RU -f UTF-8
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 localedef -i ru_RU -c -f UTF-8 ru_RU.UTF-8
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-locale LANG=ru_RU.UTF-8 LC_MESSAGES=POSIX
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Выходим из сессии
&lt;/p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;section1&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;524-1051&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit7&quot; id=&quot;section2&quot;&gt;2&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Проблема
&lt;/div&gt;&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;pre class=&quot;code&quot;&gt;locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: ?????????? ?????????? LC_ALL ? ?????? ?? ?????????.: ??? ?????? ????? ??? ????????&lt;/pre&gt;

&lt;p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Исправление
&lt;/div&gt;&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;strong&gt;dpkg-reconfigure locales&lt;/strong&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Выходим из сессии
&lt;/p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;section2&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;1052-1372&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit8&quot; id=&quot;section3&quot;&gt;3&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Проблема
&lt;/div&gt;&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;pre class=&quot;code&quot;&gt;perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = &amp;quot;UTF-8&amp;quot;,
	LANG = &amp;quot;en_US.UTF-8&amp;quot;
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale (&amp;quot;en_US.UTF-8&amp;quot;).&lt;/pre&gt;

&lt;p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Исправление
&lt;/div&gt;&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 sudo nano /etc/default/locale
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;re2&quot;&gt;LANGUAGE&lt;/span&gt;=en_US.UTF-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;LC_ALL&lt;/span&gt;=en_US.UTF-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;LANG&lt;/span&gt;=en_US.UTF-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;LC_TYPE&lt;/span&gt;=en_US.UTF-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 locale-gen en_US.UTF-8
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Выходим из сессии
&lt;/p&gt;

&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;3&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;section3&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;1373-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:mount-ntfs">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-25T01:13:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Установка поддержки NTFS</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:mount-ntfs</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:mount&amp;amp;do=showtag&amp;amp;tag=mount&quot; class=&quot;wikilink1&quot; title=&quot;tag:mount&quot; rel=&quot;tag&quot;&gt;mount&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;установка_поддержки_ntfs&quot;&gt;Установка поддержки NTFS&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 NTFS&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430_\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438_ntfs&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;16-73&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;чтение&quot;&gt;Чтение&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 mount -t ntfs /dev/sdb1 /mnt/ntfs 
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
  or
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 mount -t vfat /dev/sdb1 /mnt/ntfs
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0427\u0442\u0435\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0447\u0442\u0435\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;74-182&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;чтение_запись&quot;&gt;Чтение/Запись&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 apt-get install fuse ntfs-3g
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 mount -t ntfs-3g /dev/sdc1 /mnt/disk2
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0427\u0442\u0435\u043d\u0438\u0435\/\u0417\u0430\u043f\u0438\u0441\u044c&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0447\u0442\u0435\u043d\u0438\u0435_\u0437\u0430\u043f\u0438\u0441\u044c&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;183-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:remove-systemd">
        <dc:format>text/html</dc:format>
        <dc:date>2019-12-09T20:13:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Удаление Systemd из Debian 8</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:remove-systemd</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:debian&amp;amp;do=showtag&amp;amp;tag=debian&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:debian&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; debian&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:remove&amp;amp;do=showtag&amp;amp;tag=remove&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:remove&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; remove&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:systemd&amp;amp;do=showtag&amp;amp;tag=systemd&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:systemd&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; systemd&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:sysv&amp;amp;do=showtag&amp;amp;tag=sysv&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:sysv&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; sysv&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:system&amp;amp;do=showtag&amp;amp;tag=system&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:system&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; system&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:init&amp;amp;do=showtag&amp;amp;tag=init&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:init&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; init&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;удаление_systemd_из_debian_8&quot;&gt;Удаление Systemd из Debian 8&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 Systemd \u0438\u0437 Debian 8&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435_systemd_\u0438\u0437_debian_8&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;49-102&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;устанавливаем_sysv_init&quot;&gt;Устанавливаем SysV init&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;$ apt-get install sysvinit-core sysvinit-utils
$ cp /usr/share/sysvinit/inittab /etc/inittab&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c SysV init&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c_sysv_init&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;103-261&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;удаление_systemd&quot;&gt;Удаление Systemd&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;$ apt-get remove --purge --auto-remove systemd
$ echo -e &amp;#039;Package: systemd\nPin: release *\nPin-Priority: -1&amp;#039; &amp;gt; /etc/apt/preferences.d/systemd
$ echo -e &amp;#039;\n\nPackage: *systemd*\nPin: release *\nPin-Priority: -1&amp;#039; &amp;gt;&amp;gt; /etc/apt/preferences.d/systemd
$ echo -e &amp;#039;\nPackage: systemd:amd64\nPin: release *\nPin-Priority: -1&amp;#039; &amp;gt;&amp;gt; /etc/apt/preferences.d/systemd
$ echo -e &amp;#039;\nPackage: systemd:i386\nPin: release *\nPin-Priority: -1&amp;#039; &amp;gt;&amp;gt; /etc/apt/preferences.d/systemd&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 Systemd&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435_systemd&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;262-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:repaire">
        <dc:format>text/html</dc:format>
        <dc:date>2019-08-31T16:40:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Обновление системы</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:repaire</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:os&amp;amp;do=showtag&amp;amp;tag=os&quot; class=&quot;wikilink1&quot; title=&quot;tag:os&quot; rel=&quot;tag&quot;&gt;os&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;обновление_системы&quot;&gt;Обновление системы&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 apt-get dist-upgrade
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=debian:update-alternatives&quot; class=&quot;wikilink1&quot; title=&quot;debian:update-alternatives&quot; data-wiki-id=&quot;debian:update-alternatives&quot;&gt;update-alternatives&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_\u0441\u0438\u0441\u0442\u0435\u043c\u044b&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;19-142&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit2&quot; id=&quot;восстановление_пакетов&quot;&gt;Восстановление пакетов&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=debian:repaire:packages&quot; class=&quot;wikilink1&quot; title=&quot;debian:repaire:packages&quot; data-wiki-id=&quot;debian:repaire:packages&quot;&gt;Восстановление пакетов&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_\u043f\u0430\u043a\u0435\u0442\u043e\u0432&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;143-278&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit3&quot; id=&quot;восстановление_boot_раздела&quot;&gt;Восстановление boot раздела&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-grub2
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 grub-mkconfig
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 grub-install [устройство]
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 boot \u0440\u0430\u0437\u0434\u0435\u043b\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_boot_\u0440\u0430\u0437\u0434\u0435\u043b\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;279-418&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit4&quot; id=&quot;восстановление_ядра_linux-image&quot;&gt;Восстановление ядра linux-image&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 cd /var/cache/apt/archives
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 dpkg -i linux-image-3.10-1-amd64_3.10.1-1_amd64.deb
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u044f\u0434\u0440\u0430 linux-image&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_\u044f\u0434\u0440\u0430_linux-image&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;419-571&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit5&quot; id=&quot;восстановление_grub2&quot;&gt;Восстановление grub2&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 cd /var/cache/apt/archives
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 dpkg -i grub2-common_2.00-15_amd64.deb grub-pc_2.00-15_amd64.deb grub-pc-bin_2.00-15_amd64.deb
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 grub2&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_grub2&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;572-752&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit6&quot; id=&quot;восстановление_initrdimg&quot;&gt;Восстановление initrd.img&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-initramfs -c -k &amp;#039;3.10-1-amd64&amp;#039;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 initrd.img&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_initrdimg&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;753-850&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit7&quot; id=&quot;бекап_системы&quot;&gt;Бекап системы&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=debian:backup&quot; class=&quot;wikilink1&quot; title=&quot;debian:backup&quot; data-wiki-id=&quot;debian:backup&quot;&gt;Бекап системы&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0411\u0435\u043a\u0430\u043f \u0441\u0438\u0441\u0442\u0435\u043c\u044b&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0431\u0435\u043a\u0430\u043f_\u0441\u0438\u0441\u0442\u0435\u043c\u044b&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;851-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:restoration-rights">
        <dc:format>text/html</dc:format>
        <dc:date>2019-08-31T16:39:54+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Восстановление прав</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:restoration-rights</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:os&amp;amp;do=showtag&amp;amp;tag=os&quot; class=&quot;wikilink1&quot; title=&quot;tag:os&quot; rel=&quot;tag&quot;&gt;os&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;восстановление_прав&quot;&gt;Восстановление прав&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown root:staff -R /var/local
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown www-data:www-data -R /var/www
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown root:mail -R /var/mail
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown -R man /var/cache/man
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 apt-get –reinstall install `dpkg -S /bin/chmod | cut -f1 -d:`
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_\u043f\u0440\u0430\u0432&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;19-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:restore-rights">
        <dc:format>text/html</dc:format>
        <dc:date>2017-10-30T18:07:24+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Восстановление прав для файлов и директорий</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:restore-rights</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:rights&amp;amp;do=showtag&amp;amp;tag=rights&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:rights&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; rights&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;восстановление_прав_для_файлов_и_директорий&quot;&gt;Восстановление прав для файлов и директорий&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown root:staff -R /var/local
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown www-data:www-data -R /var/www
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown root:mail -R /var/mail
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 chown -R man /var/cache/man
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 apt-get –reinstall install `dpkg -S /bin/chmod | cut -f1 -d:`
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
&lt;a href=&quot;http://www.slideshare.net/cog/chmod-x-chmod&quot; class=&quot;urlextern&quot; title=&quot;http://www.slideshare.net/cog/chmod-x-chmod&quot; rel=&quot;ugc nofollow&quot;&gt;http://www.slideshare.net/cog/chmod-x-chmod&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435_\u043f\u0440\u0430\u0432_\u0434\u043b\u044f_\u0444\u0430\u0439\u043b\u043e\u0432_\u0438_\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;23-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:server-install-d7">
        <dc:format>text/html</dc:format>
        <dc:date>2015-10-26T00:30:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Скрипт инсталляции для Debian 7</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:server-install-d7</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:script&amp;amp;do=showtag&amp;amp;tag=script&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:script&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; script&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:install&amp;amp;do=showtag&amp;amp;tag=install&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:install&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; install&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;скрипт_инсталляции_для_debian_7&quot;&gt;Скрипт инсталляции для Debian 7&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;div class=&quot;plugin_note notetip&quot;&gt;&lt;pre class=&quot;code sh&quot;&gt;# nano debian-install.sh
# bash ./debian-install.sh&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;
В debian-install.sh вставляем ниже следующий текст и нащимаем Ctrl-x, затем y (сохраняем и выходим)
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Automatic installation servers apps ##&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;distrib&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;wheezy&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
deb http://ftp.pl.debian.org/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main contrib
deb-src http://ftp.pl.debian.org/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main contrib
&amp;nbsp;
deb http://ftp.debian.org/debian/  &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt;-updates main contrib
deb-src http://ftp.debian.org/debian/  &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt;-updates main contrib
&amp;nbsp;
deb http://security.debian.org/  &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt;/updates main contrib
deb-src http://security.debian.org/  &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt;/updates main contrib
&amp;nbsp;
# erlyvideo.org
#deb http://debian.erlyvideo.org binary/
&amp;nbsp;
# php-fpm dotdeb
deb http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
deb-src http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
&amp;nbsp;
# nginx
deb http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
deb-src http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.dotdeb.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dotdeb.gpg &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;nginx.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;keys&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx_signing.key &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Update OS ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-get upgrade&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install my app list ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; apt apt-utils chkconfig mc &lt;span class=&quot;kw2&quot;&gt;htop&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; mercurial checkinstall iptraf jnettop iftop &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;nano&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install PHP-FPM ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php5 php5-dev php5-sqlite php5-mcrypt php5-xsl php5-cli php5-common php5-mysql php5-gd php5-fpm \
        php5-cgi php-pear php5-apc php5-memcached php5-memcache php5-curl &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;cgi.fix_pathinfo = 0&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php5&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fpm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php.ini
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install Nginx ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; nginx &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install MySQL ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; mysql-server mysql-client mysql-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
chkconfig &lt;span class=&quot;re5&quot;&gt;--levels&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;235&lt;/span&gt; mysql on
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install Memcqached ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; libmysqlclient18 memcached &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Configure Multiple instances of memcached server ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;#! /bin/bash
### BEGIN INIT INFO
# Provides:     memcached
# Required-Start:       $remote_fs $syslog
# Required-Stop:        $remote_fs $syslog
# Should-Start:         $local_fs
# Should-Stop:          $local_fs
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Start memcached daemon
# Description:          Start up memcached, a high-performance memory caching daemon
### END INIT INFO
&amp;nbsp;
&amp;nbsp;
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/memcached
DAEMONNAME=memcached
DAEMONBOOTSTRAP=/usr/share/memcached/scripts/start-memcached
DESC=memcached
&amp;nbsp;
test -x $DAEMON || exit 0
test -x $DAEMONBOOTSTRAP || exit 0
&amp;nbsp;
set -e
&amp;nbsp;
. /lib/lsb/init-functions
&amp;nbsp;
# Edit /etc/default/memcached to change this.
ENABLE_MEMCACHED=no
test -r /etc/default/memcached &amp;amp;&amp;amp; . /etc/default/memcached
&amp;nbsp;
FILES=(/etc/memcached_*.conf);
# check for alternative config schema
if [ -r &amp;quot;${FILES[0]}&amp;quot; ]; then
    CONFIGS=();
    for FILE in &amp;quot;${FILES[@]}&amp;quot;;
    do
        # remove prefix and sufix
        NAME=$(basename &amp;quot;${FILE}&amp;quot; .conf);
&amp;nbsp;
        # check optional second param
        if [ $# -ne 2 ];
        then
            # add to config array
            CONFIGS+=($NAME);
        elif [ &amp;quot;memcached_$2&amp;quot; == &amp;quot;$NAME&amp;quot; ];
        then
            # use only one memcached
            CONFIGS=($NAME);
            break;
        fi;
    done;
&amp;nbsp;
    if [ ${#CONFIGS[@]} == 0 ];
    then
        echo &amp;quot;Config not exist for: $2&amp;quot; &amp;gt;&amp;amp;2;
        exit 1;
    fi;
else
    CONFIGS=(memcached);
fi;
&amp;nbsp;
CONFIG_NUM=${#CONFIGS[@]};
for ((i=0; i &amp;lt; $CONFIG_NUM; i++)); do
    NAME=${CONFIGS[${i}]};
    PIDFILE=&amp;quot;/var/run/${NAME}.pid&amp;quot;;
    case &amp;quot;$1&amp;quot; in
        start)
            echo -n &amp;quot;Starting $DESC: &amp;quot;
            if [ $ENABLE_MEMCACHED = yes ]; then
                start-stop-daemon --start --quiet --exec &amp;quot;$DAEMONBOOTSTRAP&amp;quot; -- /etc/${NAME}.conf $PIDFILE
                echo &amp;quot;$NAME.&amp;quot;
            else
                echo &amp;quot;$NAME disabled in /etc/default/memcached.&amp;quot;
            fi
            ;;
        stop)
            echo -n &amp;quot;Stopping $DESC: &amp;quot;
            start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
            echo &amp;quot;$NAME.&amp;quot;
            rm -f $PIDFILE
            ;;
&amp;nbsp;
        restart|force-reload)
        #
        #       If the &amp;quot;reload&amp;quot; option is implemented, move the &amp;quot;force-reload&amp;quot;
        #       option to the &amp;quot;reload&amp;quot; entry above. If not, &amp;quot;force-reload&amp;quot; is
        #       just the same as &amp;quot;restart&amp;quot;.
        #
            echo -n &amp;quot;Restarting $DESC: &amp;quot;
            start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
            rm -f $PIDFILE
            sleep 1
            start-stop-daemon --start --quiet --exec &amp;quot;$DAEMONBOOTSTRAP&amp;quot; -- /etc/${NAME}.conf $PIDFILE
            echo &amp;quot;$NAME.&amp;quot;
            ;;
        status)
            status_of_proc $DAEMON $NAME
            ;;
        *)
            N=/etc/init.d/$DAEMONNAME
            echo &amp;quot;Usage: $N {start|stop|restart|force-reload|status}&amp;quot; &amp;gt;&amp;amp;2
            exit 1
            ;;
    esac
done;
&amp;nbsp;
exit 0
&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;init.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;memcached
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;#!/usr/bin/perl -w
&amp;nbsp;
# start-memcached
# 2003/2004 - Jay Bonci &amp;lt;jaybonci@debian.org&amp;gt;
# This script handles the parsing of the /etc/memcached.conf file
# and was originally created for the Debian distribution.
# Anyone may use this little script under the same terms as
# memcached itself.
&amp;nbsp;
use strict;
&amp;nbsp;
if($&amp;gt; != 0 and $&amp;lt; != 0)
{
    print STDERR &amp;quot;Only root wants to run start-memcached.\n&amp;quot;;
    exit;
}
&amp;nbsp;
my $params; my $etchandle; my $etcfile = &amp;quot;/etc/memcached.conf&amp;quot;;
&amp;nbsp;
# This script assumes that memcached is located at /usr/bin/memcached, and
# that the pidfile is writable at /var/run/memcached.pid
&amp;nbsp;
my $memcached = &amp;quot;/usr/bin/memcached&amp;quot;;
my $pidfile = &amp;quot;/var/run/memcached.pid&amp;quot;;
&amp;nbsp;
if (scalar(@ARGV) == 2) {
    $etcfile = shift(@ARGV);
    $pidfile = shift(@ARGV);
}
&amp;nbsp;
# If we don&#039;&lt;/span&gt;t get a valid logfile parameter &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; the &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;memcached.conf &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;,
&lt;span class=&quot;co0&quot;&gt;# we&#039;ll just throw away all of our in-daemon output. We need to re-tie it so&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# that non-bash shells will not hang on logout. Thanks to Michael Renner for&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# the tip&lt;/span&gt;
my &lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;/dev/null&amp;quot;&lt;/span&gt;;
&amp;nbsp;
sub handle_logfile
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    my &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;_;
    &lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
sub reopen_logfile
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    my &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;_;
&amp;nbsp;
    open &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;STDERR, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;&lt;span class=&quot;es2&quot;&gt;$logfile&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    open &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;STDOUT, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;&lt;span class=&quot;es2&quot;&gt;$logfile&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    open &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;STDIN, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;/dev/null&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# This is set up in place here to support other non -[a-z] directives&lt;/span&gt;
&amp;nbsp;
my &lt;span class=&quot;re1&quot;&gt;$conf_directives&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;logfile&amp;quot;&lt;/span&gt; =&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; \&lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt;handle_logfile,
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;open &lt;span class=&quot;re1&quot;&gt;$etchandle&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;$etcfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    foreach my &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$etchandle&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt;= &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ s&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;\&lt;span class=&quot;co0&quot;&gt;#.*//g;&lt;/span&gt;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ s&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;\s+$&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;g;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ s&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^\s+&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;g;
        next unless &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt;;
        next &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^\-&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;dh&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;^\-&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            my &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$directive&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;?&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;\s+&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;;
            &lt;span class=&quot;re1&quot;&gt;$conf_directives&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$directive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
            next;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        push &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
push &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;-u root&amp;quot;&lt;/span&gt; unless&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;-u&amp;quot;&lt;/span&gt;, &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;join&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;, &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-e &lt;span class=&quot;re1&quot;&gt;$pidfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    open PIDHANDLE, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$pidfile&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    my &lt;span class=&quot;re1&quot;&gt;$localpid&lt;/span&gt; = &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;PIDHANDLE&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;;
    close PIDHANDLE;
&amp;nbsp;
    chomp &lt;span class=&quot;re1&quot;&gt;$localpid&lt;/span&gt;;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-d &lt;span class=&quot;st0&quot;&gt;&amp;quot;/proc/&lt;span class=&quot;es2&quot;&gt;$localpid&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        print STDERR &lt;span class=&quot;st0&quot;&gt;&amp;quot;memcached is already running.&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;;
        &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$localpid&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
my &lt;span class=&quot;re1&quot;&gt;$pid&lt;/span&gt; = fork&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$pid&lt;/span&gt; == &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    reopen_logfile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span class=&quot;kw3&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$memcached&lt;/span&gt; &lt;span class=&quot;es2&quot;&gt;$params&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;open PIDHANDLE,&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&lt;span class=&quot;es2&quot;&gt;$pidfile&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        print PIDHANDLE &lt;span class=&quot;re1&quot;&gt;$pid&lt;/span&gt;;
        close PIDHANDLE;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
        print STDERR &lt;span class=&quot;st0&quot;&gt;&amp;quot;Can&#039;t write pidfile to &lt;span class=&quot;es2&quot;&gt;$pidfile&lt;/span&gt;.&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;st_h&quot;&gt;&#039; &amp;gt; /usr/share/memcached/scripts/start-memcached
&amp;nbsp;
echo -e &amp;quot;## Install development soft ##&amp;quot;
apt-get install gcc build-essential g++ libboost-dev libboost-program-options-dev libboost-all-dev libevent-dev uuid-dev -y
&amp;nbsp;
service php5-fpm restart
&amp;nbsp;
echo -e &amp;quot;## Install DNS Server ##&amp;quot;
# apt-get install bind9 bind9utils bind9-libs -y
apt-get install pdns-server pdns-backend-mysql pdns-recursor -y
&amp;nbsp;
echo -e &amp;quot;## Install SMTP Server ##&amp;quot;
apt-get install exim4
dpkg-reconfigure exim4-config
&amp;nbsp;
echo -e  &amp;quot;## Start APPs ##&amp;quot;
service nginx restart
service php5-fpm restart
service mysql restart
service memcached restart
&amp;nbsp;
#echo &amp;quot; *Clearing downloaded packages after install!*&amp;quot;
#rm /var/cache/apt/archives/*.deb -f
&amp;nbsp;
echo -e &amp;quot;## Base system configure ##&amp;quot;
echo &#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# My config&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;nano&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;nano -u -w &amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;ls&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;ls --color=always&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;grep&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;grep --color=auto&#039;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;fgrep&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;fgrep --color=auto&#039;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;egrep&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;egrep --color=auto&#039;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;HISTSIZE&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;50000&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;HISTFILESIZE&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;50000&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;HISTCONTROL&lt;/span&gt;=ignoreboth
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; cmdhist
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; histappend
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; checkwinsize
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; extglob
&lt;span class=&quot;kw3&quot;&gt;ulimit&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Functions&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Функции работы с историей комманд&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; h&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;history&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Функции для работы с файлами и строками:&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# Поиск файла по шаблону:&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; ff&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; . &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;re5&quot;&gt;-iname&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;re4&quot;&gt;$*&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-ls&lt;/span&gt; ; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Поиск файла по шаблону в $1 и запуск команды в $2 с ним:&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; fe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; . &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;re5&quot;&gt;-iname&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-exec&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${2:-file}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; \;  ; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# поиск строки по файлам:&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; fstr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;OPTIND&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;case&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;usage&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;fstr: поиск строки в файлах.
        Порядок использования: fstr [-i] &lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;шаблон&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt; [&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;шаблон_имени_файла&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;] &amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;getopts&lt;/span&gt; :it opt
    &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$opt&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;
        i&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;case&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;-i &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$usage&lt;/span&gt;&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$OPTIND&lt;/span&gt; - &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$#&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-lt&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$usage&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt;;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;SMSO&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;tput smso&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;RMSO&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;tput rmso&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; . &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;re5&quot;&gt;-name&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${2:-*}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-print0&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;xargs&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-0&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-sn&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${case}&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;- &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; \
        &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/$1/&lt;span class=&quot;es3&quot;&gt;${SMSO}&lt;/span&gt;\0&lt;span class=&quot;es3&quot;&gt;${RMSO}&lt;/span&gt;/gI&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;more&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;st_h&quot;&gt;&#039; &amp;gt;&amp;gt; ~/.bashrc
source ~/.bashrc
&amp;nbsp;
echo &#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;set&lt;/span&gt; tabsize &lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;
&lt;span class=&quot;st_h&quot;&gt;&#039; &amp;gt;&amp;gt; ~/.nanorc&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u0434\u043b\u044f Debian 7&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043a\u0440\u0438\u043f\u0442_\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438_\u0434\u043b\u044f_debian_7&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;31-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:server-install-d8">
        <dc:format>text/html</dc:format>
        <dc:date>2018-06-17T20:33:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Скрипт установки для Debian 8</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:server-install-d8</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:script&amp;amp;do=showtag&amp;amp;tag=script&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:script&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; script&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:install&amp;amp;do=showtag&amp;amp;tag=install&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:install&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; install&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;скрипт_установки_для_debian_8&quot;&gt;Скрипт установки для Debian 8&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co4&quot;&gt;$ &lt;/span&gt;apt &lt;span class=&quot;kw2&quot;&gt;install&lt;/span&gt; php5-cgi php5-cli php5-common php5-curl php5-dev php5-fpm php5-gd php5-intl php5-json php5-mcrypt php5-memcache php5-memcached php5-mongo php5-mysql php5-readline php5-redis php5-sqlite php5-xsl php5-geoip php5-ssh2&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=develop:php:php&quot; class=&quot;wikilink1&quot; title=&quot;develop:php:php&quot; data-wiki-id=&quot;develop:php:php&quot;&gt;Установка различных версий PHP&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043b\u044f Debian 8&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043a\u0440\u0438\u043f\u0442_\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438_\u0434\u043b\u044f_debian_8&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;31-423&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;описание&quot;&gt;Описание&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическая установка и обновление зависимых пакетов
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическая устанока и настройка серверов GIT, PHP 5.6, PHP-FPM, Nginx, Redis, MySQL (mariadb), RabbitMQ, Exim4
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическое конфигурирование пакетов
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Установка автоматического бекапа БД MySQL (&lt;a href=&quot;https://github.com/Mirocow/mysql_utils.git&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/Mirocow/mysql_utils.git&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/Mirocow/mysql_utils.git&lt;/a&gt;)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Устанока скрипта для создания сайта (&lt;a href=&quot;https://github.com/Mirocow/site-create&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/Mirocow/site-create&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/Mirocow/site-create&lt;/a&gt;)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=system:exim4&quot; class=&quot;wikilink1&quot; title=&quot;system:exim4&quot; data-wiki-id=&quot;system:exim4&quot;&gt;Exim4 Smtp Server / Установка и настройка&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;424-1060&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;установка&quot;&gt;Установка&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;div class=&quot;plugin_note notetip&quot;&gt;&lt;pre class=&quot;code sh&quot;&gt;# nano debian-install.sh
# bash ./debian-install.sh&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;
В debian-install.sh вставляем ниже следующий текст и нащимаем Ctrl-x, затем y (сохраняем и выходим)
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;distrib&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;jessie&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;hostname&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;default_pass&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
check_result&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Error: $2&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
promptyn &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
	    &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; yn
	    &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$yn&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;
	        &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;Yy&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
	        &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;Nn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
	        &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please answer yes or no.&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
	    &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
prompt &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; variable &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$variable&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
installpkg&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; pkg &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dpkg-query &lt;span class=&quot;re5&quot;&gt;-W&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;${Status}&#039;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$pkg&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ok installed&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;;
  &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install &lt;span class=&quot;es2&quot;&gt;$pkg&lt;/span&gt; ...&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$pkg&lt;/span&gt;;
  &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
set_default_value&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;variable&lt;/span&gt;=\&lt;span class=&quot;re4&quot;&gt;$$&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;yes&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;no&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;x&lt;span class=&quot;es4&quot;&gt;$(id -u)&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;x0&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    check_result &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Script can be run executed only by root&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-get upgrade&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
installpkg apt apt-utils &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; chkconfig &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;nano&lt;/span&gt; rename debconf-utils pwgen
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;default_pass&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pwgen &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;hostname&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Enter the Internet domain name (e.g. nixcraft.com) : &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install default programs? [mc, git, etc] &amp;quot;&lt;/span&gt; ; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install default programs&amp;quot;&lt;/span&gt;;
	installpkg mc &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; mercurial bash-completion &lt;span class=&quot;kw2&quot;&gt;bzip2&lt;/span&gt; numactl dnsutils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install developers programs? [gcc, g++, etc] &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install development soft&amp;quot;&lt;/span&gt;;
	installpkg checkinstall &lt;span class=&quot;kw2&quot;&gt;gcc&lt;/span&gt; build-essential &lt;span class=&quot;kw2&quot;&gt;g++&lt;/span&gt; libboost-dev libboost-program-options-dev libboost-all-dev libevent-dev uuid-dev clang cmake &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install system monitors? [htop, iptraf] &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install system monitors&amp;quot;&lt;/span&gt;;
	installpkg &lt;span class=&quot;kw2&quot;&gt;htop&lt;/span&gt; iptraf jnettop iftop &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to uninstall systemd and install systemv? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	installpkg sysvinit-core sysvinit-utils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;share&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sysvinit&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inittab &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inittab
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install FTP Server (PRO-Ftpd)? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
	installpkg proftpd
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;	 
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install MySql? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	installpkg software-properties-common
&amp;nbsp;
	&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install MySql (Percona) (y) or Mariadb (n)?&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xcbcb082a1bb943db
&amp;nbsp;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
		# Percona
		#deb http://repo.percona.com/apt &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; testing
		#deb-src http://repo.percona.com/apt &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; testing
		&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql.list
		&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
		installpkg percona-server-server-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-server-client-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-server-common-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-toolkit &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
		sevice mysql start
		check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;mysql start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
		mysqladmin &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; root password &lt;span class=&quot;re1&quot;&gt;$default_pass&lt;/span&gt;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;[client]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;password=&#039;&lt;span class=&quot;es2&quot;&gt;$f&lt;/span&gt;&#039;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
		&lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE User=&#039;&#039;&amp;quot;&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DROP DATABASE test&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.db WHERE Db=&#039;test&#039; OR Db=&#039;test\\_%&#039;&amp;quot;&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE user=&#039;&#039; or password=&#039;&#039;;&amp;quot;&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FLUSH PRIVILEGES&amp;quot;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySQL (Percona)&amp;quot;&lt;/span&gt;
		chkconfig mysql on
		set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;mysql&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
		&lt;span class=&quot;co0&quot;&gt;# for sid		&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xF1656F24C74CD1D8
		&lt;span class=&quot;co0&quot;&gt;# for jessie&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xcbcb082a1bb943db
&amp;nbsp;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
		# MariaDB 10.1 repository list - created 2016-08-05 19:23 UTC
		# http://downloads.mariadb.org/mariadb/repositories/
		deb [arch=amd64,i386] http://mirror.timeweb.ru/mariadb/repo/10.1/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main
		deb-src http://mirror.timeweb.ru/mariadb/repo/10.1/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main
		&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql.list
		&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
		installpkg mariadb-server mariadb-client mariadb-common mytop &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
		service mysql start
		check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;mysql start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
		mysqladmin &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; root password &lt;span class=&quot;re1&quot;&gt;$default_pass&lt;/span&gt;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;[client]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;password=&#039;&lt;span class=&quot;es2&quot;&gt;$default_pass&lt;/span&gt;&#039;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
		&lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE User=&#039;&#039;&amp;quot;&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DROP DATABASE test&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.db WHERE Db=&#039;test&#039; OR Db=&#039;test\\_%&#039;&amp;quot;&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE user=&#039;&#039; or password=&#039;&#039;;&amp;quot;&lt;/span&gt;
		mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FLUSH PRIVILEGES&amp;quot;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySQL (Mariadb)&amp;quot;&lt;/span&gt;
		chkconfig mysql on
		set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;mysql&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Nginx? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;nginx.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;keys&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx_signing.key &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
	# nginx
	deb http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
	deb-src http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
	&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx.list
	&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
	service nginx stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
	installpkg nginx &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	service nginx start
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;nginx start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install Nginx&amp;quot;&lt;/span&gt;
	chkconfig nginx on
	set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;nginx&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install PHP-FPM? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.dotdeb.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dotdeb.gpg &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
	&lt;span class=&quot;re2&quot;&gt;php_ver&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please select php version like 5, 6.0, 7.0, 7.1: &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
	# php-fpm dotdeb
	deb http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
	deb-src http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
	&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php-fpm.list
	&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
	service php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
	installpkg &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-dev&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-sqlite&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mcrypt&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xsl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cli&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-common&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mysql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-gd&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; \
	        php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cgi&lt;/span&gt; php-pear php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-curl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xcache&lt;/span&gt; php5-redis &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;cgi.fix_pathinfo = 0&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fpm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php.ini
	service php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; start
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;php&lt;span class=&quot;es3&quot;&gt;${php_ver}&lt;/span&gt;-fpm start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install PHP-FPM&amp;quot;&lt;/span&gt;
	chkconfig php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; on
	set_default_value &lt;span class=&quot;st0&quot;&gt;&amp;quot;php&lt;span class=&quot;es3&quot;&gt;${php_ver}&lt;/span&gt;-fpm&#039; &#039;true&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install RabbitMQ? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;packages.erlang-solutions.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;debian&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;erlang_solutions.asc &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
	&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.rabbitmq.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;rabbitmq-signing-key-public.asc &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
	# Erlang
	deb http://packages.erlang-solutions.com/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; contrib
&amp;nbsp;
	# RabbitMq
	deb http://www.rabbitmq.com/debian/ testing main
	&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;rabbitmq.list
	&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
	service rabbitmq-server start
	installpkg rabbitmq-server &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;rabbitmq-server start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install RabbitMQ&amp;quot;&lt;/span&gt;
	chkconfig rabbitmq-server on
	set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;rabbitmq-server&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Redis server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	installpkg redis-server &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	service redis-server start
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;redis-server start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install Redis&amp;quot;&lt;/span&gt;
	chkconfig redis-server on
	set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;redis-server&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;	 	
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install DNS server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install bind (y) or pdns (n) server?&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
		installpkg bind9 bind9utils bind9-libs &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
		service bind9 start
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install DNS Server&amp;quot;&lt;/span&gt;
		set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;bind&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
		installpkg pdns-server pdns-backend-mysql pdns-recursor &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
		&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install DNS Server&amp;quot;&lt;/span&gt;
		set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;pdns&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Shorewall? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	installpkg shorewall &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Postfix/Exim4? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	installpkg exim4-daemon-heavy mailutils postfix &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	service exim4 stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
	gpasswd &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt; Debian-exim mail
&amp;nbsp;
	&lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4.conf.template
	&lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dnsbl.conf
	&lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;spam-blocks.conf
	&lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;white-blocks.conf
	&lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4.conf.template
	&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;domains
	&lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;domains
&amp;nbsp;
	&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mta
	&lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sbin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4 &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mta
	service &lt;span class=&quot;kw2&quot;&gt;sendmail&lt;/span&gt; stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; 
	service postfix stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
	service exim4 start
&amp;nbsp;
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;exim4 start failed&amp;quot;&lt;/span&gt;
	chkconfig exim4 on
	set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;exim&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Dovecot? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	gpasswd &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt; dovecot mail
	&lt;span class=&quot;kw2&quot;&gt;chown&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; root:root &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dovecot&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;
	service dovecot stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
	installpkg dovecot-imapd dovecot-pop3d dovecot-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	service dovecot start
&amp;nbsp;
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;dovecot start failed&amp;quot;&lt;/span&gt;
  chkconfig dovecot on
	set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;dovecot&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install fail2ban? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	installpkg fail2ban &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$exim&lt;/span&gt;&amp;quot;&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;no&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
		&lt;span class=&quot;re2&quot;&gt;fline&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fail2ban&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jail.local &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n&lt;/span&gt; exim-iptables &lt;span class=&quot;re5&quot;&gt;-A&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span class=&quot;re2&quot;&gt;fline&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$fline&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; enabled &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cut&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; -&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${fline}&lt;/span&gt;s/true/false/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fail2ban&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jail.local
	&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
	chkconfig fail2ban on
	service fail2ban start
	check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;fail2ban start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Mysql backup system? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySql backup system&amp;quot;&lt;/span&gt;;
&amp;nbsp;
	&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
	installpkg &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;git clone&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;github.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Mirocow&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql_utils.git &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql_utils
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
&amp;nbsp;
	# Run MySql backup system
	25 6    * * * root /bin/bash  ~/mysql_utils/backup.sh --dir=&amp;quot;/var/backups/mysql&amp;quot; --compress=bzip2 --exclude=&amp;quot;mysql&amp;quot; --lifetime=&amp;quot;3 day ago&amp;quot;
	&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;crontab	
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install create site script? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install create site scriptm&amp;quot;&lt;/span&gt;;
	&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;raw.githubusercontent.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Mirocow&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;master&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create.sh &lt;span class=&quot;re5&quot;&gt;-O&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create.sh
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;cache&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;archives&lt;span class=&quot;sy0&quot;&gt;/*&lt;/span&gt;.deb &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to set default shell settings? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Base system configure&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
&amp;nbsp;
#
# My config
#
&amp;nbsp;
#search in history with arrows
bind &#039;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;\e[A&amp;quot;&lt;/span&gt;: history-search-backward&lt;span class=&quot;st_h&quot;&gt;&#039; 2&amp;gt;/dev/null
bind &#039;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;\e[B&amp;quot;&lt;/span&gt;: history-search-forward&lt;span class=&quot;st_h&quot;&gt;&#039; 2&amp;gt;/dev/null
&amp;nbsp;
alias nano=&amp;quot;nano -u -w &amp;quot;
alias ls=&amp;quot;ls --color=always&amp;quot;
alias grep=&#039;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--color&lt;/span&gt;=auto&lt;span class=&quot;st_h&quot;&gt;&#039;
alias fgrep=&#039;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;fgrep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--color&lt;/span&gt;=auto&lt;span class=&quot;st_h&quot;&gt;&#039;
alias egrep=&#039;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;egrep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--color&lt;/span&gt;=auto&lt;span class=&quot;st_h&quot;&gt;&#039;
HISTSIZE=50000
HISTFILESIZE=50000
export HISTCONTROL=ignoreboth
shopt -s cmdhist
shopt -s histappend
shopt -s checkwinsize
shopt -s extglob
ulimit -c 0
&amp;nbsp;
#
# Functions
#
&amp;nbsp;
#-----------------------------------
# Функции работы с историей комманд
#-----------------------------------
&amp;nbsp;
function h(){
  history| grep &amp;quot;$@&amp;quot;;
}
&amp;nbsp;
# Включение магии bash
if [ -f /etc/bash_completion ]; then
  . /etc/bash_completion
fi
&amp;nbsp;
&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.bashrc
&lt;span class=&quot;kw3&quot;&gt;source&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.bashrc
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
set tabsize &amp;quot;2&amp;quot;
&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.nanorc		
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get upgrade&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;apt-get autoremove&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1061-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:server-install-d9">
        <dc:format>text/html</dc:format>
        <dc:date>2018-06-17T20:33:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Скрипт установки для Debian 9</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:server-install-d9</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:script&amp;amp;do=showtag&amp;amp;tag=script&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:script&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; script&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:install&amp;amp;do=showtag&amp;amp;tag=install&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:install&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; install&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;скрипт_установки_для_debian_9&quot;&gt;Скрипт установки для Debian 9&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co4&quot;&gt;$ &lt;/span&gt;apt &lt;span class=&quot;kw2&quot;&gt;install&lt;/span&gt; php5-cgi php5-cli php5-common php5-curl php5-dev php5-fpm php5-gd php5-intl php5-json php5-mcrypt php5-memcache php5-memcached php5-mongo php5-mysql php5-readline php5-redis php5-sqlite php5-xsl php5-geoip php5-ssh2&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=develop:php:php&quot; class=&quot;wikilink1&quot; title=&quot;develop:php:php&quot; data-wiki-id=&quot;develop:php:php&quot;&gt;Установка различных версий PHP&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043b\u044f Debian 9&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043a\u0440\u0438\u043f\u0442_\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438_\u0434\u043b\u044f_debian_9&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;31-424&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;описание&quot;&gt;Описание&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическая установка и обновление зависимых пакетов
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическая устанока и настройка серверов GIT, PHP 5.6, PHP-FPM, Nginx, Redis, MySQL (mariadb), RabbitMQ, Exim4
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическое конфигурирование пакетов
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Установка автоматического бекапа БД MySQL (&lt;a href=&quot;https://github.com/Mirocow/mysql_utils.git&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/Mirocow/mysql_utils.git&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/Mirocow/mysql_utils.git&lt;/a&gt;)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Устанока скрипта для создания сайта (&lt;a href=&quot;https://github.com/Mirocow/site-create&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/Mirocow/site-create&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/Mirocow/site-create&lt;/a&gt;)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=system:exim4&quot; class=&quot;wikilink1&quot; title=&quot;system:exim4&quot; data-wiki-id=&quot;system:exim4&quot;&gt;Exim4 Smtp Server / Установка и настройка&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;425-1061&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;установка&quot;&gt;Установка&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;div class=&quot;plugin_note notetip&quot;&gt;&lt;pre class=&quot;code sh&quot;&gt;# nano debian-install.sh
# bash ./debian-install.sh&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;
В debian-install.sh вставляем ниже следующий текст и нащимаем Ctrl-x, затем y (сохраняем и выходим)
&lt;/p&gt;
&lt;div class=&quot;plugin_note noteimportant&quot;&gt;Для Debian 9, чтоб работал php5, необходимо добавить в /etc/apt/sources.list &lt;br/&gt;

&lt;pre class=&quot;code&quot;&gt;deb http://ftp.debian.org/debian jessie main contrib
deb-src http://ftp.debian.org/debian jessie main contrib

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib&lt;/pre&gt;

&lt;/div&gt;&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;distrib&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;stretch&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; info 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;--&amp;gt; $1&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; check_result&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Error: $2&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; promptyn &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; yn
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$yn&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;Yy&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;Nn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please answer yes or no.&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; prompt &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; variable &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$variable&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; installpkg&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; pkg &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dpkg-query &lt;span class=&quot;re5&quot;&gt;-W&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;${Status}&#039;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$pkg&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ok installed&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;;
  &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install &lt;span class=&quot;es2&quot;&gt;$pkg&lt;/span&gt; ...&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$pkg&lt;/span&gt;;
  &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; set_default_value&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;variable&lt;/span&gt;=\&lt;span class=&quot;re4&quot;&gt;$$&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;yes&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;no&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; h&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;history&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; install_elasticsearch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;VERSION&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;es_memory&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;1024m&#039;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; openjdk-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;-jdk
    &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;java-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;-openjdk-amd64&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jre&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;JAVA_HOME&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;java-&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;-openjdk-amd64
    &lt;span class=&quot;kw3&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$JAVA_HOME&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin:&lt;span class=&quot;re1&quot;&gt;$PATH&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; elasticsearch-&lt;span class=&quot;re1&quot;&gt;$VERSION&lt;/span&gt;.deb &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;artifacts.elastic.co&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;downloads&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch-&lt;span class=&quot;re1&quot;&gt;$VERSION&lt;/span&gt;.deb  
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;dpkg&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; elasticsearch-&lt;span class=&quot;re1&quot;&gt;$VERSION&lt;/span&gt;.deb
&amp;nbsp;
    &lt;span class=&quot;co0&quot;&gt;# be sure you add &amp;quot;action.disable_delete_all_indices&amp;quot; : true to the config!!&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Configuring ElasticSearch &lt;span class=&quot;es3&quot;&gt;${VERSION}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;/LimitFSIZE=infinity/a LimitMEMLOCK=infinity&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;systemd&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;system&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch.service
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/#bootstrap.memory_lock: true/bootstrap.memory_lock: true/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch.yml
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/#network.host: 192.168.0.1/network.host: 0.0.0.0/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch.yml
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/#MAX_LOCKED_MEMORY=unlimited/MAX_LOCKED_MEMORY=unlimited/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/-Xms2g/-Xms&lt;span class=&quot;es3&quot;&gt;${es_memory}&lt;/span&gt;/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm.options
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/-Xmx2g/-Xmx&lt;span class=&quot;es3&quot;&gt;${es_memory}&lt;/span&gt;/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm.options
&amp;nbsp;
    &lt;span class=&quot;co0&quot;&gt;# enabled&lt;/span&gt;
    update-rc.d elasticsearch defaults
&amp;nbsp;
    &lt;span class=&quot;co0&quot;&gt;# start script&lt;/span&gt;
    service elasticsearch restart
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;plugin &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;plugin
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;share&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch-plugin &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;plugin
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;x&lt;span class=&quot;es4&quot;&gt;$(id -u)&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;x0&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    check_result &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Script can be run executed only by root&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-get upgrade&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
installpkg apt apt-utils &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;nano&lt;/span&gt; rename debconf-utils pwgen mailutils curl dirmngr &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;default_pass&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pwgen &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; -y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;hostname&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Enter the Internet domain name (e.g. nixcraft.com) : &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install default programs? [mc, git, etc] &amp;quot;&lt;/span&gt; ; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install default programs&amp;quot;&lt;/span&gt;;
    installpkg mc &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; mercurial bash-completion &lt;span class=&quot;kw2&quot;&gt;bzip2&lt;/span&gt; numactl dnsutils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install developers programs? [gcc, g++, etc] &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install development soft&amp;quot;&lt;/span&gt;;
    installpkg checkinstall &lt;span class=&quot;kw2&quot;&gt;gcc&lt;/span&gt; build-essential &lt;span class=&quot;kw2&quot;&gt;g++&lt;/span&gt; libboost-dev libboost-program-options-dev libboost-all-dev libevent-dev uuid-dev clang cmake &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install system monitors? [htop, iptraf] &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install system monitors&amp;quot;&lt;/span&gt;;
    installpkg &lt;span class=&quot;kw2&quot;&gt;htop&lt;/span&gt; iptraf jnettop iftop &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to uninstall systemd and install systemv? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg sysvinit-core sysvinit-utils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;share&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sysvinit&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inittab &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inittab
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install FTP Server (PRO-Ftpd)? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg proftpd &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;   
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install MySql? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg software-properties-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install MySql (Percona) (y) or Mariadb (n)?&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xcbcb082a1bb943db
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
        # Percona
        #deb http://repo.percona.com/apt &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; testing
        #deb-src http://repo.percona.com/apt &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; testing
        &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql.list
        &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
        installpkg percona-server-server-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-server-client-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-server-common-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-toolkit &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
        sevice mysql start
        check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;mysql start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;[client]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;password=&#039;&lt;span class=&quot;es2&quot;&gt;$f&lt;/span&gt;&#039;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        &lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = PASSWORD(&#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;);&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;UPDATE mysql.user SET plugin = &#039;&#039; WHERE user = &#039;root&#039; AND host = &#039;localhost&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE User=&#039;&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DROP DATABASE test&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.db WHERE Db=&#039;test&#039; OR Db=&#039;test\\_%&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE user=&#039;&#039; or password=&#039;&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FLUSH PRIVILEGES&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySQL (Percona)&amp;quot;&lt;/span&gt;
        update-rc.d mysql defaults
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;mysql&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
        &lt;span class=&quot;co0&quot;&gt;# for sid       &lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xF1656F24C74CD1D8
        &lt;span class=&quot;co0&quot;&gt;# for jessie&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xcbcb082a1bb943db
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
        # MariaDB 10.1 repository list - created 2016-08-05 19:23 UTC
        # http://downloads.mariadb.org/mariadb/repositories/
        deb [arch=amd64,i386] http://mirror.timeweb.ru/mariadb/repo/10.1/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main
        deb-src http://mirror.timeweb.ru/mariadb/repo/10.1/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main
        &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql.list
        &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
        installpkg mariadb-server mariadb-client mariadb-common &lt;span class=&quot;re5&quot;&gt;--allow-unauthenticated&lt;/span&gt;
        service mysql start
        check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;mysql start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;[client]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;password=&#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        &lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = PASSWORD(&#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;);&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;UPDATE mysql.user SET plugin = &#039;&#039; WHERE user = &#039;root&#039; AND host = &#039;localhost&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE User=&#039;&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DROP DATABASE test&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.db WHERE Db=&#039;test&#039; OR Db=&#039;test\\_%&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE user=&#039;&#039; or password=&#039;&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FLUSH PRIVILEGES&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySQL (Mariadb)&amp;quot;&lt;/span&gt;
        update-rc.d mysql defaults
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;mysql&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install PostgreSql? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg postgresql-&lt;span class=&quot;nu0&quot;&gt;9.6&lt;/span&gt; postgresql-contrib-&lt;span class=&quot;nu0&quot;&gt;9.6&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ALTER USER postgres WITH ENCRYPTED PASSWORD &#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; postgres psql
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
local      all     postgres     md5
&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;postgresql&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9.6&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pg_hba.conf
&amp;nbsp;
    service postgresql restart
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Nginx? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;nginx.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;keys&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx_signing.key &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
    # nginx
    deb http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
    deb-src http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
    &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx.list
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
    service nginx stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    installpkg nginx &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service nginx start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;nginx start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install Nginx&amp;quot;&lt;/span&gt;
    update-rc.d nginx defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;nginx&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install PHP-FPM? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.dotdeb.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dotdeb.gpg &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
    &lt;span class=&quot;re2&quot;&gt;php_ver&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please select php version like 5, 7.0, 7.1: &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
    # php-fpm dotdeb
    deb http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
    deb-src http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
    &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php-fpm.list
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
    service php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$php_ver&lt;/span&gt;&amp;quot;&lt;/span&gt; == &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          installpkg &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-dev&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-sqlite&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mcrypt&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xsl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cli&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-common&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mysql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-gd&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cgi&lt;/span&gt; php-pear php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-curl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-pgsql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mbstring&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$php_ver&lt;/span&gt;&amp;quot;&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;7.0&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          installpkg &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-dev&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-sqlite&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mcrypt&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xsl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cli&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-common&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mysql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-gd&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cgi&lt;/span&gt; php-pear php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-curl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-redis&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-pgsql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mbstring&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$php_ver&lt;/span&gt;&amp;quot;&lt;/span&gt; == &lt;span class=&quot;st0&quot;&gt;&amp;quot;7.1&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          installpkg &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-dev&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-sqlite&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mcrypt&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xsl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cli&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-common&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mysql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-gd&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cgi&lt;/span&gt; php-pear php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-curl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-redis&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-pgsql&lt;/span&gt;  php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mbstring&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;cgi.fix_pathinfo = 0&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fpm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php.ini
    service php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;php&lt;span class=&quot;es3&quot;&gt;${php_ver}&lt;/span&gt;-fpm start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install PHP-FPM&amp;quot;&lt;/span&gt;
    update-rc.d php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; defaults
    set_default_value &lt;span class=&quot;st0&quot;&gt;&amp;quot;php&lt;span class=&quot;es3&quot;&gt;${php_ver}&lt;/span&gt;-fpm&amp;quot;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
    curl &lt;span class=&quot;re5&quot;&gt;-sS&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;getcomposer.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;installer &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; php &lt;span class=&quot;re5&quot;&gt;--&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--install-dir&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;local&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin &lt;span class=&quot;re5&quot;&gt;--filename&lt;/span&gt;=composer
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install RabbitMQ? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;packages.erlang-solutions.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;debian&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;erlang_solutions.asc &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.rabbitmq.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;rabbitmq-signing-key-public.asc &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
    # Erlang
    deb http://packages.erlang-solutions.com/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; contrib
&amp;nbsp;
    # RabbitMq
    deb http://www.rabbitmq.com/debian/ testing main
    &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;rabbitmq.list
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
    service rabbitmq-server start
    installpkg rabbitmq-server &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;rabbitmq-server start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install RabbitMQ&amp;quot;&lt;/span&gt;
    update-rc.d rabbitmq-server defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;rabbitmq-server&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Redis server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg redis-server &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service redis-server start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;redis-server start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install Redis&amp;quot;&lt;/span&gt;
    update-rc.d redis-server defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;redis-server&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Elasticsearch server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Elasticsearch versions you can see here: https://github.com/elastic/elasticsearch&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;elasticsearch_ver&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please select Elasticsearch version like 5.6.4, 5.6.6, 6.1.1: &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    install_elasticsearch &lt;span class=&quot;re1&quot;&gt;$elasticsearch_ver&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install DNS server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install bind (y) or pdns (n) server?&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        installpkg bind9 bind9utils bind9-libs &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
        service bind9 start
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install DNS Server&amp;quot;&lt;/span&gt;
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;bind&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
        installpkg pdns-server pdns-backend-mysql pdns-recursor &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install DNS Server&amp;quot;&lt;/span&gt;
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;pdns&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Shorewall? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg shorewall &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Postfix/Exim4? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg exim4-daemon-heavy mailutils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service exim4 stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    gpasswd &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt; Debian-exim mail
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4.conf.template
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dnsbl.conf
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;spam-blocks.conf
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;white-blocks.conf
    &lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4.conf.template
    &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;domains
    &lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;domains
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mta
    &lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sbin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4 &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mta
    service &lt;span class=&quot;kw2&quot;&gt;sendmail&lt;/span&gt; stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; 
    service postfix stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    service exim4 start
&amp;nbsp;
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;exim4 start failed&amp;quot;&lt;/span&gt;
    update-rc.d exim4 defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;exim&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
    dpkg-reconfigure exim4-config
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Dovecot? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    gpasswd &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt; dovecot mail
    &lt;span class=&quot;kw2&quot;&gt;chown&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; root:root &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dovecot&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;
    service dovecot stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    installpkg dovecot-imapd dovecot-pop3d dovecot-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service dovecot start
&amp;nbsp;
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;dovecot start failed&amp;quot;&lt;/span&gt;
    update-rc.d dovecot defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;dovecot&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install fail2ban? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg fail2ban &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$exim&lt;/span&gt;&amp;quot;&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;no&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;fline&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fail2ban&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jail.local &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n&lt;/span&gt; exim-iptables &lt;span class=&quot;re5&quot;&gt;-A&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;fline&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$fline&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; enabled &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cut&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; -&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${fline}&lt;/span&gt;s/true/false/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fail2ban&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jail.local
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
   update-rc.d fail2ban defaults
    service fail2ban start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;fail2ban start failed&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Mysql backup system? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySql backup system&amp;quot;&lt;/span&gt;;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
    installpkg &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;git clone&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;github.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Mirocow&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql_utils.git &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql_utils
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
&amp;nbsp;
    # Run MySql backup system
    25 6    * * * root /bin/bash  ~/mysql_utils/backup.sh --dir=&amp;quot;/var/backups/mysql&amp;quot; --compress=bzip2 --exclude=&amp;quot;mysql&amp;quot; --lifetime=&amp;quot;3 day ago&amp;quot;
    &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;crontab   
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install create site script? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install create site scriptm&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;raw.githubusercontent.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Mirocow&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;master&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create.sh &lt;span class=&quot;re5&quot;&gt;-O&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create.sh
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;cache&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;archives&lt;span class=&quot;sy0&quot;&gt;/*&lt;/span&gt;.deb &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to set default shell settings? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Base system configure&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
    &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.bashrc
    &lt;span class=&quot;kw3&quot;&gt;source&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.bashrc
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
    set tabsize &amp;quot;2&amp;quot;
    &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.nanorc
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;apt-get autoremove&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1062-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:server-install-d10">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-15T15:55:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Скрипт установки для Debian 10</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:server-install-d10</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:script&amp;amp;do=showtag&amp;amp;tag=script&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:script&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; script&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:install&amp;amp;do=showtag&amp;amp;tag=install&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:install&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; install&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;скрипт_установки_для_debian_10&quot;&gt;Скрипт установки для Debian 10&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043b\u044f Debian 10&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043a\u0440\u0438\u043f\u0442_\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438_\u0434\u043b\u044f_debian_10&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;31-96&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;описание&quot;&gt;Описание&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическая установка и обновление зависимых пакетов
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическая устанока и настройка серверов GIT, PHP 5.6, PHP-FPM, Nginx, Redis, MySQL (mariadb), RabbitMQ, Exim4
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Автоматическое конфигурирование пакетов
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Установка автоматического бекапа БД MySQL (&lt;a href=&quot;https://github.com/Mirocow/mysql_utils.git&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/Mirocow/mysql_utils.git&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/Mirocow/mysql_utils.git&lt;/a&gt;)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 Устанока скрипта для создания сайта (&lt;a href=&quot;https://github.com/Mirocow/site-create&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/Mirocow/site-create&quot; rel=&quot;ugc nofollow&quot;&gt;https://github.com/Mirocow/site-create&lt;/a&gt;)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=system:exim4&quot; class=&quot;wikilink1&quot; title=&quot;system:exim4&quot; data-wiki-id=&quot;system:exim4&quot;&gt;Exim4 Smtp Server / Установка и настройка&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=develop:php:php&quot; class=&quot;wikilink1&quot; title=&quot;develop:php:php&quot; data-wiki-id=&quot;develop:php:php&quot;&gt;Установка различных версий PHP&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;97-811&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;установка&quot;&gt;Установка&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;div class=&quot;plugin_note notetip&quot;&gt;&lt;pre class=&quot;code sh&quot;&gt;# nano debian-install.sh
# bash ./debian-install.sh&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;
В debian-install.sh вставляем ниже следующий текст и нащимаем Ctrl-x, затем y (сохраняем и выходим)
&lt;/p&gt;
&lt;div class=&quot;plugin_note notetip&quot;&gt;&lt;pre class=&quot;code&quot;&gt;deb http://mirror.selectel.ru/debian buster main non-free contrib
deb-src http://mirror.selectel.ru/debian buster main non-free contrib

deb http://mirror.selectel.ru/debian-security buster/updates main contrib non-free
deb-src http://mirror.selectel.ru/debian-security buster/updates main contrib non-free&lt;/pre&gt;

&lt;/div&gt;&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;distrib&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;buster&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; info 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;--&amp;gt; $1&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; check_result&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Error: $2&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; promptyn &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; yn
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$yn&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;Yy&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;Nn&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please answer yes or no.&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; prompt &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; variable &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$variable&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; installpkg&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; pkg &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; $&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;
 &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dpkg-query &lt;span class=&quot;re5&quot;&gt;-W&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;${Status}&#039;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$pkg&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ok installed&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;;
  &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install &lt;span class=&quot;es2&quot;&gt;$pkg&lt;/span&gt; ...&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$pkg&lt;/span&gt;;
  &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; set_default_value&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;variable&lt;/span&gt;=\&lt;span class=&quot;re4&quot;&gt;$$&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;yes&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$variable&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;no&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; h&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;history&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; install_elasticsearch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;VERSION&lt;/span&gt;=&lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;es_memory&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;1024m&#039;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;apt-get install&lt;/span&gt; openjdk-&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;-jdk
    &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;java-&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;-openjdk-amd64&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;java&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;JAVA_HOME&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;java-&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;-openjdk-amd64
    &lt;span class=&quot;kw3&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$JAVA_HOME&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin:&lt;span class=&quot;re1&quot;&gt;$PATH&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; elasticsearch-&lt;span class=&quot;re1&quot;&gt;$VERSION&lt;/span&gt;.deb &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;artifacts.elastic.co&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;downloads&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch-&lt;span class=&quot;re1&quot;&gt;$VERSION&lt;/span&gt;.deb  
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;dpkg&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; elasticsearch-&lt;span class=&quot;re1&quot;&gt;$VERSION&lt;/span&gt;.deb
&amp;nbsp;
    &lt;span class=&quot;co0&quot;&gt;# be sure you add &amp;quot;action.disable_delete_all_indices&amp;quot; : true to the config!!&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Configuring ElasticSearch &lt;span class=&quot;es3&quot;&gt;${VERSION}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;/LimitFSIZE=infinity/a LimitMEMLOCK=infinity&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lib&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;systemd&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;system&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch.service
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/#bootstrap.memory_lock: true/bootstrap.memory_lock: true/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch.yml
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/#network.host: 192.168.0.1/network.host: 0.0.0.0/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch.yml
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/#MAX_LOCKED_MEMORY=unlimited/MAX_LOCKED_MEMORY=unlimited/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;default&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/-Xms2g/-Xms&lt;span class=&quot;es3&quot;&gt;${es_memory}&lt;/span&gt;/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm.options
    &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/-Xmx2g/-Xmx&lt;span class=&quot;es3&quot;&gt;${es_memory}&lt;/span&gt;/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jvm.options
&amp;nbsp;
    &lt;span class=&quot;co0&quot;&gt;# enabled&lt;/span&gt;
    update-rc.d elasticsearch defaults
&amp;nbsp;
    &lt;span class=&quot;co0&quot;&gt;# start script&lt;/span&gt;
    service elasticsearch restart
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;plugin &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;plugin
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;share&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;elasticsearch-plugin &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;plugin
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;x&lt;span class=&quot;es4&quot;&gt;$(id -u)&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= &lt;span class=&quot;st_h&quot;&gt;&#039;x0&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    check_result &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Script can be run executed only by root&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-get upgrade&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
installpkg apt apt-utils &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;nano&lt;/span&gt; rename debconf-utils pwgen mailutils curl dirmngr &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;default_pass&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pwgen &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; -y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;hostname&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Enter the Internet domain name (e.g. nixcraft.com) : &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install default programs? [mc, git, etc] &amp;quot;&lt;/span&gt; ; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install default programs&amp;quot;&lt;/span&gt;;
    installpkg mc &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; mercurial bash-completion &lt;span class=&quot;kw2&quot;&gt;bzip2&lt;/span&gt; numactl dnsutils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install developers programs? [gcc, g++, etc] &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install development soft&amp;quot;&lt;/span&gt;;
    installpkg checkinstall &lt;span class=&quot;kw2&quot;&gt;gcc&lt;/span&gt; build-essential &lt;span class=&quot;kw2&quot;&gt;g++&lt;/span&gt; libboost-dev libboost-program-options-dev libboost-all-dev libevent-dev uuid-dev clang cmake &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install system monitors? [htop, iptraf] &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install system monitors&amp;quot;&lt;/span&gt;;
    installpkg &lt;span class=&quot;kw2&quot;&gt;htop&lt;/span&gt; iptraf jnettop iftop &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to uninstall systemd and install systemv? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg sysvinit-core sysvinit-utils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;share&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sysvinit&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inittab &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;inittab
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install FTP Server (PRO-Ftpd)? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg proftpd &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;   
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install MySql? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg software-properties-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install MySql (Percona) (y) or Mariadb (n)?&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xcbcb082a1bb943db
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
        # Percona
        #deb http://repo.percona.com/apt &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; testing
        #deb-src http://repo.percona.com/apt &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; testing
        &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql.list
        &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
        installpkg percona-server-server-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-server-client-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-server-common-&lt;span class=&quot;nu0&quot;&gt;5.7&lt;/span&gt; percona-toolkit &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
        sevice mysql start
        check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;mysql start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;[client]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;password=&#039;&lt;span class=&quot;es2&quot;&gt;$f&lt;/span&gt;&#039;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        &lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = PASSWORD(&#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;);&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;UPDATE mysql.user SET plugin = &#039;&#039; WHERE user = &#039;root&#039; AND host = &#039;localhost&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE User=&#039;&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DROP DATABASE test&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.db WHERE Db=&#039;test&#039; OR Db=&#039;test\\_%&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE user=&#039;&#039; or password=&#039;&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FLUSH PRIVILEGES&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySQL (Percona)&amp;quot;&lt;/span&gt;
        update-rc.d mysql defaults
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;mysql&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
        &lt;span class=&quot;co0&quot;&gt;# for sid       &lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xF1656F24C74CD1D8
        &lt;span class=&quot;co0&quot;&gt;# for jessie&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;apt-key adv&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--recv-keys&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--keyserver&lt;/span&gt; keyserver.ubuntu.com 0xcbcb082a1bb943db
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
        # MariaDB 10.1 repository list - created 2016-08-05 19:23 UTC
        # http://downloads.mariadb.org/mariadb/repositories/
        deb [arch=amd64,i386] http://mirror.timeweb.ru/mariadb/repo/10.1/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main
        deb-src http://mirror.timeweb.ru/mariadb/repo/10.1/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; main
        &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql.list
        &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
        installpkg mariadb-server mariadb-client mariadb-common &lt;span class=&quot;re5&quot;&gt;--allow-unauthenticated&lt;/span&gt;
        service mysql start
        check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;mysql start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;[client]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;password=&#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        &lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.my.cnf
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = PASSWORD(&#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;);&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;UPDATE mysql.user SET plugin = &#039;&#039; WHERE user = &#039;root&#039; AND host = &#039;localhost&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE User=&#039;&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DROP DATABASE test&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.db WHERE Db=&#039;test&#039; OR Db=&#039;test\\_%&#039;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DELETE FROM mysql.user WHERE user=&#039;&#039; or password=&#039;&#039;;&amp;quot;&lt;/span&gt;
        mysql &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;FLUSH PRIVILEGES&amp;quot;&lt;/span&gt;
&amp;nbsp;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySQL (Mariadb)&amp;quot;&lt;/span&gt;
        update-rc.d mysql defaults
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;mysql&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
  &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install PostgreSql? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg postgresql-&lt;span class=&quot;nu0&quot;&gt;9.6&lt;/span&gt; postgresql-contrib-&lt;span class=&quot;nu0&quot;&gt;9.6&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;ALTER USER postgres WITH ENCRYPTED PASSWORD &#039;&lt;span class=&quot;es3&quot;&gt;${default_pass}&lt;/span&gt;&#039;;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; postgres psql
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
local      all     postgres     md5
&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;postgresql&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9.6&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pg_hba.conf
&amp;nbsp;
    service postgresql restart
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Nginx? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;nginx.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;keys&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx_signing.key &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
    # nginx
    deb http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
    deb-src http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
    &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx.list
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
    service nginx stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    installpkg nginx &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service nginx start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;nginx start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install Nginx&amp;quot;&lt;/span&gt;
    update-rc.d nginx defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;nginx&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install PHP-FPM? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.dotdeb.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dotdeb.gpg &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
    &lt;span class=&quot;re2&quot;&gt;php_ver&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please select php version like 5, 7.0, 7.1, 7.2, 7.3: &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
    # php-fpm dotdeb
    deb http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
    deb-src http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
    &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php-fpm.list
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
    service php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$php_ver&lt;/span&gt;&amp;quot;&lt;/span&gt; == &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          installpkg &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-dev&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-sqlite&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mcrypt&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xsl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cli&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-common&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mysql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-gd&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cgi&lt;/span&gt; php-pear php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-curl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-pgsql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mbstring&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
          installpkg &lt;span class=&quot;re5&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; stable php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-dev&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-sqlite&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mcrypt&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-xsl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cli&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-common&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mysql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-gd&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-cgi&lt;/span&gt; php-pear php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-curl&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-redis&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-pgsql&lt;/span&gt; php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-mbstring&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;          
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;   
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;cgi.fix_pathinfo = 0&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fpm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php.ini
    service php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;php&lt;span class=&quot;es3&quot;&gt;${php_ver}&lt;/span&gt;-fpm start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install PHP-FPM&amp;quot;&lt;/span&gt;
    update-rc.d php&lt;span class=&quot;co1&quot;&gt;${php_ver}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; defaults
    set_default_value &lt;span class=&quot;st0&quot;&gt;&amp;quot;php&lt;span class=&quot;es3&quot;&gt;${php_ver}&lt;/span&gt;-fpm&amp;quot;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
    curl &lt;span class=&quot;re5&quot;&gt;-sS&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;getcomposer.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;installer &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; php &lt;span class=&quot;re5&quot;&gt;--&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--install-dir&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;local&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin &lt;span class=&quot;re5&quot;&gt;--filename&lt;/span&gt;=composer
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install RabbitMQ? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;packages.erlang-solutions.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;debian&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;erlang_solutions.asc &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.rabbitmq.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;rabbitmq-signing-key-public.asc &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
    # Erlang
    deb http://packages.erlang-solutions.com/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; contrib
&amp;nbsp;
    # RabbitMq
    deb http://www.rabbitmq.com/debian/ testing main
    &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;rabbitmq.list
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
&amp;nbsp;
    service rabbitmq-server start
    installpkg rabbitmq-server &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;rabbitmq-server start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install RabbitMQ&amp;quot;&lt;/span&gt;
    update-rc.d rabbitmq-server defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;rabbitmq-server&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Redis server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg redis-server &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service redis-server start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;redis-server start failed&amp;quot;&lt;/span&gt;
&amp;nbsp;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install Redis&amp;quot;&lt;/span&gt;
    update-rc.d redis-server defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;redis-server&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Elasticsearch server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Elasticsearch versions you can see here: https://github.com/elastic/elasticsearch&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;elasticsearch_ver&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;prompt &lt;span class=&quot;st0&quot;&gt;&amp;quot;Please select Elasticsearch version like 5.6.4, 5.6.6, 5.6.16, 6.1.1: &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    install_elasticsearch &lt;span class=&quot;re1&quot;&gt;$elasticsearch_ver&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install DNS server? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install bind (y) or pdns (n) server?&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        installpkg bind9 bind9utils bind9-libs &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
        service bind9 start
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install DNS Server&amp;quot;&lt;/span&gt;
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;bind&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
        installpkg pdns-server pdns-backend-mysql pdns-recursor &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
        info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install DNS Server&amp;quot;&lt;/span&gt;
        set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;pdns&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Shorewall? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg shorewall &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Postfix/Exim4? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg exim4-daemon-heavy mailutils &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service exim4 stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    gpasswd &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt; Debian-exim mail
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4.conf.template
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dnsbl.conf
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;spam-blocks.conf
    &lt;span class=&quot;kw2&quot;&gt;touch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;white-blocks.conf
    &lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;640&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4.conf.template
    &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;domains
    &lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;domains
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mta
    &lt;span class=&quot;kw2&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sbin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;exim4 &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;alternatives&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mta
    service &lt;span class=&quot;kw2&quot;&gt;sendmail&lt;/span&gt; stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; 
    service postfix stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    service exim4 start
&amp;nbsp;
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;exim4 start failed&amp;quot;&lt;/span&gt;
    update-rc.d exim4 defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;exim&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&amp;nbsp;
    dpkg-reconfigure exim4-config
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Dovecot? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    gpasswd &lt;span class=&quot;re5&quot;&gt;-a&lt;/span&gt; dovecot mail
    &lt;span class=&quot;kw2&quot;&gt;chown&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; root:root &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dovecot&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;
    service dovecot stop &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;null &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    installpkg dovecot-imapd dovecot-pop3d dovecot-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    service dovecot start
&amp;nbsp;
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;dovecot start failed&amp;quot;&lt;/span&gt;
    update-rc.d dovecot defaults
    set_default_value &lt;span class=&quot;st_h&quot;&gt;&#039;dovecot&#039;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;true&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install fail2ban? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    installpkg fail2ban &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$exim&lt;/span&gt;&amp;quot;&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;no&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;fline&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fail2ban&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jail.local &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n&lt;/span&gt; exim-iptables &lt;span class=&quot;re5&quot;&gt;-A&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;fline&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$fline&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; enabled &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cut&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; -&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${fline}&lt;/span&gt;s/true/false/&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fail2ban&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;jail.local
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
   update-rc.d fail2ban defaults
    service fail2ban start
    check_result &lt;span class=&quot;re4&quot;&gt;$?&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;fail2ban start failed&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install Mysql backup system? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install MySql backup system&amp;quot;&lt;/span&gt;;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;apt-get update&lt;/span&gt;
    installpkg &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;git clone&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;github.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Mirocow&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql_utils.git &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;mysql_utils
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
&amp;nbsp;
    # Run MySql backup system
    25 6    * * * root /bin/bash  ~/mysql_utils/backup.sh --dir=&amp;quot;/var/backups/mysql&amp;quot; --compress=bzip2 --exclude=&amp;quot;mysql&amp;quot; --lifetime=&amp;quot;3 day ago&amp;quot;
    &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;crontab   
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to install create site script? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Install create site scriptm&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; https:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;raw.githubusercontent.com&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Mirocow&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;master&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create.sh &lt;span class=&quot;re5&quot;&gt;-O&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;root&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;site-create.sh
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;var&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;cache&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;archives&lt;span class=&quot;sy0&quot;&gt;/*&lt;/span&gt;.deb &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; promptyn &lt;span class=&quot;st0&quot;&gt;&amp;quot;Do you wish to set default shell settings? &amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    info &lt;span class=&quot;st0&quot;&gt;&amp;quot;Base system configure&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
    &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.bashrc
    &lt;span class=&quot;kw3&quot;&gt;source&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.bashrc
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
    set tabsize &amp;quot;2&amp;quot;
    &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.nanorc
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;apt-get autoremove&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;812-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:server-install.sh">
        <dc:format>text/html</dc:format>
        <dc:date>2016-02-15T09:08:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Скрипт инсталляции для Debian 6 LNMP (Nginx, MySql, PHP-FPM, Memcache)</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:server-install.sh</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:scropt&amp;amp;do=showtag&amp;amp;tag=scropt&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:scropt&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; scropt&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:scropts&amp;amp;do=showtag&amp;amp;tag=scropts&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:scropts&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; scropts&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:debian&amp;amp;do=showtag&amp;amp;tag=debian&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:debian&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; debian&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;скрипт_инсталляции_для_debian_6_lnmp_nginx_mysql_php-fpm_memcache&quot;&gt;Скрипт инсталляции для Debian 6 LNMP (Nginx, MySql, PHP-FPM, Memcache)&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;div class=&quot;plugin_note notetip&quot;&gt;&lt;pre class=&quot;code sh&quot;&gt;# aptitude install nano
# nano ~/install-server.sh
# sh ~/install-server.sh&lt;/pre&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 \u0434\u043b\u044f Debian 6 LNMP (Nginx, MySql, PHP-FPM, Memcache)&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043a\u0440\u0438\u043f\u0442_\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438_\u0434\u043b\u044f_debian_6_lnmp_nginx_mysql_php-fpm_memcache&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;38-255&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;install-serversh&quot;&gt;install-server.sh&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Automatic installation servers apps ##&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;distrib&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;squeeze&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
deb http://ftp.pl.debian.org/debian stable main contrib
deb-src http://ftp.pl.debian.org/debian stable main contrib
&amp;nbsp;
deb http://ftp.debian.org/debian/ squeeze-updates main contrib
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib
&amp;nbsp;
deb http://security.debian.org/ squeeze/updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib
&amp;nbsp;
# erlyvideo.org
#deb http://debian.erlyvideo.org binary/
&amp;nbsp;
# php-fpm dotdeb
deb http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
deb-src http://packages.dotdeb.org &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; all
&amp;nbsp;
# nginx
deb http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
deb-src http://nginx.org/packages/debian &lt;span class=&quot;es3&quot;&gt;${distrib}&lt;/span&gt; nginx
&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apt&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sources.list
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;www.dotdeb.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dotdeb.gpg &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&lt;span class=&quot;kw2&quot;&gt;wget&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-q&lt;/span&gt; http:&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;nginx.org&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;keys&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx_signing.key &lt;span class=&quot;re5&quot;&gt;-O-&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;apt-key add&lt;/span&gt; -
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Update OS ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude update&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;aptitude&lt;/span&gt; upgrade &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install my app list ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude install&lt;/span&gt; apt apt-utils chkconfig mc &lt;span class=&quot;kw2&quot;&gt;htop&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;git&lt;/span&gt; mercurial checkinstall iptraf jnettop iftop &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude install&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;nano&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install PHP-FPM ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude install&lt;/span&gt; php5 php5-dev php5-sqlite php5-mcrypt php5-xsl php5-cli php5-common php5-mysql php5-suhosin php5-gd php5-fpm \
        php5-cgi php-pear php5-apc php5-memcached php5-memcache php5-curl &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;cgi.fix_pathinfo = 0&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php5&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;fpm&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;php.ini
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install Nginx ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude install&lt;/span&gt; nginx &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install MySQL ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude install&lt;/span&gt; mysql-server mysql-client mysql-common &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
chkconfig &lt;span class=&quot;re5&quot;&gt;--levels&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;235&lt;/span&gt; mysql on
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Install Memcqached ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;sleep&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;aptitude install&lt;/span&gt; libmysqlclient18 memcached &lt;span class=&quot;re5&quot;&gt;-y&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;## Configure Multiple instances of memcached server ##&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;#! /bin/bash
### BEGIN INIT INFO
# Provides:  	memcached
# Required-Start:	$remote_fs $syslog
# Required-Stop:	$remote_fs $syslog
# Should-Start:		$local_fs
# Should-Stop:		$local_fs
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6
# Short-Description:	Start memcached daemon
# Description:		Start up memcached, a high-performance memory caching daemon
### END INIT INFO
&amp;nbsp;
&amp;nbsp;
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/memcached
DAEMONNAME=memcached
DAEMONBOOTSTRAP=/usr/share/memcached/scripts/start-memcached
DESC=memcached
&amp;nbsp;
test -x $DAEMON || exit 0
test -x $DAEMONBOOTSTRAP || exit 0
&amp;nbsp;
set -e
&amp;nbsp;
. /lib/lsb/init-functions
&amp;nbsp;
# Edit /etc/default/memcached to change this.
ENABLE_MEMCACHED=no
test -r /etc/default/memcached &amp;amp;&amp;amp; . /etc/default/memcached
&amp;nbsp;
FILES=(/etc/memcached_*.conf);
# check for alternative config schema
if [ -r &amp;quot;${FILES[0]}&amp;quot; ]; then
    CONFIGS=();
    for FILE in &amp;quot;${FILES[@]}&amp;quot;;
    do
	# remove prefix and sufix
	NAME=$(basename &amp;quot;${FILE}&amp;quot; .conf);
&amp;nbsp;
	# check optional second param
	if [ $# -ne 2 ];
	then
	    # add to config array
	    CONFIGS+=($NAME);
	elif [ &amp;quot;memcached_$2&amp;quot; == &amp;quot;$NAME&amp;quot; ];
	then
	    # use only one memcached
	    CONFIGS=($NAME);
	    break;
	fi;
    done;
&amp;nbsp;
    if [ ${#CONFIGS[@]} == 0 ];
    then
	echo &amp;quot;Config not exist for: $2&amp;quot; &amp;gt;&amp;amp;2;
	exit 1;
    fi;
else
    CONFIGS=(memcached);
fi;
&amp;nbsp;
CONFIG_NUM=${#CONFIGS[@]};
for ((i=0; i &amp;lt; $CONFIG_NUM; i++)); do
    NAME=${CONFIGS[${i}]};
    PIDFILE=&amp;quot;/var/run/${NAME}.pid&amp;quot;;
    case &amp;quot;$1&amp;quot; in
	start)
	    echo -n &amp;quot;Starting $DESC: &amp;quot;
	    if [ $ENABLE_MEMCACHED = yes ]; then
		start-stop-daemon --start --quiet --exec &amp;quot;$DAEMONBOOTSTRAP&amp;quot; -- /etc/${NAME}.conf $PIDFILE
		echo &amp;quot;$NAME.&amp;quot;
	    else
		echo &amp;quot;$NAME disabled in /etc/default/memcached.&amp;quot;
	    fi
	    ;;
	stop)
	    echo -n &amp;quot;Stopping $DESC: &amp;quot;
	    start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
	    echo &amp;quot;$NAME.&amp;quot;
	    rm -f $PIDFILE
	    ;;
&amp;nbsp;
	restart|force-reload)
	#
	#	If the &amp;quot;reload&amp;quot; option is implemented, move the &amp;quot;force-reload&amp;quot;
	#	option to the &amp;quot;reload&amp;quot; entry above. If not, &amp;quot;force-reload&amp;quot; is
	#	just the same as &amp;quot;restart&amp;quot;.
	#
	    echo -n &amp;quot;Restarting $DESC: &amp;quot;
	    start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
	    rm -f $PIDFILE
	    sleep 1
	    start-stop-daemon --start --quiet --exec &amp;quot;$DAEMONBOOTSTRAP&amp;quot; -- /etc/${NAME}.conf $PIDFILE
	    echo &amp;quot;$NAME.&amp;quot;
	    ;;
	status)
	    status_of_proc $DAEMON $NAME
	    ;;
	*)
	    N=/etc/init.d/$DAEMONNAME
	    echo &amp;quot;Usage: $N {start|stop|restart|force-reload|status}&amp;quot; &amp;gt;&amp;amp;2
	    exit 1
	    ;;
    esac
done;
&amp;nbsp;
exit 0
&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;init.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;memcached
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;#!/usr/bin/perl -w
&amp;nbsp;
# start-memcached
# 2003/2004 - Jay Bonci &amp;lt;jaybonci@debian.org&amp;gt;
# This script handles the parsing of the /etc/memcached.conf file
# and was originally created for the Debian distribution.
# Anyone may use this little script under the same terms as
# memcached itself.
&amp;nbsp;
use strict;
&amp;nbsp;
if($&amp;gt; != 0 and $&amp;lt; != 0)
{
    print STDERR &amp;quot;Only root wants to run start-memcached.\n&amp;quot;;
    exit;
}
&amp;nbsp;
my $params; my $etchandle; my $etcfile = &amp;quot;/etc/memcached.conf&amp;quot;;
&amp;nbsp;
# This script assumes that memcached is located at /usr/bin/memcached, and
# that the pidfile is writable at /var/run/memcached.pid
&amp;nbsp;
my $memcached = &amp;quot;/usr/bin/memcached&amp;quot;;
my $pidfile = &amp;quot;/var/run/memcached.pid&amp;quot;;
&amp;nbsp;
if (scalar(@ARGV) == 2) {
    $etcfile = shift(@ARGV);
    $pidfile = shift(@ARGV);
}
&amp;nbsp;
# If we don&#039;&lt;/span&gt;t get a valid logfile parameter &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; the &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;memcached.conf &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;,
&lt;span class=&quot;co0&quot;&gt;# we&#039;ll just throw away all of our in-daemon output. We need to re-tie it so&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# that non-bash shells will not hang on logout. Thanks to Michael Renner for&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# the tip&lt;/span&gt;
my &lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;/dev/null&amp;quot;&lt;/span&gt;;
&amp;nbsp;
sub handle_logfile
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    my &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;_;
    &lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
sub reopen_logfile
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    my &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;_;
&amp;nbsp;
    open &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;STDERR, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;&lt;span class=&quot;es2&quot;&gt;$logfile&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    open &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;STDOUT, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;&lt;span class=&quot;es2&quot;&gt;$logfile&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    open &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;STDIN, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;/dev/null&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;$logfile&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# This is set up in place here to support other non -[a-z] directives&lt;/span&gt;
&amp;nbsp;
my &lt;span class=&quot;re1&quot;&gt;$conf_directives&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;logfile&amp;quot;&lt;/span&gt; =&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; \&lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt;handle_logfile,
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;open &lt;span class=&quot;re1&quot;&gt;$etchandle&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;$etcfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    foreach my &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$etchandle&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt;= &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ s&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;\&lt;span class=&quot;co0&quot;&gt;#.*//g;&lt;/span&gt;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ s&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;\s+$&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;g;
        &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ s&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^\s+&lt;span class=&quot;sy0&quot;&gt;//&lt;/span&gt;g;
        next unless &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt;;
        next &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^\-&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;dh&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;^\-&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            my &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$directive&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt; =~ &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;^&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;?&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;\s+&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;.&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;;
            &lt;span class=&quot;re1&quot;&gt;$conf_directives&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$directive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
            next;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        push &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;$line&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
push &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&amp;quot;-u root&amp;quot;&lt;/span&gt; unless&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;-u&amp;quot;&lt;/span&gt;, &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;join&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;, &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$params&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-e &lt;span class=&quot;re1&quot;&gt;$pidfile&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    open PIDHANDLE, &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$pidfile&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    my &lt;span class=&quot;re1&quot;&gt;$localpid&lt;/span&gt; = &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;PIDHANDLE&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;;
    close PIDHANDLE;
&amp;nbsp;
    chomp &lt;span class=&quot;re1&quot;&gt;$localpid&lt;/span&gt;;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-d &lt;span class=&quot;st0&quot;&gt;&amp;quot;/proc/&lt;span class=&quot;es2&quot;&gt;$localpid&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        print STDERR &lt;span class=&quot;st0&quot;&gt;&amp;quot;memcached is already running.&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;;
        &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$localpid&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
my &lt;span class=&quot;re1&quot;&gt;$pid&lt;/span&gt; = fork&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$pid&lt;/span&gt; == &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    reopen_logfile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;$fd_reopened&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span class=&quot;kw3&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$memcached&lt;/span&gt; &lt;span class=&quot;es2&quot;&gt;$params&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;open PIDHANDLE,&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&lt;span class=&quot;es2&quot;&gt;$pidfile&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        print PIDHANDLE &lt;span class=&quot;re1&quot;&gt;$pid&lt;/span&gt;;
        close PIDHANDLE;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
        print STDERR &lt;span class=&quot;st0&quot;&gt;&amp;quot;Can&#039;t write pidfile to &lt;span class=&quot;es2&quot;&gt;$pidfile&lt;/span&gt;.&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;st_h&quot;&gt;&#039; &amp;gt; /usr/share/memcached/scripts/start-memcached
&amp;nbsp;
echo -e &amp;quot;## Install development soft ##&amp;quot;
aptitude install gcc build-essential g++ libboost-dev libboost-program-options-dev libboost-all-dev libevent-dev uuid-dev -y
&amp;nbsp;
service php5-fpm restart
&amp;nbsp;
echo -e &amp;quot;## Install DNS Server ##&amp;quot;
# aptitude install bind9 bind9utils bind9-libs -y
aptitude install pdns-server pdns-backend-mysql pdns-recursor -y
&amp;nbsp;
echo -e &amp;quot;## Install SMTP Server ##&amp;quot;
aptitude install exim4
dpkg-reconfigure exim4-config
&amp;nbsp;
echo -e  &amp;quot;## Start APPs ##&amp;quot;
service nginx restart
service php5-fpm restart
service mysql restart
service memcached restart
&amp;nbsp;
#echo &amp;quot; *Clearing downloaded packages after install!*&amp;quot;
#rm /var/cache/apt/archives/*.deb -f
&amp;nbsp;
echo -e &amp;quot;## Base system configure ##&amp;quot;
echo &#039;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# My config&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;nano&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;nano -u -w &amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;ls&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;ls --color=always&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;grep&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;grep --color=auto&#039;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;fgrep&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;fgrep --color=auto&#039;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;egrep&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;egrep --color=auto&#039;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;HISTSIZE&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;50000&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;HISTFILESIZE&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;50000&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;HISTCONTROL&lt;/span&gt;=ignoreboth
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; cmdhist
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; histappend
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; checkwinsize
&lt;span class=&quot;kw3&quot;&gt;shopt&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; extglob
&lt;span class=&quot;kw3&quot;&gt;ulimit&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Functions&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Функции работы с историей комманд&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; h&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;history&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt;;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Функции для работы с файлами и строками:&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#-----------------------------------&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# Поиск файла по шаблону:&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; ff&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; . &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;re5&quot;&gt;-iname&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;re4&quot;&gt;$*&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-ls&lt;/span&gt; ; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Поиск файла по шаблону в $1 и запуск команды в $2 с ним:&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; fe&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; . &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;re5&quot;&gt;-iname&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;re4&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-exec&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${2:-file}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; \;  ; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# поиск строки по файлам:&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; fstr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;OPTIND&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;case&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;usage&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;fstr: поиск строки в файлах.
        Порядок использования: fstr [-i] &lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;шаблон&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt; [&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;шаблон_имени_файла&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;] &amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;getopts&lt;/span&gt; :it opt
    &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$opt&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;
        i&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;case&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;-i &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$usage&lt;/span&gt;&amp;quot;&lt;/span&gt;; &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$OPTIND&lt;/span&gt; - &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$#&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-lt&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$usage&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt;;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;SMSO&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;tput smso&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;RMSO&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;tput rmso&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;find&lt;/span&gt; . &lt;span class=&quot;re5&quot;&gt;-type&lt;/span&gt; f &lt;span class=&quot;re5&quot;&gt;-name&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${2:-*}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-print0&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;xargs&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-0&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-sn&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${case}&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;amp;&lt;/span&gt;- &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; \
        &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;s/$1/&lt;span class=&quot;es3&quot;&gt;${SMSO}&lt;/span&gt;\0&lt;span class=&quot;es3&quot;&gt;${RMSO}&lt;/span&gt;/gI&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;more&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;st_h&quot;&gt;&#039; &amp;gt;&amp;gt; ~/.bashrc
source ~/.bashrc
&amp;nbsp;
echo &#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;set&lt;/span&gt; tabsize &lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;
&lt;span class=&quot;st_h&quot;&gt;&#039; &amp;gt;&amp;gt; ~/.nanorc&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;install-server.sh&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;install-serversh&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;256-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:server-install">
        <dc:format>text/html</dc:format>
        <dc:date>2017-10-30T18:22:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Server install</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:server-install</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:script&amp;amp;do=showtag&amp;amp;tag=script&quot; class=&quot;wikilink1&quot; title=&quot;tag:script&quot; rel=&quot;tag&quot;&gt;script&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:install&amp;amp;do=showtag&amp;amp;tag=install&quot; class=&quot;wikilink1&quot; title=&quot;tag:install&quot; rel=&quot;tag&quot;&gt;install&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;server_install&quot;&gt;Server install&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;div class=&quot;plugin_note noteimportant&quot;&gt;Протестировано на Debian &lt;abbr title=&quot;Operating System&quot;&gt;OS&lt;/abbr&gt;
&lt;/div&gt;&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://github.com/Mirocow/site-create/blob/master/site-create.sh&quot; class=&quot;mediafile mf_sh&quot;&gt;site-create.sh&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/bash&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$BASH&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ;&lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; Please run this script &lt;span class=&quot;re4&quot;&gt;$0&lt;/span&gt; with &lt;span class=&quot;kw2&quot;&gt;bash&lt;/span&gt;; &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; trim&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;{gsub(/^ +| +$/,&amp;quot;&amp;quot;)} {print $0}&#039;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; create_site&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;re2&quot;&gt;site_name&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$HOST&lt;/span&gt;
		&lt;span class=&quot;re2&quot;&gt;site_alias&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$ALIAS&lt;/span&gt;
		&lt;span class=&quot;re2&quot;&gt;site_addr&lt;/span&gt;=&lt;span class=&quot;re1&quot;&gt;$IP&lt;/span&gt;
		&lt;span class=&quot;re2&quot;&gt;password&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;date&lt;/span&gt; +&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;s &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; sha256sum &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; base64 &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;head&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; ; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
				&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$SET_PASSWORD&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
						&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;:&lt;span class=&quot;co1&quot;&gt;${password}&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; chpasswd
						usermod  &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;bash&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;
				&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
						&lt;span class=&quot;re2&quot;&gt;password&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;[without changes]&#039;&lt;/span&gt;
						&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;User&#039;s password is not updated&amp;quot;&lt;/span&gt;
				&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;						
		&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
				&lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;
				&lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;logs
				&lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;httpdocs
				&lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;httpdocs&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;web
				useradd &lt;span class=&quot;re5&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;bash&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;
				usermod &lt;span class=&quot;re5&quot;&gt;-G&lt;/span&gt; www-data &lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;
				&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;:&lt;span class=&quot;co1&quot;&gt;${password}&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; chpasswd
				&lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.ssh
				&lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; 0700 &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.ssh
				&lt;span class=&quot;kw2&quot;&gt;ssh-keygen&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-b&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4096&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; rsa &lt;span class=&quot;re5&quot;&gt;-N&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.ssh&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;id_rsa
				&lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; 0600 &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.ssh&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;id_rsa
				&lt;span class=&quot;kw2&quot;&gt;ssh-keygen&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-b&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4096&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-t&lt;/span&gt; dsa &lt;span class=&quot;re5&quot;&gt;-N&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.ssh&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;id_dsa
				&lt;span class=&quot;kw2&quot;&gt;chmod&lt;/span&gt; 0600 &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.ssh&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;id_dsa
				&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt;  &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;?php phpinfo();&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;httpdocs&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;web&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;index.php
				&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$LOCK&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
						&lt;span class=&quot;re2&quot;&gt;authpassword&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;date&lt;/span&gt; +&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;s &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; sha256sum &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; base64 &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;head&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; ; &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
						php &lt;span class=&quot;re5&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;echo &#039;admin:&#039; . crypt(&#039;&lt;span class=&quot;es3&quot;&gt;${authpassword}&lt;/span&gt;&#039;, &#039;salt&#039;) . &#039;: Web auth for &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&#039;;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;authfile
				&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
				&lt;span class=&quot;kw2&quot;&gt;chown&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;:www-data &lt;span class=&quot;re5&quot;&gt;-R&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;home&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;
		&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$APACHE&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
&amp;lt;VirtualHost 127.0.0.1:8080&amp;gt;
                ServerName &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
                ServerAlias www.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
                ServerAdmin info@reklamu.ru
                DocumentRoot /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/httpdocs/web
                &amp;lt;Directory /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/httpdocs/web&amp;gt;
                                Options Indexes FollowSymLinks MultiViews
                                Options FollowSymLinks
                                AllowOverride All
                                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                                Order allow,deny
                                Allow from all
                &amp;lt;/Directory&amp;gt;
&amp;nbsp;
                ErrorLog &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;{APACHE_LOG_DIR}/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;-error.log
&amp;nbsp;
                # Possible values include: debug, info, notice, warn, error, crit,
                # alert, emerg.
                LogLevel warn
&amp;nbsp;
                CustomLog &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;{APACHE_LOG_DIR}/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;-access.log combined
&amp;lt;/VirtualHost&amp;gt;
&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;apache2&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sites-enabled&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;.conf
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;main&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;
                                # Apache back-end
                                location / {
                                                proxy_pass  http://127.0.0.1:8080;
                                                proxy_ignore_headers   Expires Cache-Control;
                                                proxy_set_header        Host            &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;host;
                                                proxy_set_header        X-Real-IP       &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;remote_addr;
                                                proxy_set_header        X-Forwarded-For &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;proxy_add_x_forwarded_for;
                                }
                                location ~* \.(js|css|png|jpg|jpeg|gif|ico|swf)&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt; {
                                                expires 1y;
                                                log_not_found off;
                                                proxy_pass  http://127.0.0.1:8080;
                                                proxy_ignore_headers   Expires Cache-Control;
                                                proxy_set_header        Host            &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;host;
                                                proxy_set_header        X-Real-IP       &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;remote_addr;
                                                proxy_set_header        X-Forwarded-For &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;proxy_add_x_forwarded_for;
                                }
                                location ~* \.(html|htm)&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt; {
                                                expires 1h;
                                                proxy_pass  http://127.0.0.1:8080;
                                                proxy_ignore_headers   Expires Cache-Control;
                                                proxy_set_header        Host            &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;host;
                                                proxy_set_header        X-Real-IP       &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;remote_addr;
                                                proxy_set_header        X-Forwarded-For &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;proxy_add_x_forwarded_for;
                                }
&amp;quot;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re2&quot;&gt;php_config&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;;; php-fpm config for &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
[&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;]
&amp;nbsp;
user = &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
group = www-data
&amp;nbsp;
listen = /var/run/php-fpm-&lt;span class=&quot;es3&quot;&gt;${PHP}&lt;/span&gt;-&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.sock
listen.owner = &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
listen.group = www-data
listen.mode = 0666
&amp;nbsp;
pm = dynamic
pm.max_children = 250
pm.start_servers = 8
pm.min_spare_servers = 8
pm.max_spare_servers = 16
&amp;nbsp;
chdir = /
security.limit_extensions = false
php_flag[display_errors] = on
php_admin_value[error_log] = /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/logs/fpm-php-&lt;span class=&quot;es3&quot;&gt;${PHP}&lt;/span&gt;-&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.log
php_admin_flag[log_errors] = on
&amp;nbsp;
; Documentation: http://php.net/manual/ru/opcache.configuration.php
php_flag[opcache.enable] = &lt;span class=&quot;es2&quot;&gt;$PHP_OPCACHE&lt;/span&gt;
php_flag[opcache.enable_cli] = &lt;span class=&quot;es2&quot;&gt;$PHP_OPCACHE&lt;/span&gt;
&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$php_config&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;/etc/php/&lt;span class=&quot;es3&quot;&gt;${PHP}&lt;/span&gt;/fpm/pool.d/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.conf&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$LOCK&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;lock&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;
auth_basic &lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;Website development&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;;
auth_basic_user_file /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/authfile;
&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;lock&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re2&quot;&gt;main&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;
                                # With PHP-FPM
                                location / {
                                                index index.php;
                                                try_files &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri/ /index.php?&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;query_string;
                                }
&amp;nbsp;
                                # PHP fastcgi
                                location ~ \.php {
                                                #try_files &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri =404;
                                                include fastcgi_params;
                                                # Use your own port of fastcgi here
                                                #fastcgi_pass 127.0.0.1:9000;
                                                &lt;span class=&quot;es3&quot;&gt;${lock}&lt;/span&gt;
                                                fastcgi_pass unix:/var/run/php-fpm-&lt;span class=&quot;es3&quot;&gt;${PHP}&lt;/span&gt;-&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.sock;
                                                fastcgi_index index.php;
                                                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                                                fastcgi_param PATH_INFO &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;fastcgi_path_info;
                                                fastcgi_param SCRIPT_FILENAME &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;document_root&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;fastcgi_script_name;
                                }
&amp;quot;&lt;/span&gt;
		&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$AWSTATS&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;awstats&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;# Awstats
                                server {
                                listen &lt;span class=&quot;es3&quot;&gt;${site_addr}&lt;/span&gt;;
                                server_name  awstats.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;;
&amp;nbsp;
                                auth_basic            &lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;Restricted&lt;span class=&quot;es1&quot;&gt;\&amp;quot;&lt;/span&gt;;
                                auth_basic_user_file  /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/authfile;
&amp;nbsp;
                                access_log /var/log/nginx/access.awstats.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.log;
                                error_log /var/log/nginx/error.awstats.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.log;
&amp;nbsp;
                                location / {
                                                root   /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/awstats/;
                                                index  awstats.html;
                                                access_log off;
                                }
&amp;nbsp;
                                location  /awstats-icon/ {
                                                alias  /usr/share/awstats/icon/;
                                                access_log off;
                                }
&amp;nbsp;
                                # apt-get awstats install
                                location ~ ^/cgi-bin {
                                                access_log off;
                                                fastcgi_pass   unix:/var/run/fcgiwrap.socket;
                                                include /etc/nginx/fastcgi_params;
                                                fastcgi_param  SCRIPT_FILENAME  /usr/lib&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;fastcgi_script_name;
                                }
                                }
&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;awstats&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REDIRECT&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;site-www&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;redirect&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;
                                # Rerirect &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
                                server {
                                                listen &lt;span class=&quot;es3&quot;&gt;${site_addr}&lt;/span&gt;;
                                                server_name &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;;
                                                return 301 http://www.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;request_uri;
                                }
&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;server_name&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;www.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;				
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REDIRECT&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;www-site&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;redirect&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;
# Rerirect www.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;
server {
                                listen &lt;span class=&quot;es3&quot;&gt;${site_addr}&lt;/span&gt;;
                                server_name www.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;;
                                return 301 http://&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;request_uri;
}
&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;server_name&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REDIRECT&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;off&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;redirect&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;server_name&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;
&lt;span class=&quot;es3&quot;&gt;${awstats}&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;es3&quot;&gt;${redirect}&lt;/span&gt;
&amp;nbsp;
# Site &lt;span class=&quot;es3&quot;&gt;${server_name}&lt;/span&gt;
server {
                                listen &lt;span class=&quot;es3&quot;&gt;${site_addr}&lt;/span&gt;;
                                server_name &lt;span class=&quot;es3&quot;&gt;${server_name}&lt;/span&gt; &lt;span class=&quot;es3&quot;&gt;${site_alias}&lt;/span&gt;;
                                root /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/httpdocs/web;
                                index index.php;
                                access_log /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/logs/access.log;
                                error_log  /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/logs/error.log error;
                                charset utf-8;
                                #charset        windows-1251;
                                location = /favicon.ico {
                                                log_not_found off;
                                                access_log off;
                                                break;
                                }
                                location = /robots.txt {
                                                allow all;
                                                log_not_found off;
                                                access_log off;
                                }
                                &lt;span class=&quot;es3&quot;&gt;${main}&lt;/span&gt;
                                location ~ /(protected|themes/\w+/views)/ {
                                                access_log off;
                                                log_not_found off;
                                                return 404;
                                }
                                #
                                location ~ \.(xml)&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt; {
                                                expires 24h;
                                                charset windows-1251;
                                                #log_not_found off;
                                                #try_files &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri =404;
                                                #try_files &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri/ /index.php?&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;query_string;
                                }
                                #
                                location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt; {
                                                expires 24h;
                                                #log_not_found off;
                                                #try_files &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri =404;
                                                try_files &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri &lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;uri/ /index.php?&lt;span class=&quot;es1&quot;&gt;\$&lt;/span&gt;query_string;
                                }
&amp;nbsp;
                                # Hide all system files
                                location  ~ /\. {
                                                deny  all;
                                                access_log off;
                                                log_not_found off;
                                }
}
&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;nginx&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;conf.d&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;${site_name}&lt;/span&gt;.conf
&amp;nbsp;
				service php&lt;span class=&quot;co1&quot;&gt;${PHP}&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;-fpm&lt;/span&gt; reload
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$APACHE&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          service apache2 reload
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
        service nginx reload
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;--------------------------------------------------------&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;User: &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Login: &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Password: &lt;span class=&quot;es3&quot;&gt;${password}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Path: /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SSH Private file: /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/.ssh/id_rsa&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SSH Public file: /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/.ssh/id_rsa.pub&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Servers:&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Site name: &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt; (&lt;span class=&quot;es3&quot;&gt;${IP}&lt;/span&gt;)&amp;quot;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$site_alias&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Site alias: &lt;span class=&quot;es3&quot;&gt;${site_alias}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REDIRECT&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;site-www&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Use redirect from &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt; to &lt;span class=&quot;es3&quot;&gt;${server_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;				
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REDIRECT&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;www-site&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Use redirect from &lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt; to &lt;span class=&quot;es3&quot;&gt;${server_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$REDIRECT&lt;/span&gt; = &lt;span class=&quot;st_h&quot;&gt;&#039;off&#039;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Redirect disabled. use only &lt;span class=&quot;es3&quot;&gt;${server_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Site root: /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/httpdocs/web&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Site logs path: /home/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;/logs&amp;quot;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$APACHE&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Back-end server: Apache 2&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;NGINX: /etc/nginx/conf.d/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.conf&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;APACHE: /etc/apache2/sites-enabled/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.conf&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Back-end server: PHP-FPM&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;NGINX: /etc/nginx/conf.d/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.conf&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;PHP-FPM: /etc/php/&lt;span class=&quot;es3&quot;&gt;${PHP}&lt;/span&gt;/fpm/pool.d/&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.conf&amp;quot;&lt;/span&gt;  
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;unixsock: /var/run/php-fpm-&lt;span class=&quot;es3&quot;&gt;${PHP}&lt;/span&gt;-&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;.sock&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$LOCK&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Web auth: admin &lt;span class=&quot;es3&quot;&gt;${authpassword}&lt;/span&gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$AWSTATS&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Statistic:&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;awstats.&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt;&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Add crontab task: */20 * * * * /usr/lib/cgi-bin/awstats.pl -config=&lt;span class=&quot;es3&quot;&gt;${site_name}&lt;/span&gt; -update &amp;gt; /dev/null&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;--------------------------------------------------------&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
usage&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;&amp;lt;&amp;lt; EOF
usage: $0 options
&amp;nbsp;
This script create settings files for nginx, php-fpm (ver: 5, 7), apache2, awstats.
&amp;nbsp;
OPTIONS:
   --host=                  Host name without www (Example: --host=myhost.com)
   --ip=                    IP address, default usage 80 (Example: --ip=127.0.0.1:8080)
   --redirect=              WWW redirect add (Example: --redirect=www-site or --redirect=site-www or disable redirect --redirect=off)
   --alias=                 Set Nginx alias (Examle: --alias=&amp;quot;alias1 alias2 etc&amp;quot;)
   --apache                 Usage apache back-end
   --awstats                Usage awstats
   --dont-change-password   Usage for change user password (Default: 1. Usage only for update)
   -5 | --php5              Usage PHP 5.x
   -7 | --php7              Usage PHP 7.0
   -71 | --php71            Usage PHP 7.1
   -72 | --php72            Usage PHP 7.2
   -73 | --php73            Usage PHP 7.3
   -74 | --php74            Usage PHP 7.4         
   -l | --lock              Usage Nginx HTTP Auth basic	 
   -h | --help              Usage
&amp;nbsp;
EXAMPLES:
   bash site-create.sh --host=&amp;quot;mirocow.com&amp;quot; --ip=&amp;quot;192.168.1.131:8082&amp;quot;
   bash site-create.sh --host=&amp;quot;mirocow.com&amp;quot; --alias=&amp;quot;c1.mirocow.com c2.mirocow.com&amp;quot; --php73
&amp;nbsp;
EOF&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;SET_PASSWORD&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;HTTPS&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;REDIRECT&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;site-www&#039;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;LOCK&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;HOST&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;ALIAS&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;APACHE&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;AWSTATS&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;7.2&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;PHP_OPCACHE&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;Off&#039;&lt;/span&gt;
&lt;span class=&quot;re2&quot;&gt;IP&lt;/span&gt;=$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;trim $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;hostname&lt;/span&gt; -I&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;80&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;$@&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$i&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;		
        &lt;span class=&quot;re5&quot;&gt;--host&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;HOST&lt;/span&gt;=&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${i#*=}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;--alias&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;ALIAS&lt;/span&gt;=&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${i#*=}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;				
        &lt;span class=&quot;re5&quot;&gt;--ip&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;IP&lt;/span&gt;=&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${i#*=}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;--redirect&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;REDIRECT&lt;/span&gt;=&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es3&quot;&gt;${i#*=}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        --https&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;HTTPS&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        --apache&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;APACHE&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        --dont-change-password&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;SET_PASSWORD&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-l&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --lock&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;LOCK&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-5&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php5&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;5.6&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-7&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php7&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;7.0&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-71&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php71&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;7.1&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-72&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php72&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;7.2&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-73&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php73&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;7.3&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-74&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php74&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;7.4&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;        
        &lt;span class=&quot;re5&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --php-opcache&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;PHP_OPCACHE&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;&#039;On&#039;&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;	
        &lt;span class=&quot;re5&quot;&gt;-w&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --awstats&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;re2&quot;&gt;AWSTATS&lt;/span&gt;=&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;shift&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;re5&quot;&gt;-h&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; --help&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            usage
            &lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;co0&quot;&gt;# unknown option&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;esac&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# === AUTORUN ===&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es2&quot;&gt;$HOST&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
  create_site
&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
  usage
&lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Server install&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;server_install&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;31-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:squeeze">
        <dc:format>text/html</dc:format>
        <dc:date>2016-02-16T14:28:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Squeeze</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:squeeze</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:repository&amp;amp;do=showtag&amp;amp;tag=repository&quot; class=&quot;wikilink1&quot; title=&quot;tag:repository&quot; rel=&quot;tag&quot;&gt;repository&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;squeeze&quot;&gt;Squeeze&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;deb http://ftp.pl.debian.org/debian stable main contrib
deb-src http://ftp.pl.debian.org/debian stable main contrib

deb http://ftp.debian.org/debian/ squeeze-updates main contrib
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib

deb http://security.debian.org/ squeeze/updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Squeeze&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;squeeze&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;27-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:start">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-17T02:00:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title></title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:start</link>
        <description>&lt;div class=&quot;noteredirect&quot;&gt;Страница была перемещена по адресу &lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=os:debian&quot; class=&quot;wikilink1&quot; title=&quot;os:debian&quot; data-wiki-id=&quot;os:debian&quot;&gt;Debian, Ubuntu&lt;/a&gt;.&lt;/div&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:stretch">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-20T17:48:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Stretch</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:stretch</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;stretch&quot;&gt;Stretch&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;# deb http://mirror.selectel.ru/debian stretch main

deb http://mirror.selectel.ru/debian stretch main non-free contrib
deb-src http://mirror.selectel.ru/debian stretch main non-free contrib

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free&lt;/pre&gt;

&lt;/div&gt;
</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:update-alternatives">
        <dc:format>text/html</dc:format>
        <dc:date>2014-01-07T04:33:54+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>update-alternatives</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:update-alternatives</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;update-alternatives&quot;&gt;update-alternatives&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives –display [link]
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives [опции] –install link name path priority [–slave link name path] …
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives [опции] –remove name path
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives [опции] –auto name
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives [опции] –display name
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 upzate-alternatives [опции] –config name
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;update-alternatives&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;update-alternatives&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-384&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;config&quot;&gt;config&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives –all
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 update-alternatives –config [link]
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;config&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;config&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;385-475&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;link&quot;&gt;link&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 editor - редактор текста (типа nano, vi, vim, emacs)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 ftp - ftp-клиент
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 x-cursor-theme - тема курсора
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 x-session-manager - графическая сессия (kde, gnome, openbox)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 x-terminal-emulator - эмулятор терминала
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 x-window-manager - оконный менеджер (kwin, metacity, openbox)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 x-www-browser - веб-браузер
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 итд
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class=&quot;code&quot;&gt;Полный список доступен по адресу /etc/alternatives&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;link&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;link&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;476-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:usb-flash">
        <dc:format>text/html</dc:format>
        <dc:date>2019-11-09T23:00:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Создание загрузочной USB Flash на Linux</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:usb-flash</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:usb&amp;amp;do=showtag&amp;amp;tag=usb&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:usb&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; usb&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:iso&amp;amp;do=showtag&amp;amp;tag=iso&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:iso&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; iso&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:flash&amp;amp;do=showtag&amp;amp;tag=flash&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:flash&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; flash&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; linux&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;создание_загрузочной_usb_flash_на_linux&quot;&gt;Создание загрузочной USB Flash на Linux&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439 USB Flash \u043d\u0430 Linux&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435_\u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439_usb_flash_\u043d\u0430_linux&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;30-105&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;й_способ&quot;&gt;1-й Способ&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 zcat boot.img.gz &amp;gt; /dev/sdX - соответствует выбранной &lt;a href=&quot;http://http.us.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/&quot; class=&quot;urlextern&quot; title=&quot;http://http.us.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/&quot; rel=&quot;ugc nofollow&quot;&gt;архитектуре&lt;/a&gt; 
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 mount /dev/sdX /mnt
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 cp &amp;lt;path/to/iso/image&amp;gt; /mnt - выбранный дистрибутив (рекомендуется брать netinstall)
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 umount /dev/sdX
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class=&quot;code&quot;&gt;где X - это номер устройства&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;1-\u0439 \u0421\u043f\u043e\u0441\u043e\u0431&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0439_\u0441\u043f\u043e\u0441\u043e\u0431&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;106-562&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;й_способ1&quot;&gt;2-й Способ&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code bash&quot;&gt;$ hdiutil convert &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;path&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;to&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;downloaded.iso &lt;span class=&quot;re5&quot;&gt;-format&lt;/span&gt; UDRW &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;path&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;to&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;newimage
$ diskutil list
$ diskutil unmountDisk &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;diskX
$ &lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;dd&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;if&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;path&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;to&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;newimage.dmg &lt;span class=&quot;re2&quot;&gt;of&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;dev&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;diskN &lt;span class=&quot;re2&quot;&gt;bs&lt;/span&gt;=1m&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;2-\u0439 \u0421\u043f\u043e\u0441\u043e\u0431&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0439_\u0441\u043f\u043e\u0441\u043e\u04311&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;563-794&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;й_способ2&quot;&gt;3-й Способ&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Или воспользоваться &lt;a href=&quot;http://sourceforge.net/projects/unetbootin&quot; class=&quot;urlextern&quot; title=&quot;http://sourceforge.net/projects/unetbootin&quot; rel=&quot;ugc nofollow&quot;&gt;unetbootin&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;3-\u0439 \u0421\u043f\u043e\u0441\u043e\u0431&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0439_\u0441\u043f\u043e\u0441\u043e\u04312&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;795-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:wheezy">
        <dc:format>text/html</dc:format>
        <dc:date>2016-02-16T14:29:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Wheezy</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:wheezy</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:linux&amp;amp;do=showtag&amp;amp;tag=linux&quot; class=&quot;wikilink1&quot; title=&quot;tag:linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:repository&amp;amp;do=showtag&amp;amp;tag=repository&quot; class=&quot;wikilink1&quot; title=&quot;tag:repository&quot; rel=&quot;tag&quot;&gt;repository&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;wheezy&quot;&gt;Wheezy&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;pre class=&quot;code&quot;&gt;deb http://ftp.pl.debian.org/debian stable main contrib
deb-src http://ftp.pl.debian.org/debian stable main contrib

deb http://ftp.pl.debian.org/debian wheezy main contrib
deb-src http://ftp.pl.debian.org/debian wheezy main contrib

deb http://ftp.pl.debian.org/debian wheezy-updates main contrib
deb-src http://ftp.pl.debian.org/debian wheezy-updates main contrib

deb http://ftp.pl.debian.org/debian wheezy-backports main contrib
deb-src http://ftp.pl.debian.org/debian wheezy-updates main contrib&lt;/pre&gt;
&lt;pre class=&quot;code&quot;&gt;#deb http://ftp.pl.debian.org/debian/ sid main contrib
#deb http://ftp.pl.debian.org/debian/ experimental main contrib&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Wheezy&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;wheezy&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;27-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=debian:xfce">
        <dc:format>text/html</dc:format>
        <dc:date>2013-02-22T00:56:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Xfce</title>
        <link>http://178.140.10.58:8080/doku.php?id=debian:xfce</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;xfce&quot;&gt;Xfce&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Xfce&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;xfce&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-20&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;обновление&quot;&gt;Обновление&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 xfce 4.10.0 update &lt;a href=&quot;http://crunchbang.org/forums/viewtopic.php?id=21324&quot; class=&quot;urlextern&quot; title=&quot;http://crunchbang.org/forums/viewtopic.php?id=21324&quot; rel=&quot;ugc nofollow&quot;&gt;http://crunchbang.org/forums/viewtopic.php?id=21324&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;21-129&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;ссылки&quot;&gt;Ссылки&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://habrahabr.ru/post/143009/&quot; class=&quot;urlextern&quot; title=&quot;http://habrahabr.ru/post/143009/&quot; rel=&quot;ugc nofollow&quot;&gt;http://habrahabr.ru/post/143009/&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://habrahabr.ru/post/139922/&quot; class=&quot;urlextern&quot; title=&quot;http://habrahabr.ru/post/139922/&quot; rel=&quot;ugc nofollow&quot;&gt;http://habrahabr.ru/post/139922/&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u0441\u044b\u043b\u043a\u0438&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u0441\u044b\u043b\u043a\u0438&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;130-&amp;quot;} --&gt;</description>
    </item>
</rdf:RDF>
