Rubrika
Linux
-
tmpwatch example
Tmpwatch is linux tool to automate temporary file cleanup. When you need examples for your inspiration try this example: Delete older files than 48 hours: tmpwatch -m 48 /var/www/cache/ Delete older files haven’t been accessed 30 days: tmpwatch 30d /var/www/cache/…
-
Instalace vsftpd na CentOS7 s podporou virtuálních uživatelů
A protože na centos7 je lecos jinak než na starších verzích, tak si tu pro jistotu sepíšu jak správně nainstalovat vsftpd server. 1. Nejprve uděláme aktualizaci celého systému (je to dobrá praktika): yum -y update 2. Nainstalujeme vsftpd: yum -y…
-
Missing comand in Centos7
You install new centos7 and yours classic command missing? Here is small list of lost commands and new alternatives: ifconfig alternative: ip addr or install ifconfig: yum install net-tools service httpd restart alternative: systemctl restart httpd.service chkconfig servicename on/off alternative:…
-
Selinux - allow fwrite php in centos7
How to allow fwrite php command in centos7? You must set exact directory for writing. ( e.g. cache dir ): semanage fcontext -a -t 'httpd_cache_t' '/path/to/www/cache(/.*)?' restorecon -Rv /path/to/www/cache Tip: do not disabling Selinux ! Is good reasons for prevent…
-
Jak změnit port pro ssh v centos7/redhat7
To, že vám za kliku u vašeho ssh přístupu na serveru za hodinu veme i několik stovek bad-botů vás možná dost zneklidní když to zjistíte. Jak se tomuto vyhnout a mít klid alespoň před necílenými útoky? Stačí změnit port pro…