How to control SELinux in CentOS and Fedora

SELinux – when installed – can take on one of three modes: To check which mode SELinux is running on, we can use either sestatus for a more detailed output, or simply getenforce for a one liner: sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing … Read more

How to find and replace in MySQL with phpMyAdmin

Sometimes you need to replace a string in your database with another string, and it can be rather tedious to plough through a large table manually. Thankfully MySQL can execute raw queries such as find and replace. This comes in handy if you’ve moved a WordPress installation to another URL: you only need to tweak … Read more

How to create a redirect in PHP

Say you had domain.com/folder, and you’d like it to automatically redirect to domain.com/otherfolder, do the following: Add the above to a file called index.php in domain.com/folder. As soon as someone visits your location, the browser redirects to the new URL. Courtesy of the Stackoverflow community: http://stackoverflow.com/questions/768431/how-to-make-a-redirect-in-php

How to secure SMTP, POP and IMAP connections in Plesk

You’ve installed an SSL Certificate to secure your Plesk Panel, you’ve tested it with an SSL checker and sure enough: the ugly warning window doesn’t bother you or your customers anymore. But your email client still says that the server doesn’t have a valid certificate. What gives? The secret is this: SMTP, IMAP and POP3 … Read more

How to force Safari to never open ZIP files again

I love Safari – but it has an ultra annoying habit on new installations: it’s trying to be helpful by automatically unzipping ZIP files. It’s the most unuseful feature ever for a techie ever. Thankfully we can switch it off – something you only need to do once every 5 years, and hence it’s easily forgotten … Read more

How to start CentOS in Recovery Mode from Parallels Desktop

To start your Linux distribution into EFI Recovery Mode you need an installation disk. Even the smallest “minimal” image will do. Shutdown the VM if it’s running. Then mount the ISO image onto your VM (under Configuration – Hardware – CD/DVD1). Make sure the “Connected” box is ticked. Next you need to tell Parallels Desktop that … Read more