Fedora 18 firewall.

I upgraded to Fedora 18.  Then verified my web server was running.  Then attempted to visit this site.  I was not able to.    The problem was the new firewall daemon in Fedora 18.   Despite the config file indicating that port 80 was open for http traffic, it was not.

I had to install firewall-config.

yum install -y firewall-config

Then I used firewall-config enable traffic for port 80.  This solved the problem.

Apache web server 2.4 on Fedora 18

I recently upgraded my web server system from Fedora 17 to Fedora 18.  I used fedup to do so.  The upgrade went fairly smooth.

A couple days later I noticed that Apache ( httpd ) was not running.   In the course of trouble shooting I had to disable selinux.    When I enabled selinux again, there was a new issue.

The first issue I noticed is that by default, the ServerName directive in the apache config (httpd.conf) file is remarked out.

The error shows up as the following in your /var/log/httpd/error_log file.

Could not reliably determine the server’s fully qualified domain name

The solution for that error is to edit your /etc/httpd/conf/httpd.conf file.

Change the line (line 95 in my file) that reads

#ServerName

to

ServerName localhost

The next error:

No such file or directory: AH01762: Failed to create shared memory segment on file /run/httpd/authdigest_shm

Which had the following error hand in hand with it:

no such file or directory: AH01760: failed to initialize shm – all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled

Both of these errors can be fixed by creating the /run/httpd directory and then changing the ownership to apache and group to apache.  This seems to be a result of disabling and then enabling selinux.

mkdir /run/httpd/

chown -R apache /run/httpd

chgrp -R apache /run/httpd

 

 

Howto: LiveUSB – request by students of Long Beach City College.

Howto:
LiveUSB

1) Download the latest live image.  You can download it from the official Fedora mirrors.

a) Fedora 15 Live Images – Live Images for Fedora 15

2) Download and install LiveUSB Creator.

a) Windows – LiveUSB-Creator

b) Linux – run su -c yum install liveusb-creator -y

3) Install the LiveUSB Creator program.

4) Insert the flash drive you want to LiveUSB to run on.

5) Open the LiveUSB Creator Program.

6) Browse to the folder you saved the Live iso image to in step 1).

7) Select a size for the persistent image.  I use 1024M.

8) Click on create now.

Go grab a cup of java. This part can take up to 15 minutes. When it completes, you have a boot-able LiveUSB drive.

Howto: Backup your data files

I can never overemphasize the importance of this enough.

Back up your important data files. Daily.

This is a very simple procedure. It takes approximately five minutes. It will save your files.

1) Insert a thumb or flash drive into any USB port on your computer.
2) For Windows copy your “My Documents” folder contents to the the thumb drive. If you use any flavor of Linux, copy the contents of your “home” directory.
3) Right click on the safely remove tray icon, then click on safely remove for the thumb drive.
4) Place your thumb drive in a safe place.

The outcome is that you have your important files in case of virus infection, hard drive failure, or any other form of system failure.
The average cost for recovering files from a failed hard drive is $1000 and yields less than optimum results. Even with expert recovery services, 20-80% of your files can be recovered for a failed hard drive. The method of backup suggested is 100% effective.

If you have information of a sensitive nature, secure your thumb drive in a fire safe or other suitable container.

If you have data that would potentially make or break your business, I highly recommend you send a copy of the files to a friend or relative you trust implicitly on a weekly basis.

There are also numerous web based backup services that provide a complete solution for modest price point, such as Carbonite.com which charges $59 per YEAR.

Howto: Install Fedora from a LiveUSB flash drive or CD.

When you have a liveUSB flash drive or liveUSB CD the installation of Fedora is fairly straight forward.

1. Install the LiveUSB flash drive or CD.

2. Reboot your computer.

3. Press F8 to acquire the boot menu of your computer.  Some systems may require a different F key such as F2 or F5.

4. Select the LiveUSB drive or CD to boot.

5.  Partition the hard drive you wish to install to.  I typically reserve a 25GB partition for the Linux installation and a 5GB partition for the Linux swap file.   You may want to create a separate partition for your /home directories also.   A fairly well outfitted install of Fedora occupies approximately 8Gb of drive space.

6.  Follow the prompts for the installation.  Be sure to install the Grub boot loader if you are dual booting.

Howto: create a local repository for Fedora.

Creating a local Fedora repository is a great way to conserve bandwidth. You can update all of the computers on your local network from one repository.

1)  Install a web server.  I use apache.
su -c yum install httpd -y

2)  Create the directories that become the local repository.
su -c mkdir -p /var/www/html/yum/F15/releases
su -c mkdir -p /var/www/html/yum/F15/updates

3) Install the remote synchronization tool rsync.
su -c yum install rsync -y

4) Use rsync to populate your repository.
/usr/bin/rsync -avrt rsync://linux.mirrors.es.net/fedora/linux/updates/15/x86_64/ –exclude=debug/ /var/www/html/yum/F15/updates
/usr/bin/rsync -avrt rsync://linux.mirrors.es.net/fedora/linux/releases/15/Everything/x86_64/os/Packages/ /var/www/html/yum/F15/everything

I create a cron job for the rsync process. The following synchronizes daily.
su -c touch /etc/cron.daily/rsyncfedora15.cron
su – gedit /etc/cron.daily/rsyncfedora15.cron

Paste the 3 lines of code below into the rsyncfedora15.cron file.
#!/bin/bash
/usr/bin/rsync -avrt rsync://linux.mirrors.es.net/fedora/linux/updates/15/x86_64/ --exclude=debug/ /var/www/html/yum/F15/updates >> /var/log/rsync15updates.log
/usr/bin/rsync -avrt rsync://linux.mirrors.es.net/fedora/linux/releases/15/Everything/x86_64/os/Packages/ /var/www/html/yum/F15/everything >> /var/log/rsync15.log

Then save the file.
This also creates and appends two log files rsync15update.log and rsync15.log in the /var/log directory.

The first time the repository synchronizes it may take considerable time and bandwidth.  Be patient for the process to complete.

If you do NOT plan to make a full mirror of an existing Fedora repository you should use the createrepo tool to create and populate the data files and directories correctly.
su -c yum install createrepo

Then
su
createrepo -v -p -d –deltas /var/www/html/yum/F15/everything

Now you have created the repository for Fedora 15.

Next I create files in my  /etc/yum.repos.d/  called local.repo and localupdates.repo

local.repo has the following in it:

[local]
name=Fedora $releasever – $basearch
failovermethod=priority
baseurl=http://192.168.1.100/yum/F15/everything/i686/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

localupdates.repo:

[local-updates]
name=Fedora $releasever – $basearch – Updates
failovermethod=priority
baseurl=http://192.168.1.100/yum/F14/updates/i686/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

Then I copy those two files to all of my systems.

Howto: fix Gconf error from Firefox

An error occurred while loading or saving configuration information for firefox. Some of your configuration settings may not work properly.

If you click on details of that error you may see:

Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details –  1: Server ping error: IDL:omg.org/CORBA/COMM_FAILURE:1.0)
The fix for this issue may be:

1.  CTRL+ALT+Backspace to log out of the current desktop session.

2. Open a terminal. CTRL+ALT+F1

3. login as root

4.  cd to /tmp/

5. rm -rf  X0-lock

The cause may be that you deleted the contents, or some program or installer deleted the contents of your system’s tmp folder.

Howto: create a custom spin of Fedora 13

Much of the documentation I read on the World Wide Web suggests using revisor to create a custom Spin of Fedora. I find that revisor is not well suited to my needs. I use LiveCD Creator. To install it:
yum install livecd-tools -y

I suggest you install the fedora-kickstarts and spin-kickstarts packages as well.
yum install spin-kickstarts* -y

Another tool I use is liveUSB-Creator.
yum install liveusb-creator -y

Once you have those installed you can use your favorite text editor to modify the existing Kickstart files to suiit your needs.
The files are installed by default to the /usr/share/spin-kickstarts/ directory. Be sure to save the files as different file names once you have edited them to suit your needs.
I save them as fedora-custom-base.ks and fedora-custom-kde.ks

Once that is completed you can run the liveCD Creator to create the custom spin in the directory you wish to save the .iso image to.
setenforce 0
livecd-creator
--config=/usr/share/spin-kickstarts/fedora-custom-kde.ks
--fslabel=F13x64-Custom

If that command completes successfully, you will have a F13x64-Custom.iso in the directory. If it does not, the kickstart file has an error.

Next you can use the LiveUSB-Creator tool to burn that custom image to a USB drive. Be sure to create an overlay when doing so. I use 1024M as my overlay size.

For a more detailed article on creating a LiveUSB drive visit the following:
Howto LiveUSB