ProFTPd server configuration: enable FTPS (OpenSSL mod_tls)

To setup SSL encryption in ProFTPd you can follow such instructions: 1. Generate self-signed SSL certificate & private key. You should fill form below: 2. Create mod_tls SSL configuration file /etc/proftpd/tls.conf : 3. Include mod_tls SSL configuration file /etc/proftpd/tls.conf into main “/etc/proftpd.conf” using Include : 4. Check ProFTPd configration using command: 5. If there is … Continue reading ProFTPd server configuration: enable FTPS (OpenSSL mod_tls)

Upgrading MySQL 5.6 to 5.7 on CentOs

First of all I would recommend you to make backups for all MySQL databases and configuration files you have. The second recommendation is to use official Yum repositories located on http://dev.mysql.com/downloads/repo/yum/ It is the best possible option for CentOs and other Red Hat based Linux ditstibutions. You should download repository depending on your distribution version. … Continue reading Upgrading MySQL 5.6 to 5.7 on CentOs

Some interesting task related to recursion and arrays in PHP

Sometimes it is difficult to find best solution for some problem quickly. For example, if you need to walk some nested array. You don’t know how deep it could be nested and extract values from it to make it flattern you can use amazing function array_walk_recursive together with anonymous function to solve such task like … Continue reading Some interesting task related to recursion and arrays in PHP

MySQL GROUP_CONCAT default result length & possible problems with big results

If you use such function like GROUP_CONCAT you should be aware of default result size is 1024 bytes. It could lead possible problems. For example, check the SQL query below: If you expect result to be list of IDs separated by comma and you have data result bigger than 1024 characters it will be truncated … Continue reading MySQL GROUP_CONCAT default result length & possible problems with big results

Linux malware detect aka maldet installation procedure

I’m using the following procedure to install and configure Linux Malware Detect (LMD): 1. Download it: –2013-12-06 16:10:52– http://www.rfxn.com/downloads/maldetect-current.tar.gz Resolving www.rfxn.com… 129.121.132.46 Connecting to www.rfxn.com|129.121.132.46|:80… connected. HTTP request sent, awaiting response… 200 OK Length: 811434 (792K) [application/x-gzip] Saving to: `maldetect-current.tar.gz’ 100%[====================================================================================================>] 811,434 –.-K/s in 0.1s 2013-12-06 16:10:53 (7.51 MB/s) – `maldetect-current.tar.gz’ saved [811434/811434] 2. Verify … Continue reading Linux malware detect aka maldet installation procedure

nginx: [warn] 4096 worker_connections exceed open file resource limit: 1024

If you see error messages like: nginx: [warn] 4096 worker_connections exceed open file resource limit: 1024 Then checking nginx web server configuration using command: It can be fixed permanently (after system reboot) by editing /etc/security/limits.conf configuration file: Default Linux system limits can be viewed using command: core file size (blocks, -c) 0 data seg size … Continue reading nginx: [warn] 4096 worker_connections exceed open file resource limit: 1024

Errors running mysqldump related to LOCK TABLES

If you see such error patterns when running mysqldump backup: Enter password: mysqldump: Got error: 1016: Can’t open file: ‘./wordpress_db/wp_1050_postmeta.frm’ (errno: 24) when using LOCK TABLES Enter password: mysqldump: Got error: 23: Out of resources when opening file ‘./wordpress_db/wp_1050_options.MYD’ (Errcode: 24) when using LOCK TABLES try to add –lock-tables=false to dump command.

RHEL Downloadonly plugin for yum

If you need to get package source code only, and you don’t want to install it, you can use Downloadonly plugin for yum. Install the package including “downloadonly” plugin: (RHEL5) (RHEL6) Run yum command with “–downloadonly” option as follows: Confirm the RPM files are available in the specified download directory. Source: https://access.redhat.com/solutions/10154