Linux
All about Linux including various configuration procedures, scripts and tips
General
Anything that are related to Linux but does not fit into the category of networking, storage, dat...
Batch Image Resize
Keeping Aspect Ratio mogrify -path [Full path to store the resized images] -resize [width]x[heig...
Cheking Printer Ink Level
It can be frustrating sometimes that Linux users aren't able to check the ink levels on our print...
Convert PNG to ICO using ImageMagick
convert logo.png -define icon:auto-resize=64,48,32,16 logo.ico
How to do Mac/iOS Stuff in Linux
Converting Apple Developer Certificate to .p12 with OpenSSL Convert the developer certificate f...
Sendmail Sample Usage
mail.txt: MIME-Version: 1.0 Content-Type: text/html From: newsletter@shopbah.com Subject: TESTIN...
Windows - Issues
IIS Service Unavailable Error Search for "run" In the run dialog, enter "iisreset" and press r...
Networking
Linux network troubleshooting and administration
CentOS 7 - Configuring Cacti
Install Required Dependencies yum -y install mariadb-server php php-cli php-mysql net-snmp-utils...
IPTables - Forwarding Between LAN and WLAN
Add the following to /etc/udev/rules.d/10-network.rules, substitute LAN_MAC_ADDR and WLAN_MAC_ADD...
Connecting to OpenVPN Using NetworkManager
Install the required packages sudo apt-get install network-manager network-manager-openvpn netwo...
OpenVPN - Firewall Configuration
FirewallD Use the following commands to open all ports required by OpenVPN: firewall-cmd --list...
RHEL VLAN and Bonding Configuration
Check list: Check whether the 8021q module has been loaded. lsmod | grep 8021q If the 8021q m...
Setup SFTP to Public Directory (/var/www)
Configuring SSH for SFTP vim /etc/ssh/sshd_config Comment the following line: Subsystem sf...
FirewallD - Opening a Port
Use this command to find your active zone(s): firewall-cmd --get-active-zones It will say eithe...
Using LetsEncrypt for OpenVPN WebSSL
Using letsencrypt for OpenVPN Access Server is nothing more than symlinking the files to letsencr...
Monitor Mode on Broadcom-wl Driver
Enable monitor mode: $ echo 1 > /proc/brcm_monitor0 Enabling monitor mode will create a pris...
SSH Tunneling
ssh -p <port> <username>@<remote host> -L <local listening port>:<remo...
Syncing Files with FTP
I came across a problem when doing migration last time, the server grew too big that I cannot jus...
ArchLinux - Setting Up Fortinet SSL VPN
Install ppp, openfortivpn and networkmanager's fortinet plugin package: sudo pacman -Syu ppp op...
Desktop Environments
Everthing to do about Desktop Environments, including LXDE, XFCE, KDE and Gnome
Getting Cursor Pointer Theme for LXDE
Installing the package xcursor-themes Then go to Preferences > Customize Look and Feel Sele...
LXDE Volume Keybinding
Add the following lines to ~/.config/openbox/lxde-rc.xml: <keybind key="XF86AudioMute"> ...
LXDE Blueproximity Settings
Locking Command: xscreensaver-command -activateUnlock Command: pkill xscreensaverProximity Comman...
Auto Suspend USB
There are 2 settings that needs to changed: Add usbcore.autosuspend=0 usbcore.autosuspend_del...
LXDE Visual Artifacts when Switching from Desktops with Chrome
LXDE Visual Artifacts when Switching Desktops. Install a composite manager will remove the artifa...
Scripts
Contains all the script I used for my administration
Script - Backup Script for Home Directories and MySQL Databases
#!/bin/sh # Home directory to backup must be absolute path, with trailing slash home_dir='/h...
Script - MySQL Dump Databases Separated by DB Name
#!/bin/bash DUMP_EXEC="mysqldump" #path to mysqldump MYSQL_EXEC="mysql" #path to mysql MYS...
Script - Move Infected Emails to Quarantine and Notify Users
The following script will do the following: Parse email headers from ClamScan Results Move in...
Delete Old Emails and Notify User
ADMIN="admin@domain.com" # Admin email DOMAIN="domain.com" # Domain name HEADER="The emails lis...
Server Software
Server software configuration and installation procedures such as Apache, and Postfix
Apache Option FollowSymLinks not allowed here Error
Apache htaccess Option FollowSymLinks not allowed here error: find /home -name ".htaccess" -ty...
Migrating Self-Signed SSL Certificate to LetsEncrypt Certificate
Download Let's Encrypt Client sudo -s git clone https://github.com/letsencrypt/letsencrypt /op...
LAMP Stack Upgrade Issues
"Table Doesn't Exists" After MySQL/MariaDB Upgrade Paste MySQL data directory to upgraded data d...
Standard Installation Procedures for LAMP Stack on CentOS 7
1. System Upgrade yum -y update 2. Install Required Software yum -y install git policycoreu...
Slow Loading on Ownloud 8
Change /var/www/html/owncloud/config/config.php database host to 127.0.0.1 instead of localhost
Postfix and Dovecot Configuration
Installation hostnamectl set-hostname mail.<domain>.<tld> yum -y install postfix ...
Install RethinkDB on CentOS 7
Installing RethinkDB sudo wget http://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo ...
Turtl API Server and Client Installation CentOS 7
Turtl API Clone and Configure Turtl API Create a user for turtl API: sudo useradd turtl Switc...
Software Development
All about software development tricks on Linux
Creating War File in Linux
CD to war directory in the project folder Execute jar -cvf .war *
Standard Procedures for CakePHP Application Deployment
1. Clone Source File git clone <git url> 2. Setup Database mysql -uroot -p create d...
Installing Clozure CL and QuickLisp on CentOS 7
Download Clozure CL Open up terminal and enter the command: svn co http://svn.clozure.com/public...
Sound
Linux sound problems, configuration and installation
Storage
Storage administration and tricks, including LVM, SCSi etc.
System
Linux system tools, administration and tips
ArchLinux Upgrade Issues
Error: key "ABCDE1282828181" could not be looked up remotely Upgrade archlinux-keyring: pacman -...
CentOS Installation Issues
HP Microserver Gen 7 Kernel Panic on Boot (Both Live USB and New Installation) Add the followin...
Changing Default S2RAM to USWSUSP Suspend Module
If you have any issues to suspend your laptop e.g. suspend command doesn't work on your laptop, t...
Fixing Incorrect Lid State by Hacking DSDT
When I install a Linux distro to my VAIO notebook, I found that there is an annoying bug with the...
JournalD Administration
Optimizing JournalD Disk Space Usage Edit /etc/systemd/journald.conf and change the following li...
Linux on Macbook Administration
Blessing the Linux Kernel Boot into Mac Recovery Start terminal and enter: bless --folder /...
SELinux - Services Blocked by SELinux
SELinux Blocked Apache Access to Files setsebool -P httpd_unified 1sudo /sbin/restorecon -R /var...
Standard CentOS Workstation Setup
Install GUI (MATE Desktop) sudo yum install epel-release sudo yum groupinstall 'X Window Syste...
Ansible
Contains everything on Ansible IT automation tool, playbooks and tricks
Playbook - Clearing Users' Data Files in a Group of Windows Machines
The playbook below will remove all users' data in a computer that belongs in an inventory group. ...
Playbook - Update Windows Machine (Windows Update Disabled)
This playbook will: Modify windows update service to manual in case the machine is set to disab...
Playbook - Initiate Clamscan on Machines with ClamWin Installed
This playbook will initiate a full scan on all computers using Clamscan that is installed through...
Playbook - Disable Windows Updates
This playbook will download disable_windows_update.ps1 from a server, reachable by all clients an...