Showing posts with label Fedora. Show all posts
Showing posts with label Fedora. Show all posts

Friday, May 27, 2011

How To Upgrade From Fedora 14 To Fedora 15 (Desktop & Server)

This article describes how you can upgrade your Fedora 14 system to Fedora 15. The upgrade procedure works for both desktop and server installations.


I do not issue any guarantee that this will work for you!


The commands in this article must be executed with root privileges. Open a terminal (on a Fedora 14 desktop, go to Applications > System Tools > Terminal) and log in as root, or if you log in with a regular user, type

su


to become root.


Please make sure that the system that you want to upgrade has more than 600 MB of RAM - otherwise the system might hang when it tries to reboot with the following message (leaving you with an unusable system):

Trying to unpack rootfs image as initramfs...


First we must upgrade the rpm package:

yum update rpm


Then we install the latest updates:

yum -y update


Next we clean the yum cache:

yum clean all


If you notice that a new kernel got installed during yum -y update, you should reboot the system now:

reboot


(After the reboot, log in as root again, either directly or with the help of

su


)


Now we come to the upgrade process. We can do this with preupgrade (preupgrade will also take care of your RPMFusion packages).


Install preupgrade...

yum install preupgrade


... and call it like this:

preupgrade


The preupgrade wizard will then start on your desktop. Select Fedora 15 (Lovelock). Afterwards the system is being prepared for the upgrade.


At the end, click on the Reboot Now button.


During the reboot, the upgrade is being performed. This can take quite a long time, so please be patient.


Afterwards, you can log into your new Fedora 15 desktop.


First we must upgrade the rpm package:

yum update rpm


Then we install the latest updates:

yum -y update


Next we clean the yum cache:

yum clean all


If you notice that a new kernel got installed during yum -y update, you should reboot the system now:

reboot


(After the reboot, log in as root again, either directly or with the help of

su


)


Now we come to the upgrade process. We can do this with preupgrade.


Install preupgrade...

yum install preupgrade


... and call it like this:

preupgrade-cli


It will show you a list of releases that you can upgrade to. If all goes well, it should show something like Fedora 15 (Lovelock) in the list:

[root@server1 ~]# preupgrade-cli
Loaded plugins: blacklist, langpacks, whiteout
No plugin match for: rpm-warm-cache
No plugin match for: remove-with-leaves
No plugin match for: auto-update-debuginfo
Adding en_US to language list
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
please give a release to try to pre-upgrade to
valid entries include:
"Fedora 15 (Lovelock)"
[root@server1 ~]#


To upgrade, append the release string to the preupgrade-cli command:

preupgrade-cli "Fedora 15 (Lovelock)"


Preupgrade will also take care of your RPMFusion packages, so all you have to do after preupgrade has finished is to reboot:

reboot


During the reboot, the upgrade is being performed. This can take quite a long time, so please be patient. Afterwards, you can log into your new Fedora 15 server.


Fedora 14 Samba Standalone Server With tdbsam Backend

This tutorial explains the installation of a Samba fileserver on Fedora 14 and how to configure it to share files over the SMB protocol as well as how to add users. Samba is configured as a standalone server, not as a domain controller. In the resulting setup, every user has his own home directory accessible via the SMB protocol and all users have a shared directory with read-/write access.


I do not issue any guarantee that this will work for you!


I'm using a Fedora 14 system here with the hostname server1.example.com and the IP address 192.168.0.100.


Please make sure that SELinux is disabled as shown in chapter 5 of this tutorial: The Perfect Server - Fedora 14 x86_64 [ISPConfig 2] - Page 3


Connect to your server on the shell and install the Samba packages:

yum install cups-libs samba samba-common


Edit the smb.conf file:

vi /etc/samba/smb.conf


Make sure you see the following lines in the [global] section:

[...]# ----------------------- Standalone Server Options ------------------------## security = the mode Samba runs in. This can be set to user, share# (deprecated), or server (deprecated).## passdb backend = the backend used to store user information in. New# installations should use either tdbsam or ldapsam. No additional configuration# is required for tdbsam. The "smbpasswd" utility is available for backwards# compatibility.# security = user passdb backend = tdbsam[...]

This enables Linux system users to log in to the Samba server.


Then create the system startup links for Samba and start it:

chkconfig --levels 235 smb on
/etc/init.d/smb start


Now I will add a share that is accessible by all users.


Create the directory for sharing the files and change the group to the users group:

mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/


At the end of the file /etc/samba/smb.conf add the following lines:

vi /etc/samba/smb.conf

[...][allusers] comment = All Users path = /home/shares/allusers valid users = @users force group = users create mask = 0660 directory mask = 0771 writable = yes

If you want all users to be able to read and write to their home directories via Samba, add the following lines to /etc/samba/smb.conf (make sure you comment out or remove the other [homes] section in the smb.conf file!):

[...][homes] comment = Home Directories browseable = no valid users = %S writable = yes create mask = 0700 directory mask = 0700

Now we restart Samba:

/etc/init.d/smb restart


In this example, I will add a user named tom. You can add as many users as you need in the same way, just replace the username tom with the desired username in the commands.

useradd tom -m -G users


Set a password for tom in the Linux system user database. If the user tom should not be able to log into the Linux system, skip this step.

passwd tom


-> Enter the password for the new user.


Now add the user to the Samba user database:

smbpasswd -a tom


-> Enter the password for the new user.


Now you should be able to log in from your Windows workstation with the file explorer (address is \\192.168.0.100 or \\192.168.0.100\tom for tom's home directory) using the username tom and the chosen password and store files on the Linux server either in tom's home directory or in the public shared directory.


Thursday, May 26, 2011

How To Integrate ClamAV Into PureFTPd For Virus Scanning On Fedora 14

This tutorial explains how you can integrate ClamAV into PureFTPd for virus scanning on a Fedora 14 system. In the end, whenever a file gets uploaded through PureFTPd, ClamAV will check the file and delete it if it is malware.


I do not issue any guarantee that this will work for you!


You should have a working PureFTPd setup on your Fedora 14 server, e.g. as shown in this tutorial: Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Fedora 14.


ClamAV can be installed as follows:

yum install amavisd-new clamav clamav-data clamav-server clamav-update clamav-scanner


Clamdscan expects the configuration file /etc/clamd.conf which doesn't exist - therefore we create a symlink from /etc/clamd.conf to /etc/clamd.d/amavisd.conf:

ln -s /etc/clamd.d/amavisd.conf /etc/clamd.conf


Next we create the system startup links for clamd and start it:

chkconfig --levels 235 clamd.amavisd on
/etc/init.d/clamd.amavisd start


First we open /etc/pure-ftpd/pure-ftpd.conf and set CallUploadScript to yes :

vi /etc/pure-ftpd/pure-ftpd.conf

[...]# If your pure-ftpd has been compiled with pure-uploadscript support,# this will make pure-ftpd write info about new uploads to# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and# spawn a script to handle the upload.CallUploadScript yes[...]

Next we create the file /etc/pure-ftpd/clamav_check.sh (which will call /usr/bin/clamdscan whenever a file is uploaded through PureFTPd)...

vi /etc/pure-ftpd/clamav_check.sh

#!/bin/sh/usr/bin/clamdscan --remove --quiet --no-summary "$1"

... and make it executable:

chmod 755 /etc/pure-ftpd/clamav_check.sh


Now we start the pure-uploadscript program as a daemon - it will call our /etc/pure-ftpd/clamav_check.sh script whenever a file is uploaded through PureFTPd:

pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh


Of course, you don't want to start the daemon manually each time you boot the system - therefore we open /etc/rc.local...

vi /etc/rc.local


... and add the line /usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh to it - e.g. as follows:

#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don't# want to do the full Sys V style init stuff./usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.shtouch /var/lock/subsys/local

Finally we restart PureFTPd:

/etc/init.d/pure-ftpd restart


That's it! Now whenever someone tries to upload malware to your server through PureFTPd, the "bad" file(s) will be silently deleted.


Sunday, March 20, 2011

Fluxbox 1.3.1 on Fedora 14, 13 or 12

If you’re looking for Fluxbox 1.3.1 on Fedora 14, then you’re in luck. I’ve gone through the .spec and cleaned it up a bit, along with a version bump, and have built the 1.3.1 packages in SUSE Build Service under my home directory.


What is fluxbox?
Fluxbox is a windowmanager for X that was based on the Blackbox 0.61.1 code. It is very light on resources and easy to handle but yet full of features to make an easy, and extremely fast, desktop experience. It is built using C++ and licensed under the MIT-License. (from fluxbox.org)


You can upgrade using the following in your repo file:



[fedora-fluxbox]
name=Fluxbox Packages
baseurl=http://download.opensuse.org/repositories/home:/eclipseagent:/Fluxbox/Fedora_$releasever/
enabled=1
gpgcheck=0


Then install running:


sudo yum update fluxbox

Loading ... Loading ...