Linux

October 7, 2017

Select Biggest MySQL tables

SELECT CONCAT(table_schema, '.', table_name), CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA FROM information_schema.TABLES ORDER BY […]
April 3, 2017

ERROR: can not find RHNS CA file

When rpm -e rhn-client-tools-2.0.2-8.el7.noarch rhnsd-5.0.13-5.el7.x86_64 rhn-check-2.0.2-8.el7.noarch yum-rhn-plugin-2.0.1-6.el7.cloudlinux.noarch rhn-setup-2.0.2-8.el7.noarch rhnlib-2.5.65-2.el7.noarch
March 6, 2017

Debug PHP spam mails

touch /var/log/mail_php.log chmod 777 /var/log/mail_php.log vi sendmail-wrapper.sh #!/bin/sh logger -p mail.info sendmail-wrapper.sh: \ site=${HTTP_HOST}, \ client=${REMOTE_ADDR}, \ script=${SCRIPT_NAME}, \ pwd=${PWD}, \ uid=${UID}, \ user=$(whoami) /usr/sbin/sendmail -t […]
March 11, 2016

Apache reverse SSL proxy

In http conf you can use: ServerName mydomain.com SSLEngine On SSLCertificateFile cert.crt SSLCertificateKeyFile key.key SSLCACertificateFile bundle.cabundle ProxyPass / http://where_to_redirect/ flushpackets=on ProxyPassReverse / http://where_to_redirect/
January 11, 2016

Avoid brute force for wordpress

Not only it poses a security risk by hackers/bots trying to break into your wordpress install but also for a system admin it’s a nightmare because […]
January 11, 2016

http/2 apache centos7

1. Using epel test repository you can install nghttp2 and libnghttp2-devel libraries. 2. then get and compile openssl using ./config shared -fPIC make make install 3. […]
March 6, 2015

install redmine – centos

Intalling redmine on an old linux centos machine was not straightforward for me, after installing ruby from source (repo had an old version and I wanted […]
March 6, 2015

install ruby

# check if ruby is installed gem -v cd /usr/src wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz tar -xvf ruby-2.2.1.tar.gz cd ruby-2.2.1 yum install libffi yum install libffi-devel yum install openssl […]