Cheat Sheet: systemctl vs chkconfig

Since I've mostly been using Red Hat or the gui desktop of Ubuntu lately I've neglected to notice the transitions from the sysVinit packages to systemd. Recently I installed Fedora 16 and was a little surprised when chkconfig didn't work anymore. I decided I would write a post that gives the systemctl version of a few common chkconfig commands. List processes chkconfig: # chkconfig --list systemd: # systemctl list-units Enable a service chkconfig:...

 · 1 min · Benjamin Cane

When it's Ok and Not Ok to use rc.local

On System V based OS's the /etc/rc.local file is executed by the init process at the end of the systems boot process. The fact that the rc.local file is executed during the boot process makes it an easy target for misuse by lazy Sysadmins. Since I started my Unix experience on FreeBSD which relies primarily on the /etc/rc.* configuration files, I've seen and shamefully contributed to my fair share of misuse in the rc....

 · 4 min · Benjamin Cane

MySQL: tee saving your output to a file

Tee is a unix command that takes the standard out output of a Unix command and writes it to both your terminal and a file. Until recently I never knew there was a MySQL client command that performed the same function. Today I will show you an example of how to use it. First login to the MySQL CLI (command line interface) $ mysql -uroot -p Enter password: Welcome to the MySQL monitor....

 · 2 min · Benjamin Cane

Creating a new filesystem with fdisk, lvm, and mkfs

Our Task: Create a new 10GB filesystem to store a package repository for yum Challenges: The existing hard drive has been fully allocated using LVM. Solution: Add a new hard drive to the server (virtual server in this case) Partition the drive and add it to the main logical volume Create a new filesystem This article assumes that by now you have physically added the hard drive to the server....

 · 4 min · Benjamin Cane

Creating a read-only backup user for mysqldump

Mysqldump is a great utility for backing up or exporting a database to a flat file. This flat file can then be used to import the database or databases into another mysql database or even another database server like postgre depending on the options you use. To perform a very simple backup of the mysql database you can simply just setup a cronjob that runs mysqldump at whatever interval you want....

 · 2 min · Benjamin Cane