Kernel tuning for linux server

Kernel sysctl configuration file for Linux

The following is suitable for dedicated web server, mail, file server etc.
place file in /etc/sysctl.d/60-zercle.conf
and run sysctl --system

Tuning Linux ZFS

Edit /etc/modprobe.d/zfs.conf

# Set use max memory at half of system memory (ex. 4GB/2)
options zfs zfs_arc_max=2147483648

# Increase scrub/resilver worker
options zfs zfs_vdev_scrub_min_active=24
options zfs zfs_vdev_scrub_max_active=64

# Increase sync write
options zfs zfs_vdev_sync_write_min_active=8
options zfs zfs_vdev_sync_write_max_active=32

# Increase sync reads
options zfs zfs_vdev_sync_read_min_active=8
options zfs zfs_vdev_sync_read_max_active=32

# Increase async reads
options zfs zfs_vdev_async_read_min_active=8
options zfs zfs_vdev_async_read_max_active=32

# Increase async write
options zfs zfs_vdev_async_write_min_active=8
options zfs zfs_vdev_async_write_max_active=32

Save and reboot system to active configuration

Mirror http(s) (s)ftp(s) with lftp

Install lftp

#!/usr/bin/env bash
apt update && apt -y full-upgrade
apt -y install lftp
exit 0

Mirror from remote to local

lftp -e "mirror -e -c -P=4 . /local/target-path; bye"


lftp remote_url/path -e [command]

mirror [option] source target

-e delete different files

-c continue transfer

-P=[number] number of parallel connections

Enable IPv4 and IPv6 on Zimbra Collaboration

Work around nginx proxy IPv6 fix

sed -i 's| ipv6only=off||g' /opt/zimbra/conf/nginx/templates/nginx.conf.*

Get current settings

su zimbra
zmprov gs `zmhostname` | grep -i ipmode

Get public IP

# IPv6
# IPv4

Enable IPv4 and IPv6

zmprov ms `zmhostname` zimbraIPMode both
zmprov ms `zmhostname` " [::1]/128 IPv4/32 [IPv6]/128"
zmcontrol restart