- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:skoleni:start [2014/06/24 13:54] admin |
linux:skoleni:start [2014/06/27 09:26] (current) vondra [Bonus] |
||
---|---|---|---|
Line 141: | Line 141: | ||
====== pure-ftpd-mysql ======= | ====== pure-ftpd-mysql ======= | ||
apt-get install pure-ftpd-mysql | apt-get install pure-ftpd-mysql | ||
+ | <code> | ||
+ | mysql> use ftp | ||
+ | Database changed | ||
+ | mysql> create table ftp ( | ||
+ | -> name char(20), | ||
+ | -> pass char(20), | ||
+ | -> uid int, | ||
+ | -> gid int, | ||
+ | -> dir char(50) | ||
+ | -> ); | ||
+ | </code> | ||
| | ||
- | | + | ====== Mereni a ladeni vykonu ====== |
+ | <code> | ||
+ | vi /etc/collectd/collectd.conf | ||
+ | |||
+ | locate collection.cgi | ||
+ | /usr/share/doc/collectd-core/examples/collection.cgi | ||
+ | cp /usr/share/doc/collectd-core/examples/collection.cgi /usr/lib/cgi-bin/ | ||
+ | </code> | ||
+ | ===== MRTG a SNMPd ===== | ||
+ | <file bash /etc/snmp/snmpd.conf> | ||
+ | # sec.name source community | ||
+ | com2sec readonly default public | ||
+ | |||
+ | # GrupnSex.Name sec.model sec.name | ||
+ | group MyROGroup v1 readonly | ||
+ | group MyROGroup v2c readonly | ||
+ | group MyROGroup usm readonly | ||
+ | |||
+ | # incl/excl subtree mask | ||
+ | view all included .1 80 | ||
+ | |||
+ | # context sec.model sec.level match read write notif | ||
+ | access MyROGroup "" any noauth exact all none none | ||
+ | </file> | ||
+ | |||
+ | cfgmaker --zero-speed=1000000000 public@127.0.0.1 >/etc/mrtg.cfg | ||
+ | |||
+ | Rucni spusteni mrtg misto /etc/cron.d/mrtg | ||
+ | env LANG=C /usr/bin/mrtg /etc/mrtg.cfg | ||
+ | |||
+ | ===== Firewall Iptables ====== | ||
+ | tcpdump -i eth0 -n tcp port 25 | ||
+ | |||
+ | indexmaker /etc/mrtg.cfg >/var/www/mrtg/index.html | ||
+ | |||
+ | ====== Bonus ====== | ||
+ | <code> | ||
+ | cat nagiclick | ||
+ | export DISPLAY=:0.0 | ||
+ | WID=$(xdotool search nagios) | ||
+ | xdotool windowactivate --sync $WID | ||
+ | sleep 0.5 | ||
+ | xdotool key --window $WID F5 | ||
+ | sleep 0.5 | ||
+ | # next line needs tweaking when nagios changes its layout - XY coordinates of the click | ||
+ | xdotool mousemove --sync 50 330 | ||
+ | sleep 0.5 | ||
+ | xdotool click 1 | ||
+ | </code> |
linux/skoleni/start.1403610879.txt.gz · Last modified: 2014/06/24 13:54 by admin