Tuesday, January 22, 2013

Installing/Upgrading to Fedora 18

Finally found some time on the weekend and got one of the systems at home upgraded to Fedora 18. And it happened to be a long overdue upgrade considering the previous version was Fedora 12.

I was expecting a simple upgrade and it was that. Quick, simple and relatively easy.

But there were a few bits of customization I had to do. I'm using the rest of this post to document the things I discovered and did
  1. Quite obviously all the games I had installed on this had to be re-installed. And I had to copy across a number of repositories for yum too.
    1. Adobe repository for flash player
    2.  rpm fusion for all the non-free stuff
    3. plex repository for plex media server to stream multimedia to my TV
  2. The installation didn't allow me to choose my hostname and domain so I got stuck with localhost.localdomain. Changing it required me to use the command hostnamectl which made it permanent across reboots. Source: http://docs.fedoraproject.org/en-US/Fedora/18/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html
  3. On another system I wanted to run Preupgrade.But FC18 has stopped support. Instead you have to use a tool called fedup. More details here: https://fedoraproject.org/wiki/FedUp. Some useful hints for update also available at https://fedoraproject.org/wiki/Upgrading_Fedora_using_yum
  4. Plexmediaserver refused to work. Looking over the logs I realized that SE was preventing rsync from writing into the plugins directory. So, I had to add a policy to allow this using a few commands one of which was audit2allow. However this command wasn't installed by default in FC18 and I had to install it using yum install /usr/bin/audit2allow. Source: http://danwalsh.livejournal.com/61710.html
  5. To get Plexmedia to work finally I had to run the following commands:
    1. grep  rsync /var/log/audit/audit.log | audit2allow -m mypol
    2. semodule -i mypol.pp
    3. systemctl stop plex
    4. cd /var/lib/plexmediaserver/Library/Application Support
    5. rm -rf Plex\ Media\ Server
    6. systemctl start plex
    7. systemctl status plex
    8. The above command highlights any errors. I saw a lot of failures with rsync and hence started fiddling around with the SE Linux policies.
    9. I had to repeat the commands about 6 times and it still didn't work
    10. Finally, I gave up and disabled SELinux. (in /etc/sysconfig/selinux) I'm sure there is another way but I was running out of time and patience.
    11. Rebooted and plex started up. So its confirmed that SE Linux was preventing rsync.
  6. Good links on plex adminsitration
    1. http://wiki.plexapp.com/index.php/PlexNine_PMS_TipsTricks#Linux
    2. http://wiki.plexapp.com/index.php/PMS
    3. http://wiki.plexapp.com/index.php/PlexNine_PMS_TipsTricks#Plex_Media_Server_Tips 
  7. With that success I then tried to upgrade another existing FC17 system using Fedora Update, aka fedup, to upgrade the second system to FC18.
    1. This command line utility is simple too:
      1. fedup --network 18 --debuglog fedupdebug.log
    2. This was for a network update, i.e., the latest versions of the packages I had installed were downloaded and then once I rebooted there was an option to Upgrade.
    3. The only issue I faced was that I kept getting a no host found error when downloading the package perl-ExtUtils-ParseXS-3.16-235.fc18.noarch.rpm.
    4. Finally I had to copy this off the ISO I had downloaded to use for the fresh install on the first system.
    5. Once that hurdle was crossed the remaining packages were downloaded and the upgrade was smooth.
    6. I'm now blogging this using the upgraded FC-18.
    7. One weird issue I'm facing right now is in the browser (Opera) when writing this blog, after typing about 3-4 characters, the cursor moves to the start of the line, types a j and then starts typing normally for the next 3-4 characters.
      1. I'm hoping this is some temporary issue and a reboot resolves it.
      2. If not, I'll update this post with the details.

Setting up FC after a fresh install

Fedora Core (FC) has this awesome release cycle of 6 months and every time they come out with a new version it's great. The downside, I've got to do an upgrade or a fresh install every six months. While they do their best to enable users to upgrade to the next version, sometimes you just have to do a fresh install. And then it takes me about six months to get the system customized and working with everything I want (not need).

So the idea of this post is to help me reduce that time the next time I do a fresh install. I plan to list all the 'new software' I install here along with instructions (and links) for easier use next time.
  1. After the fresh install do a 'yum -y update'. This will ensure every thing's up-to-date
  2. Add my user name to the sudoers file. Edit the /etc/sudoers file and add the following line after the Defaults section. The Defaults section is a bunch of lines starting with the word Defaults. When you edit the /etc/sudoers file add the following line to it:
    <username> ALL=(ALL) ALL. This will enable the sudo command with all sudo permissions to username. Not the most secure, but the most convienient.
  3. Install synergy
  4. Install the rpmfusion repositories for yum using the command:
    sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
  5. Run the following commands:
    1. sudo yum install kdenlive
    2. sudo rpm -ivh adobe-release-i386-1.0-1.noarch.rpm
    3. sudo yum install flash-plugin nspluginwrapper.x86_64 nspluginwrapper.i686 alsa-plugins-pulseaudio.i686 libcurl.i686
    4. sudo yum install tiger*vnc*server*
    5. sudo yum -y update