Wednesday, July 15, 2015

MYSQLDUMP MYSQL MASTER SERVER

Dump with binary and log position
# mysqldump –single-transaction –master-data=2 DATABASE NAME| gzip > /root/DATABASE.sql.gz
restore
# gunzip < /root/DATABASE.sql.gz | mysql DATABASE

PHP FPM – HOW TO SEPARATE VHOST(WEB SITE) AND EXTEND LIMITS PER VHOST ON NGINX.

php fpm – How to separate vhost(web site) and extend limits per vhost on nginx.
I’m done it for phpmyadmin to allow import large files (this can be used to separate vhosts with limitations or extend as well)
# cp /etc/php5/fpm/pool.d/www.conf /etc/php5/fpm/pool.d/phpmyadmin.conf
# nano /etc/php5/fpm/pool.d/phpmyadmin.conf
change
; pool name (‘www’ here)
[www]
to
[phpmyadmin]
change
; Note: This value is mandatory.
listen = /var/run/php5-fpm.sock
to
; Note: This value is mandatory.
listen = /var/run/php5-fpm-phpmyadmin.sock
# nano /etc/nginx/sites-enabled/phpmyadmin
chnge
fastcgi_pass unix:/var/run/php5-fpm.sock;
to
fastcgi_pass unix:/var/run/php5-fpm-phpmyadmin.sock;
# nano /home/phpmyadmin/.user.ini
add
upload_max_filesize = 20M
memory_limit = 256M
max_execution_time = 300
max_input_time = 240
# sudo service php5-fpm restart
# sudo service nginx reload

LINUX SENDMAIL WORK SLOW (FQDN)

Sendmail work slow , up to 60 sec when send mail.
This is because sendmail can’t resolve the right FQDN.
How to resolve:
1) We check what is our hostname
# hostname -f
# newdev

2) The fix is:
# nano /etc/hosts
and make the first line loock like”
# 127.0.0.1 localhost localhost.newdev newdev
Now , the sendmail send mails without delay.

CLAMD HAS FAILED. CONTACT YOUR SYSTEM ADMINISTRATOR IF THE SERVICE DOES NOT AUTOMAGICALLY RECOVER

clamd has failed. Contact your system administrator if the service does not automagically recover.
Home »cPanel »Manage Plugins
Uninstall clamavconnector
Install and keep updated
cpanel_clam