FileZilla Custom Site Manager Location

Here’s how to use a different directory for the FileZilla Site Manager or “My Sites” configuration on Windows. This is useful when you need to specify a standard configuration directory for syncing across computers. Please note that site passwords are stored in this location and should be kept private and secure.

1. Open you favorite text editor as an Administrator.

2. Go to the FileZilla installation directory and open fzdefaults.xml. On our 64-bit Windows machine, the location is %PROGRAMFILES(x86)%\FileZilla FTP Client\fzdefaults.xml.

3. Change the “Config Location”, pointing it to the new configuration directory. Use slashes in the path. Something like:

<FileZilla3>
  <Settings>
    <Setting name="Config Location">C:/Users/john/FileZilla/</Setting>
  </Settings>
</FileZilla3>

4. Start FileZilla and go to File -> Site Manager. Site Manager should now display entries found under the newly configured directory.


rsyslog Email Notification

If you are using rsyslog, here’s how to get an email notification when a certain keyword is found in the logs.

1. Edit rsyslog.conf. We are using Red Hat.

> vi /etc/rsyslog.conf

2. Add the following lines at the end of the file. An email will be sent when the keyword ERROR is found. The action runs every 5 minutes.

$ModLoad ommail
$ActionMailSMTPServer localhost
$ActionMailFrom rsyslog@domain.com
$ActionMailTo admin@domain.com
$template mailSubject,"[rsyslog] %hostname%"
$template mailBody,"%msg%"
$ActionMailSubject mailSubject
$ActionExecOnlyOnceEveryInterval 300
if $msg contains 'ERROR' then :ommail:;mailBody

3. Restart rsyslog.

> service rsyslog restart

How To Install Redis 2.x on Red Hat

Redis 2.4
1. Install using yum. The current yum version as of this writing is Redis 2.4.

> yum install redis php-pecl-redis

2. Edit redis.conf. Comment out the bind configuration to bind Redis on all IPs.

> vi /etc/redis.conf
#bind 127.0.0.1

3. Start Redis manually and on startup.

> service redis start
> chkconfig redis on

Redis 2.8

1. Download Redis 2. The latest Redis 2 version as of this writing is Redis 2.8.22.

> mkdir redis; cd redis
> wget http://download.redis.io/releases/redis-2.8.22.tar.gz
> tar xzf redis-2.8.22.tar.gz
> cd redis-2.8.22

2. You need to compile Redis. In case you don’t have Make, use yum to install it.

> yum update
> yum install gcc make

3. Compile Redis. Do an initial distclean just in case.

> make distclean
> make

4. Install Redis under the default /usr/local/bin directory.

> make install

5. Copy the Redis init.d script.

> cp utils/redis_init_script /etc/init.d/redis

6. Start Redis manually and on startup.

> service redis start
> chkconfig redis on

Warnings

Redis will give out warnings on startup. Here are the commands used to get rid of these warnings.

1. Enable kernel virtual memory overcommit.

> sysctl vm.overcommit_memory=1
> vi /etc/sysctl.conf
vm.overcommit_memory=1

2. Disable Transparent Huge Pages (THP).

> echo never > sys/kernel/mm/transparent_<wbr />hugepage/enabled

3. Increase system wide open files limit.

> sysctl -w fs.file-max=10032
> vi /etc/sysctl.conf
fs.file-max=10032

4. Increase backlogged sockets count.

> sysctl -w net.core.somaxconn=512
> vi /etc/sysctl.conf
net.core.somaxconn=512