{"id":31,"date":"2019-07-02T14:03:48","date_gmt":"2019-07-02T14:03:48","guid":{"rendered":"https:\/\/silviamarin.ro\/?p=30"},"modified":"2019-07-02T14:03:48","modified_gmt":"2019-07-02T14:03:48","slug":"instalare-webmin-2","status":"publish","type":"post","link":"https:\/\/marinelvis.xyz\/index.php\/2019\/07\/02\/instalare-webmin-2\/","title":{"rendered":"INSTALARE WEBMIN"},"content":{"rendered":"<p>Se instaleaza <em>gnupg2<\/em>:<\/p>\n<pre>apt install gnupg2 -y<\/pre>\n<p>Se introduc sursele in fisierul <em>sources.list<\/em>:<\/p>\n<pre>echo \"deb http:\/\/download.webmin.com\/download\/newkey\/repository stable contrib\" | tee -a \/etc\/apt\/sources.list<\/pre>\n<p>Se instaleaza si se actualizeaza cheia de criptare :<\/p>\n<pre>wget http:\/\/www.webmin.com\/jcameron-key.asc &amp;&amp; apt-key add jcameron-key.asc\ngpg --no-default-keyring --keyring .\/webmin_keyring.gpg --import jcameron-key.asc\ngpg --no-default-keyring --keyring .\/webmin_keyring.gpg --export &gt; .\/webmin-archive-keyring.gpg\nmv .\/webmin-archive-keyring.gpg \/etc\/apt\/trusted.gpg.d\/<\/pre>\n<p>Se actualizeaza depozitul software si se instaleaza Webmin :<\/p>\n<pre>apt-get update &amp;&amp; apt-get install -y webmin<\/pre>\n<p>Sau:<\/p>\n<pre>curl -o setup-repos.sh https:\/\/raw.githubusercontent.com\/webmin\/webmin\/master\/setup-repos.sh\nsh setup-repos.sh\napt-get install --install-recommends webmin<\/pre>\n<p>Se acceseaza Webmin la adresa:<br \/>\n<em>https:\/\/192.168.0.200:10000<\/em><br \/>\nSe schimba tema in<em> gray-framed-theme.\u00a0<\/em>Daca butoanele nu sunt active se deschide <em>miniserv.conf<\/em>:<\/p>\n<pre>nano \/etc\/webmin\/miniserv.conf<\/pre>\n<p>Se modifica linia <em>&#8222;preroot_root=authentic-theme&#8221;<\/em> in <em>&#8222;preroot_root=gray-theme&#8221;<\/em><br \/>\nSe salveaza si se reporneste Webmin:<\/p>\n<pre>systemctl restart webmin.service<\/pre>\n<p>Se seteaza Webmin in limba romana apoi se instaleaza modulele third-party de aici<br \/>\nSe seteaza comenzi personalizate in <em>Altele \u2013 Custom Commands<\/em>:<\/p>\n<blockquote><p><em>chmod:\u00a0 \u00a0 chmod 777 -R \/mnt &amp;&amp; chown -R nobody:nogroup \/mnt<\/em><br \/>\n<em>chmod elvis:\u00a0 \u00a0 chmod 777 -R \/mnt &amp;&amp; chown -R elvis:root \/mnt<\/em><br \/>\n<em>spatiu partitii:\u00a0\u00a0\u00a0 df -h | grep \/dev<\/em><br \/>\n<em>elibereaza memoria virtuala:\u00a0\u00a0\u00a0 sync &amp;&amp; echo 3 &gt; \/proc\/sys\/vm\/drop_caches<\/em><br \/>\n<em>Let&#8217;s Encrypt:\u00a0 \u00a0 certbot certificates<\/em><br \/>\n<em>start Node-Red:\u00a0 \u00a0 node-red<\/em><br \/>\n<em>start SickChill:\u00a0 \u00a0 \/opt\/sickchill\/SickBeard.py<\/em><br \/>\n<em>creaza symlink draft:\u00a0 \u00a0 cp -as \/mnt\/SERIALE \/var\/www<\/em><br \/>\n<em>delete broken symlink:\u00a0 \u00a0 find -L \/var\/www -type l -delete<\/em><\/p><\/blockquote>\n<p>Comanda \u201cdelete broken symlink\u201d sterge symlink-urile fara corespondent dar nu sterge directoare si subdirectoare<br \/>\nSe creeaza scriptul pentru rularea periodica a comenzii <em>chmod<\/em>:<\/p>\n<pre>nano \/root\/chmod.sh<\/pre>\n<p>Se introduce comanda:<\/p>\n<blockquote><p><em>chmod 777 -R \/mnt &amp;&amp; chown -R nobody:nogroup \/mnt<\/em><\/p><\/blockquote>\n<p>Se transforma in executabil:<\/p>\n<pre>chmod +x \/root\/chmod.sh<\/pre>\n<p>Se editeaza fisierul <em>crontab<\/em> pentru rularea la fiecare 5 minute a scriptului:<\/p>\n<pre>crontab -e<\/pre>\n<p>Se introduce linia:<\/p>\n<blockquote><p><em>*\/5 * * * * \/root\/chmod.sh &gt; \/dev\/null 2&gt;&gt; \/var\/log\/cron.log<\/em><\/p><\/blockquote>\n<p>Se salveaza si se inchide fisierul.<\/p>\n<p>Pentru <em>wake on lan<\/em>:<br \/>\nPe calculatorul tinta se instaleaza <em>ethtool<\/em>:<\/p>\n<pre>apt install ethtool -y<\/pre>\n<p>Se determina interfata de retea:<\/p>\n<pre>ip a<\/pre>\n<p>Rezultatul este de forma:<\/p>\n<blockquote><p><em>&#8230;.<\/em><br \/>\n<em>2: enp1s0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt;<\/em><br \/>\n<em>&#8230;.<\/em><\/p><\/blockquote>\n<p>Interfata de retea este <em>enp1s0<\/em>.<br \/>\nSe activeaza placa de retea pentru <em>wake on lan<\/em>:<\/p>\n<pre>ethtool --change enp1s0 wol g<\/pre>\n<p>Se verifica cu<\/p>\n<pre>ethtool enp1s0<\/pre>\n<p>Trebuie sa apara:<\/p>\n<blockquote><p><em>Wake-on: g<\/em><\/p><\/blockquote>\n<p>Pe calculatorul de pe care se trimite comanda se instaleaza <em>etherwake<\/em> si <em>wakeonlan<\/em>:<\/p>\n<pre>apt install etherwake wakeonlan -y<\/pre>\n<p>Comanda de pornire a calculatorului tinta este:<\/p>\n<pre>wakeonlan xx:yy:zz:11:22:33<\/pre>\n<p>unde <em>xx:yy:zz:11:22:33<\/em> este adresa MAC<\/p>\n<p>Optional se instaleaza <em>Stunnel<\/em> pentru conexiuni securizate:<br \/>\n<em>Webmin -&gt; Sistem -&gt; Software Packages -&gt; Package from APT<\/em><br \/>\nSe introduce <em>stunnel<\/em> apoi click pe <em>Search APT<\/em><br \/>\nIn noua fereastra se introduce din nou <em>stunnel<\/em> apoi <em>Enter,<\/em>\u00a0se selecteaza <em>stunnel<\/em> din pachetele afisate apoi <em>Install<\/em><br \/>\nSimilar se instaleaza si <em>Xinetd<\/em> cu care functioneaza <em>Stunnel<\/em><br \/>\nSe activeaza modulul in <em>Webmin -&gt; Un-used modules<\/em><br \/>\nLa folosirea modulului se corecteaza calea <em>\/usr\/sbin<\/em> in <em>usr\/bin\/stunnel4<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Se instaleaza gnupg2: apt install gnupg2 -y Se introduc sursele in fisierul sources.list: echo &#8222;deb http:\/\/download.webmin.com\/download\/newkey\/repository stable contrib&#8221; | tee -a \/etc\/apt\/sources.list Se instaleaza si se actualizeaza cheia de criptare : wget http:\/\/www.webmin.com\/jcameron-key.asc &amp;&amp; apt-key add jcameron-key.asc gpg &#8211;no-default-keyring &#8211;keyring .\/webmin_keyring.gpg &#8211;import jcameron-key.asc gpg &#8211;no-default-keyring &#8211;keyring .\/webmin_keyring.gpg &#8211;export &gt; .\/webmin-archive-keyring.gpg mv .\/webmin-archive-keyring.gpg \/etc\/apt\/trusted.gpg.d\/ Se actualizeaza [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-fara-categorie"],"_links":{"self":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}