Menu
Menu

Install kernel headers

Posted in Cum sa on iunie 14, 2015

Instalare kernel headers centos yum install kernel-devel Pentru kernelul curent, pe care s-a bootat yum install kernel-devel-$(uname -r)

Setare gateway CentOS

Posted in Cum sa on iunie 11, 2015

ip route replace default via 192.168.0.1 dev eth0 Verificam cu ip route show

Curatare fisiere php cu prima linie modificata

Posted in Cum sa on mai 27, 2015

Un pic de bash + perl find . -type f -name \*.php -exec grep -rl 'isset($GLOBALS' {} \; |xargs -i -n 1 perl -pi -e "s/^<\?php.+isset\(\$GLOBALS.*$/\<\?php/g" {}find . -type f -name \*.php -exec grep -rl 'isset($GLOBALS' {} \; |xargs -i -n 1 perl -pi -e "s/^<\?php.+isset\(\$GLOBALS.*$/\<\?php/g" {} Ce face - cauta in toate fisierele php Read More »

Sincronizare ceas din terminal Windows Server

Posted in Cum sa on mai 4, 2015

w32tm /config /syncfromflags:manual /manualpeerlist:time.windows.com /updatew32tm /config /syncfromflags:manual /manualpeerlist:time.windows.com /update

SymLinks ClamAV pe servere cu cPanel

Posted in Cum sa on aprilie 14, 2015

ClamAV instalat de cpanel se afla in /usr/local/cpanel/3rdparty/bin/ ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclam ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan ln -s /usr/local/cpanel/3rdparty/bin/clamd /usr/local/bin/clamd ln -s /usr/local/cpanel/3rdparty/bin/clamav-config /usr/local/bin/clamav-config

Instalare clamav pe servere cu cPanel din consola

Posted in Cum sa on aprilie 14, 2015

/scripts/update_local_rpm_versions --edit target_settings.clamav installed /scripts/check_cpanel_rpms --fix --targets=clamav

Administrare conturi email in Plesk via CLI

Posted in Cum sa on decembrie 28, 2014

Plesk permite administrarea conturilor de email direct din terminal via: /usr/local/psa/bin/mail Cele mai importante comenzi: --create or -c @ creates mail account --update or -u @ updates mail account parameters --remove or -r @ removes mail account --info or -i @ retrieves mail account information --on enables mail service for domain --off disables mail service Read More »

Livrare email catre mx-uri ip

Posted in Cum sa on decembrie 10, 2014

La domenii de China am intalnit frecvent setat ca mx direct ip. Pentru a putea trimite email-uri catre aceste servere modificam in exim.conf: allow_mx_to_ip = yes

Package which is newer than xxx is already installed

Posted in Cum sa on octombrie 2, 2014

Putem folosi optiunea --oldpackage rpm -Uvh --oldpackage kernel-xxx.rpmrpm -Uvh --oldpackage kernel-xxx.rpm

Firewall CSF pe servere cu OpenVZ

Posted in Cum sa on august 25, 2014

Cream fisierul: /etc/csf/csfpre.sh cu urmatorul continut /sbin/iptables -A INPUT -i venet0 -j ACCEPT /sbin/iptables -A OUTPUT -o venet0 -j ACCEPT /sbin/iptables -A FORWARD -j ACCEPT -p all -s 0/0 -i venet0 /sbin/iptables -A FORWARD -j ACCEPT -p all -s 0/0 -o venet0/sbin/iptables -A INPUT -i venet0 -j ACCEPT /sbin/iptables -A OUTPUT -o venet0 -j ACCEPT Read More »