Category Archives: Information

Server Upgrade and Migration Complete.

Well, a couple months ago, the server’s Fedora 28 250GB system drive suffered a crash. Unfortunately, in the process, I lost the last few blog posts due to the automatic blog backup cron had quit working. So, I worked on fixing that little issue and moved forward, accepting that minimal loss as acceptable.

After I replaced the system hard drive, and restored the image, I decided, that since Fedora 28 had recently gone EOL, it would be a good time to upgrade to Fedora 30, since Fedora 31 had recently been released. Now, would be a good time to remind everybody that Fedora had recently ditched yum for everything, including installing individual packages, in favor of dnf.

Starting with Fedora 22, the yum fedup had been replaced with dnf system upgrade, which is a much cleaner method to upgrade a Fedora system. The first things to do, are to fully update the system, and insure that you have the dnf system upgrade plugin. I’lll go over the commands required below:

$ sudo dnf update
$ sudo dnf -y install dnf-plugin-system-upgrade
$ sudo dnf system-upgrade download –releasever=30 –allowerasing
$ sudo dnf system-upgrade reboot

By the way, if you have upgraded from an old Fedora version, you probably need to enable your user to use sudo, by editing the /etc/sudoers file. If you have installed from a fairly recent release, by default, your user has root sudo access, and the root account is disabled. Unless you really know what you are doing, don’t enable the root account, and instead use sudo. 😉

The process above tends to take quite some time, but after it was finished, and I checked the server to make sure everything was working properly, I decided to upgrade the server to the current release, Fedora 31. I used the same commands, replacing 30 with 31, and didn’t need to install the dnf plugin, since I had previously done that.

That was when I discovered that the day that I knew would eventually get here, had arrived. Back in Fedora 25, you could no longer download a 32 bit version, however, you could still upgrade an existing 32 bit version. Now, as of Fedora 31, you could no longer upgrade an existing 32 bit version. Since the current server was put into service back in 2010 (It was a HP D530 Convertible Mini Tower). It was only a Pentium 4 32 bit cpu running at 2.80 GHz, with 4GB of ram….

So, I had to order some hardware. I decided on a pair of HP Elite 8300 Convertible Mini Tower boxes. (i5 running at 3.2Ghz with 8GB ram, expandable to 32GB) I managed to get a pair of these at about $165 each. Both had 500GB drives with Win10 Pro on them, and DVD burners. I really didn’t want such a large system drive, so replaced it with a 320GB Sata drive, and started preparing the 4TB Storage and 4TB backup drives. I also install 2 Sata hot swap bays into the two unused 5.25″ bays, to make upgrading the storage drives easier in the future. (I’ll go over how to prep a Linux drive in a later post…)

I then installed fresh, Fedora 31, and started migrating all the user accounts. (If I neglected anybody, please let me know) I also migrated all web content, including the blogs. There have been other things that Fedora has ditched along the way like MySQL in favor of MariaDB and rc.local support, which is nice to have for people that have been in the Linux game as long as I have. I think I started with RedHat 4.0 Linux back in late 1996, and Unix way before that. 😉 (I’ll cover how to install and set up MariaDB, enable rc.local file support, and the proper way to use systemctl in a post soon.)

Another thing. You will probably notice some speed up of things, and attribute it to the new, faster 64 bit server. Well, partially. In moving things around, I discovered that pulling the server out of the router’s DMZ, and forwarding specific ports and port ranges helped things out dramatically. So, for the moment the server is almost fully set up, but all the core services should be running fine, to include ftp, http, music stream, etc. If anybody has any issues, please don’t hesitate to reach out to me. 😉

Also, keep your eyes peeled for a large music update to celebrate this. 😀

The importance of staying with linux built-in package management…

I just upgraded my Fedora server from 20 to 22.  (I know that I have procrastinated..)  A couple issues were encountered.  The first of which was fairly catastrophic.  After the usual fedup (FEDora UPgrade, which by the way was rather short-lived, from FC18 until FC21, being replaced along with yum by ‘dnc’) stuff, upon reboot, the server hung when it was trying to load the Gnome Desktop Manager.  I really think that was probably a problem with Gnome 3 and my hardware (since I could log in fine using ssh), so I got around this by the following:

# sudo dnf install lightdm lightdm-gtk

# sudo sustemctl disable gdm

# sudo systemctl enable lightdm

(If you haven’t set up sudo, you really should)  After those steps, a simple reboot, and presto!  Finished booting just fine.

The next problem encountered was one that fully illustrates the importance of staying within a modern Linux distribution’s built-in package management system….

Modern Linux Distributions use package managers, a partial list follows:

RPM: Used by RHEL, Fedora, CentOS, Yellow Dog, OpenSUSE….

DEB: Used by Debian and Ubuntu, Mint, SteamOS, Trisquel….

(Those were the ‘big two’, encompassing many different distributions, but there are many more….

Most people know that my server handles an icecast/ices streaming server.  However, ices 0.4 refused to start, giving the following error:

/usr/local/icecast/bin/ices: error while loading shared libraries: libperl.so.5.18: cannot open shared object file: No such file or directory

As part of the upgrade, perl was upgraded from perl 5.18 to 5.20, and libperl.so now points to libperl.so.5.20.  The problem arose from the fact that ices 2 is the version in the package repository.  However, it has no mp3 support, instead streams ogg.  So, for that reason, I had compiled by hand ices 0.4.

So, the only way to fix this libperl issue was to re-compile ices. (A good reason to keep the src of programs that you compile in your /home dir).

So, I jumped to the ices0.4 subdirectory and did the following:

# ./configure    (so that ices would pick up the new perl library)

# make

# sudo make install

After that, everything is fine, but, as I’ve always said, in a modern Linux distribution, try to minimize hand compiled programs.  Not always possible, but definitely preferred.

😎

prune (shear) command

Well, I successfully managed to get the one line command I wrote to successfully delete all security camera entries older than 100 days.  The directory had grown to about 300GB, encompassing 14 months, so it was time to weed things out a bit.

The command I wrote into an executable file in my personal path was:  find $1 -mtime +100 -exec rm -R {} \;

I saved it in my path and called it prune.  The syntax it was to expect was:  prune <directory to prune with trailing />  I was then to remove all files and directories older than 100 days.

However, it didn’t work.  I scratched my head for awhile, discovered it worked if I manually typed in the find string.  Sometimes I can be such a dumb ass.  I didn’t realize that there already was a prune command in /usr/bin/ for some kind of graphing functions.  So, I renamed MY prune command to shear, and everything works as expected.

Oh, the 300GB of security camera video was reduced to 60GB.  My next step will be to put it in a cron, so that it’s automatic….  Too  bad that I’ll never get that 45 minutes back, LOL.