Category Archives: Computer – Linux

Services on Fedora 21

Yesterday, I was asked as to whether Apache webserver (httpd) was installed on a F21 Workstation installation.  The short answer is yes.  However, it’s not running by default.  So, this might be a good time to go over how Fedora has changed in respect to services.

Services used to be handled through the use of sysvinit scripts that resided in /etc/rc.d/init.d/.  Now, however, they are managed through systemd and systemctl (front-end for systemd).  So, in order to enable a service to start at boot time, you would (as root user) do:

# systemctl enable service_name.service

For httpd, it would then be this command:

# systemctl enable httpd.service

You can stop a service from running at boot time by substituting disable for enable.  In order to check on the status or to start or stop a service, (httpd, for example) you would use one of the following commands:

# systemctl start httpd

# systemctl stop httpd

# systemctl status httpd

You may have noticed that I dropped the .service from the commands….  The old ‘service httpd status’ command structure is ‘passed off’ to systemctl, as are any sysvinit scrips that haven’t been ported to systemd.  You can also still start services in /etc/rc.d/rc.local but there is no telling when that will be depreciated, or if it will.  So, the moral of the story is to start getting used to systemd.  😉

Fedora 21 (TwentyOne) workstation installation

Well, I undertook installing the latest Fedora on a desktop computer for a friend, and as always I needed to address the same three issues immediately upon install…….  One  MAJOR difference now, is that you actually install from the Workstation Live DVD unless you want a server.  (A server will give no desktop, but rather just a simple text login.)  I guess the thinking is that anybody that will install a server is adept enough to handle a command line interface.

Screenshot from 2014-12-27 12:53:55I positively HATE the new Gnome3 interface, and I am sure my friend will also.  So, I set it to use the Gnome Classic Display Manager.  😉

After that was taken care of, it was time to address the lack of mp3 support and the non-working audio.  So, I addressed the non-working audio first, right after I installed YumEx.  (I’ve gone over how to do that in the past, so won’t again.)  Looking into the audio device (by clicking in the upper right corner of the screen), Fedora installed ‘Dummy Audio’ device.  So, off to Realtek to get the proper driver… http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=24&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false  ….  simply accept by checking the box, then click ‘next’.  Download the proper linux driver, depending on your kernel.  Then, double click into the ‘home’ icon, then Downloads.  Double click what you just downloaded, and extract.  The readme says to run ./install, so do that from a shell as root.  Then, one of the rare times you have to reboot, and the audio is now working.  (Of course, if your computer doesn’t have a realtek audio device, your instructions will differ.  😉

Next, to take care of the mp3 support.  It is as simple as installing a couple yum repositories from rpmfusion.  You can either do a google search for ‘rpmfusion install’ or go here:  http://rpmfusion.org/Configuration/  You will want to click on the free and nonfree repositories for Fedora21.  Firefox should default to open with Software Manager, or something…..  Just click Install.

Now, we can use YumEx to install the missing mp3 support.  Run it, and search for ‘mp3’.  Install lame and lame-libs, as well as any dependancies.   Next, search for gstreamer1.  Install gstreamer1-plugins-ugly as well as dependancies.  (This should take care of allowing mp3 playback in rhythmbox.)

That’s pretty much all there is to installing a fairly workable Fedora21 desktop.  The installation only took about 30 minutes, and the boot time is only about 30 seconds to the login prompt, and displays the desktop 5 seconds or so after that.  And, this, on a compaq 8000 Core 2 at 3GHz with 4GB of ram.  😀

Webserver passwords, as well as web ‘symlinks’ WERE broken due to ONE bad .htaccess file!

Well, I unexpectedly caused the web server’s password protected directories ALL to go down the drain with just ONE mistake in ONE .htaccess file.  Not only that, but many symbolic links stopped working in apache, even though they still worked in a CLI.  I am such a dumbass, heh.  Here’s what I did:

This is an example of the .htaccess file I created:

# cat .htaccess

AuthUserFile /XXXXX/XXXXX/XXXXX/.xxxxx AuthGroupFile /dev/null
AuthName “Sam’s Blog”
AuthType Basic

<Limit GET POST PUT>
  require user xxxxx yyyyy
</Limit>

The offending line is in Bold Blue, more specifically that one little old apostrophe.  😉

All fixed now, boys and girls. 😀

‘NEW’ page now working on CRAB

 

Got the NEW page working on the CRAB server……  It was more than likely a side effect of the Apache server upgrade somewhere around the Fedora 18 or 19 upgrade.  Here’s how I did it:

I became root user, then opened a terminal in the requests directory.

# nano .htaccess

Then, I put the following into the file:

Options +Includes
AddType text/html .html .shtml .txt
AddOutputFilter INCLUDES .html .shtml .txt

Saved the file, then restarted Apache as follows:

# systemctl restart httpd

That took care of it, but I think I shall try putting that .htaccess file in CRAB’s document root, as well as the main server document root.  I think that might be a better place for that file.  😀