บันทึกเหตุการเรื่องราวการเดินทางสิ่งที่ได้เจอแบ่งปัน ข่าวสาร ข้อมูล และ มิตรภาพ

Fight the Malware with Custom ClamAV to on cPanel Servers

10 March 2018

Installing ClamAV via Command Line (SSH) This command tells the system that we want ClamAV to be listed as installed by the local RPM system: /scripts/update_local_rpm_versions –edit target_settings.clamav installed This command is the one responsible for installing the ClamAV RPM on your server: /scripts/check_cpanel_rpms –fix –targets=clamav Creating Symbolic Links If you need manually scan or […]

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 […]

Turnkey/ubuntu failed! Boot stops at loading initial ramdisk

21 September 2015

Turnkey/ubuntu failed! Boot stops at loading initial ramdisk The host system crashed for some unrelated reason (bluescreen), and when i restarted the VM it ended up in BusyBox v1.17.1 Debian 1.17.1-8turnkey+2+gdaf9f75 Alert! /dev/disk/by-uuid/2ed6228a-xxxxxx does not exist Dropping to a shell! The solution is to change boot parameter linux /vmlinuz-2.6.32-5-686 root=/dev/mapper/turnkey-root ro The permanent fix, after […]

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 […]

How to Recover InnoDB Corruption for MySQL

19 April 2015

How to Recover InnoDB Corruption for MySQL Assume you’re running MySQL with Innodb tables and you’ve got crappy hardware, driver bug, kernel bug, unlucky power failure or some rare MySQL bug and some pages in Innodb tablespace got corrupted. In such cases Innodb will typically print something like this: InnoDB: Database page corruption on disk […]

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 […]