TOPIC: FEDORA PROJECT
Upgrading to Fedora 13
1st June 2010After having a spin of Fedora's latest in a VirtualBox virtual machine on my main home PC, I decided to upgrade my Fedora box. First, I needed to battle imperfect Internet speeds to get an ISO image that I could burn to a DVD. Once that was in place, I rebooted the Fedora machine using the DVD and chose the upgrade option to avoid bringing a major upheaval upon myself. You need the full DVD for this because only a full installation is available from Live ISO images and CD's.
Since all was graphical easiness, I got back into Fedora again without a hitch. Along with other bits and pieces, MySQL, PHP and Apache are working as before. If there was any glitch, it was with NetBeans 6.8 because the upgrade from the previous version didn't seem as complete as hoped. However, it was nothing that an update of the open source variant of Java and NetBeans itself couldn't resolve. There may have been untidy poking around before the solution was found, but all has been well since then.
Relocating the Apache web server document root directory in Fedora 12
9th April 2010So as not to deface anything that is available online on the web, I have a tendency to set up an offline Apache server on a home PC to do any tinkering away from the eyes of the unsuspecting public. Though Ubuntu is my mainstay for home computing, I do have a PC with Fedora installed, and I have been trying to get an Apache instance to start automatically on there unsuccessfully for a few months. While I can start it by running the following command as root, I'd rather not have more manual steps than is necessary.
httpd -k start
The command used by the system when it starts is different and, even when manually run as root, it failed with messages saying that it couldn't find the directory while the web server files are stored. Here it is:
service httpd start
The default document root location on any Linux distribution that I have seen is /var/www
and all is very well with this, but it isn't a safe place to leave things if ever a re-installation is needed. Having needed to wipe /var after having it on a separate disk or partition for the sake of one installation, it doesn't look so persistent to me. In contrast, you can safeguard /home
by having it on another disk or in a dedicated partition, which means that it can be retained even when you change the distro that you're using. Thus, I have got into the habit of having the root of the web server document root folder in my home area, and that is where I have been seeing the problem.
Because of the access message, I tried using chmod
and chgrp
, but to no avail. The remedy has to do with reassigning the security contexts used by SELinux. In Fedora, Apache will not work with the context user_home_t
that is usually associated with home directories, but needs httpd_sys_content_t
instead. To find out what contexts are associated with particular folders, issue the following command:
ls -Z
The final solution was to create a user account whose home directory hosts the root of the web server file system, called www
in my case. Then, I executed the following command as root to get things going:
chcon -R -h -t httpd_sys_content_t /home/www
It appears that even the root of the home directory has to have an appropriate security context (/home
has home_root_t
so that might do the needful too). Without that, nothing will work, even if all is well at the next level down. The switches for chcon
command translate as follows:
-R
: recursive; applies changes to all files and folders within a directory.
-h
: changes apply only to symbolic links and not to where they refer in the file system.
-t
: alters context type.
It took a while for all of this stuff about SELinux security contexts to percolate through to the point where I was able to solve the problem. A spot of further inspiration was needed too and even guided my search for the information that I needed. It's well worth trying Linux Home Networking if you need further details. Though there are references to an earlier release of Fedora, the content still applies to later versions of Fedora to the current release, if my experience is typical.
Command Line Software Management
2nd December 2009One of the nice things about a Debian-based Linux distribution is that it is easy to pull a piece of software onto your system from a repository using either apt-get
or aptitude
. While some may prefer a GUI, but I find that the command line offers a certain extra transparency that stops the "what's it doing?" type of question. That's never to say that the GUI-based approach hasn't a place, and I only go using it when seeking out a piece of software without knowing its aptitude-ready name. Interestingly, there are signs that Canonical may be playing with the idea of making Ubuntu's Software Centre a full application management tool with updates and upgrades getting added to the current searching, installation and removal facilities. That well may be, but it's going to take a lot of effort to get me away from the command line altogether.
Fedora and openSUSE have their software management commands too in the shape of yum
and zypper
, respectively. The recent flurry of new operating system releases has had me experimenting with both of those distros on a real test machine. As might be expected, the usual battery of installation, removal and update activities are well served, and I have been playing with software searching using yum
too.
One thing that has yet to mature is in-situ distribution upgrading, à la Ubuntu. In principle, it is possible, but I got a black screen when I tried moving from openSUSE 11.1 to 11.2 within VirtualBox using instructions on the openSUSE website. Not wanting to wait, I reached for a Live CD instead, and that worked a treat on both virtual and real machines.
Being in an experimental turn of mind, I attempted the same to get from Fedora 11 to the beta release of its version 12. A spot of repository trouble got me using a Live CD in its place. You can perform an in-situ upgrade from a full Fedora DVD, but the only option is system replacement when you have a Live CD.
Once installation is out of the way, YAST can be ignored in favour of zypper
and yum
is good enough that Fedora's GUI-using alternative can be ignored. It's nice to see good transparent ideas taking hold elsewhere and may make migration between distros much easier too.
Adding msttcorefonts to Fedora
28th July 2009Once you have enabled the appropriate software repository, you can install the msttcorefonts
(Microsoft TrueType core fonts like Arial, Times Roman, Verdana, Georgia, etc.) package on Debian and Ubuntu. With Fedora, it surprisingly isn't so straightforward. There is a recipe using the command line that worked for me, and I'm not going to repeat it here, so I'll leave you to go where I found it. In fact, it forms part of a wider unofficial Fedora FAQ that may be of more interest to you than solving this.
Update for Fedora 12 (2009-11-24):
You also need chkfontpath
so the following needs doing before the final part of the command sequence, changing the filename as appropriate for your situation:
yum install xfs
rpm -ivh http://dl.atrpms.net/all/chkfontpath-1.10.1-2.fc12.i686.rpm
Getting Fedora working in VirtualBox
12th May 2009After a hiatus induced by disk errors seen on start up, I have gone having a go with Fedora again. In the world of real PC's, its place has been taken by Debian, so virtualisation was brought into play for my most recent explorations. I could have gone with 10, the current stable version, but curiosity got the better of me and I downloaded a pre-release version of 11 instead.
On my way to getting that instated, I encountered two issues. The first of these was boot failure with the message like this:
FATAL: INT18: BOOT FAILURE
As it turned out, that was easily sorted. I was performing the installation from a DVD image mounted as if it were a real DVD, and laziness or some other similar reason had me rebooting with it still mounted. Though there is an option to load the hard disk variant, it wasn't happening, resulting in the message that's above. A complete shutdown and replacement of the virtual DVD with a real one set matters to rights.
The next trick was to get Guest Additions added, but Fedora's 2.6.29 was not what VirtualBox was expecting, and it demanded the same ransom as Debian: gcc
, make and kernel header files. Unfamiliarity had me firing up Fedora's software installation software, only to find that Synaptic seems to beat it hands down in the search department. Turning to Google dredged up the following command to be executed, which got me further:
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
However, the installed kernel headers didn't match the kernel, but a reboot fixed that once the kernel was updated. Then, the Guest Additions installed themselves as intended, with necessary compilations to match the installed kernel.
The procedures that I have described here would, it seems, work for Fedora 10; well, they certainly have bequeathed me a working system. I have had a little poke and a beta of Firefox 3.5 is included, and I saw sign of OpenOffice 3.1 too. So, it looks very cutting edge, easily so in comparison with Ubuntu and Debian. Apart from one or niggles, it seems to run smoothly too. Firstly, don't use the command shutdown -h now to close the thing down, or you'll cause VirtualBox to choke. Using the usual means ensures that all goes well, though. The other irritation is that it doesn't connect to the network without a poke from me. Whether SELinux is to blame for this or not, I cannot tell, but it might be something for consideration by the powers than be. That these are the sorts of things that I have noticed should be telling you that I have no major cause for complaint. While I have mulled over a move to Fedora in the past and that option remains as strong as ever, Ubuntu is not forcing me to look at an alternative and the fact that I know how to achieve what I need is resulting in inertia anyway.