Linux Archives

Over 80% is running on some form of Linux – so does your Mac and you iPhone. Sometimes we have to get our hands dirty on the command line – it makes you feel like a proper hacker.

Here are some pointers I picked up on my journey.

How to unTAR a .bz2 file in Linux

I always forget how to unTAR a .bz2 file – perhaps this little memory aid will help me remember for the future. tar -xjvf filename.bz2 This will do the trick 🙂 The key to the magic is to provide the j switch, which tells the TAR command to use bzip2 compression.

How to transfer files from your GoPro to your computer via WiFi

There is an iOS and Android App available to transfer files directly from a GoPro camera to a mobile device. Those apps transcode files and compress them for easier viewing, and to save storage space.

While that approach gets footage onto my iPhone, I still need to transfer the files to my Mac for editing. Plus, there’s an additional compression step involved which can’t be good for picture quality. Besides, it takes forever to do its job.

A much more useful approach would be to hook directly into the GoPro and transfer files that way. This leaves the SD card place and doesn’t disturb the (sometimes hard to reach or difficult to recreate) position of the camera.

Here’s how to do it.

Read more

How to switch off emails from Anacron in Plesk Onyx

In 2011 I wrote an article about how to avoid emails from Dr. Web. In it I was discussing how to switch off these notifications, which are generated when the Dr. Web service updates itself. Here’s an example: /etc/cron.daily/drweb-update: Dr.Web update details: Update server: http://update.msk5.drweb.com/plesk/700/unix Update has begun at Fri May 18 03:53:47 2018 Update … Read more

How to host multiple websites with Apache

The Apache web server has a convenient feature called Name-based Virtual Hosting. This function allows us to have a single LAMP Stack server configured on one IP address, but serve a different set of files depending on which domain is being requested.

This sounds more complicated than it is. Say we had example1.com and example2.com, both of which are to be separate websites, but both domains point to the same IP address. Apache’s Name-based Virtual hosting makes this possible. In fact, this feature forms the basis of 90% of this planet’s shared hosting business.

Let’s see how to do this in CentOS 6 and 7.

Read more

How to install PHP 7.x on a CentOS LAMP Stack

By default, CentOS 7 comes with support for PHP 5.4. Sadly that version has reached the end of its life in 2015and is no longer updated by the developers. If we want to stay up to date with the latest software, we may want to upgrade (if our applications are working with newer versions of PHP).

For CentOS users this either means to compile cutting edge versions from source and tweaking lots of scary system configurations – or dipping into the power of Software Collections. These are official pre-compiled packages by the software vendor, designed to run newer versions of software alongside those that are provided by default.

At the time of writing, PHP 7.2 is available but it’s not part of the software collections yet, so we’ll use  PHP 7.1 with FPM support under Apache (as it’s the recommended way to do so).

Let’s begin!

Read more

Finding your current MAC address in CentOS

I had an issue with one of my servers the other day: its power supply died unexpectedly during a scheduled restart. The poor thing never cam back up again.

Lucky for me, the data centre could simply swap out my hard disks and put them into another server. Although my data was save, the server wouldn’t connect to the network anymore – because it had a new MAC address. CentOS stores this value in two of its files, and when it changes (which is hardly ever the case), those files need to be updated.

Here’s how I fixed the problem. I did this on a CentOS 6 server, but it looks like the procedure is the same for CentOS 7.

Read more

How to run Commodore BASIC as a Scripting Language on macOS

Did you know you can run Commodore BASIC v2 on your Mac and Linux systems as a scripting language? It’s true – thanks to the marvellous efforts of Michael Steil and James Abbatiello. They’ve adapted the original BASIC v2 as featured on the VIC-20 and C64 with additional routines so that it works natively on … Read more