2024. április 16., kedd

Gyorskeresés

Munin dynazoom és Apache tuning

Írta: |

[ ÚJ BEJEGYZÉS ]

Ez a téma is egy régi fekete folt amit szerettem volna eltüntetni. Igazából ez Apache/Munin hangolása.
Kizárólag a dynazoom beindítása érdekelt. A security, és a plugin-nek száma most nem igazán volt fontos.
Bár a "cpuspeed" Arch-on helyből nem megy. Kis birkózással beindítható, de az sokkal többet mutat mint a Mint. :)
A debiánosok is visszarakták a kernelbe a megfelelő részt, én ezt nem tudom megígérni nektek.
Érdekes, de egyben bosszantó is volt, hogy a demóban működik viszont
a beidításáról nem találtam csak foszlányokat. Jó, kezdő vagyok talán azért. Mindig hangoztatom amatőrségemet,
ezért is igaz rám a jó pap holtig tanul mondás. Lassan tisztult a kép, és ma már úgy látom, hogy hajszálnyi különbség van
a linux verziók között. Az alapötletet egy debian clone-ból vettem, és itt egy Arch-on lesz bemutatva. Az Arch filozófiát
követve nem sok magyarázatot raktam be. A megfelelő Arch oldalakon a kódok magyarázata megtalálható.
Ha majd egyszer derűsebben látom a világot, és esetleg lesz érdeklődés akkor kiegészítem egy Linux Mint verzióval is.
Ott azért sokkal könnyebb. Következzen a tömény kód. :)
Még valamit a kódról. Ez egy út, de nem az egyetlen. Aki a lényeget megfogta az érti.
A log file-ok pedig nagyon fontosak, és sok segítséget adnak a tesztelés/hibakereséshez.
Némelyik törölhető, de én megtartom mind.

sudo pacman -S cronie
sudo pacman -S apache
sudo pacman -S munin
sudo munin-node-configure --suggest
sudo su
munin-node-configure --shell | sh
mkdir /srv/http/munin
chown munin:munin /srv/http/munin
chown root:munin /var/log ### Because many plugins read log files, it is useful to add munin user into log group.
chown root:http /srv/http ### Itt ez feleslegesnek tűnik, de nem az.

httpd.conf enable

(Az apache update alkalmával httpd.conf_new vagy httpd.conf.new verziót kapunk és a régit
meghagyja. Tehát magadnak kell kézzel befejezni a frissítést.)

LoadModule cgid_module modules/mod_cgid.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule rewrite_module modules/mod_rewrite.so

httpd.conf insert

Alias /munin /srv/http/munin
<Directory /srv/http/munin>
Require all granted
Options None
</Directory>

ScriptAlias /munin-cgi/munin-cgi-graph /usr/share/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Require all granted
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Location>

# sudo dolphin sudo nano /etc/httpd/conf/httpd.conf jobb klikk Root Actions/Open as Text

munin.conf enable

dbdir /var/lib/munin
htmldir /srv/http/munin
logdir /var/log/munin
rundir /run/munin
tmpldir /etc/munin/templates
staticdir /etc/munin/static
cgitmpdir /var/lib/munin/cgi-tmp

crontab /etc/munin/munin-cron-entry -u munin
systemctl start cronie.service # start, stop, enable, reload, status, enable, restart
systemctl start httpd.service # start, stop, enable, reload, status, enable, restart
systemctl start munin-node.service # start, stop, enable, reload, status, enable, restart
su munin --shell=/bin/bash ### test
munin-cron
exit
systemctl enable cronie.service # start, stop, enable, reload, status, enable, restart
systemctl enable httpd.service # start, stop, enable, reload, status, enable, restart
# Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
systemctl enable munin-node.service # start, stop, enable, reload, status, enable, restart
# cp plugin /usr/lib/munin/plugins/
# ln -s /usr/lib/munin/plugins/plugin /etc/munin/plugins/

dynazoom ### brogyi gumi csontja :)

Az apache conf átalakítása szinte kizárólag a cgi miatt történt.

you need to install the CGI::Fast module

cpan
yes
install CGI::Fast
q
touch /var/log/munin/munin-cgi-graph.log
chown munin:http /var/log/munin/munin-cgi-graph.log
chmod 664 /var/log/munin/munin-cgi-graph.log
chown munin:http /var/lib/munin/cgi-tmp
chmod 775 /var/lib/munin/cgi-tmp
exit

Copyright © 2000-2024 PROHARDVER Informatikai Kft.