Centos 6

Force CentOS to pick fast mirror from selected country.

7 March 2018

Today, I came across the issue with my new IP block peering with an ISP in Thailand and CentOS Fast Mirror always redirect all my new IPs towards the US mirror which is very far. So I reached out to CentOS community and finds out that the CentOS Mirrorlist nodes use free GeoIP database from Maxmind. […]

Preparing Linux Template VMs

27 September 2015

Dan over at Bashing Linux has a good post on what he does to prep his template VMs for use with Puppet. He’s inspired me to share how I prepare my Linux VMs to become a template. He’s got a few steps I don’t have, mainly to prep for Puppet, and I have a few steps he […]

Dovecot + roundcube: UID COPY: Mailbox doesn’t exist: Trash

16 September 2015

Dovecot + roundcube: UID COPY: Mailbox doesn’t exist: Trash This issue can be fix by create a new imap folder: “Trash” then you will be able to delete mail from RoundCube. As far as I know, VestaCP has this issued because they still using Dovecot 2.0.9 and it’s get fix after version 2.1.0 So to work […]

Backup all databases nightly w/ mysqldump

5 July 2015

  Backup all databases nightly w/ mysqldump This is something very useful and everybody should be doing this. Because you can’t trusted the hosting provider backup.  So you should always make your own backup and here is the tools will help you make your own mysql backup with ease. #!/bin/bash DB_BACKUP=”/backups/mysql_backup/`date +%Y-%m-%d`” DB_USER=”root” DB_PASSWD=”secretttt” HN=`hostname | […]

Apache Error: “semget: No space left on device”

5 July 2015

Apache Error: “semget: No space left on device” If Apache fails, and will not successfully start again, check the error log. If you see an error similar to the following, it could indicate that your server has run out of semaphores. semget: No space left on device To see how many semaphores are being used, SSH to […]

HOWTO: /dev file system in chroot-ed environment

5 July 2015

HOWTO: /dev file system in chroot-ed environment Chroot is an operation that changes the apparent root directory for the current running process and their children. A program that is run in such a modified environment cannot access files and commands outside that environmental directory tree. This modified environment is called a chroot jail. As a a traditional UNIX […]

MariaDB on DirectAdmin (Replace MySQL with MariaDB)

6 December 2014

Replace MySQL with MariaDB on DirectAdmin   MySQL…It seems these days everybody doing something in the IT branch has used it, or still does. However, there are some problems: you only get the fun stuff (like clustering etc) if you pay big time, its development is stalling (more and more core developers are leaving), a […]

Bad Bot Blocker

16 August 2014

Bad Bot Blocker 223 Apache htaccess rules to block bad bots. Bad bots are defined as: E-mail harvesters Content scrapers Spam bots Vulnerability scanners Aggressive bots that provide little value Bots linked to viruses or malware Government surveillance bots Russian search engine Yandex Chinese search engine Baidu Yandex/Baidu Unless your website is written in Russian […]

Bypassing Bad fstab Failure When Booting Linux

28 July 2014

Bypassing Bad fstab Failure When Booting Linux Usually you can enter root password and try to edit fstab, but it wouldn’t let you edit. because its read-only mode. so here is the method to work-around that. If /etc/fstab file is created with errors or the hardware configuration changes such as adding hard disks, Linux will boot into failure […]