HowTo:Configure iFolder Enterprise Server on Fedora Core and CentOS

From iFolder

Table of contents

QuickStart Guide

CentOS 4.3

Here are all of the steps needed to get iFolder Enterprise Server running on CentOS 4.3:

yum -y install httpd unzip libungif
wget http://go-mono.com/download-stable/rhel-4-i386/mono.zip
wget http://go-mono.com/download-stable/rhel-4-i386/webserver.zip
unzip mono.zip
unzip webserver.zip
rpm -Uvh mono-core-*.i586.rpm mono-data-1*.rpm mono-web-*.rpm mod_mono-1*.rpm xsp-*.rpm \
mono-winforms-1.2.4-3.novell.i586.rpm libgdiplus-1.2.4-1.rhel4.novell.i386.rpm
wget http://forgeftp.novell.com/ifolder/server/3.5/iFolderServer-CentOS.repo
cp iFolderServer-CentOS.repo /etc/yum.repos.d/
yum -y install ifolder3-server
mkdir /var/www/.config
chown -R apache:apache /var/www/.config
Configure the Server's Firewall to allow http traffic
Disable SELinux
/etc/init.d/httpd start

Fedora Core 4

Here are all of the steps needed to get iFolder Enterprise Server running on Fedora Core 4:

wget http://www.go-mono.com/download/fedora-4-i386/mono.repo
cp mono.repo /etc/yum.repos.d/
wget http://forgeftp.novell.com/ifolder/server/3.5/iFolderServer-Fedora.repo
cp iFolderServer-Fedora.repo /etc/yum.repos.d/
yum -y install ifolder3-server
mkdir /var/www/.config
chown -R apache:apache /var/www/.config
Configure the Server's Firewall to allow http traffic
Disable SELinux
/etc/init.d/httpd start

Fedora Core 5

Here are all of the steps needed to get iFolder Enterprise Server running on Fedora Core 5.

NOTE: Until there is an rpm package of mod_mono (http://lists.ximian.com/pipermail/mono-list/2006-April/031127.html), this process is slightly more involved:

yum -y install httpd mono-web mono-core mono-data 
wget -r -np -nH -nd --accept=rpm  http://forgeftp.novell.com/ifolder/server/3.5/current/linux/FEDORA-CORE-5.0-i386/rpms/
rpm -Uvh log4net*.rpm libflaim-4*.rpm
rpm -Uvh --nodeps ifolder3-server*.rpm
mkdir /var/www/.config
chown -R apache:apache /var/www/.config
Build Mod_Mono and XSP
Configure the Server's Firewall to allow http traffic
Disable SELinux
/etc/init.d/httpd start

Detailed Guide

Run the following commands as root or use sudo depending on your personal preference and environment setup.

Install Mono and Apache2

The following step(s) will install Mono, Apache2 and a few utility and dependency packages.

CentOS 4.3

Install Apache2 and the unzip utility so that we can extract the Mono zip files

yum -y install httpd unzip

Download and Install Mono Red Hat Linux Enterprise 4.0 packages

wget http://go-mono.com/download/rhel-4-i386/mono.zip
wget http://go-mono.com/download/rhel-4-i386/webserver.zip
unzip mono.zip
unzip webserver.zip
rpm -Uvh mono-core-*.i586.rpm mono-data-1*.rpm mono-web-*.rpm mod_mono-1*.rpm xsp-*.rpm

Fedora Core 4

Configure Yum with Mono Repository

wget http://www.go-mono.com/download/fedora-4-i386/mono.repo
cp mono.repo /etc/yum.repos.d/

Install Mono and Apache2

yum -y install httpd mono-core mono-web mono-data mod_mono

Fedora Core 5

Install Mono and Apache2

yum -y install httpd mono-core mono-web mono-data

NOTE: Since there is not an mod_mono rpm package for Fedora Core 5 yet, we will need to build mod_mono and xsp from svn. The instructions for this process can be found here

Configure Yum with iFolder Server Repository

CentOS 4.3

wget http://forgeftp.novell.com/ifolder/server/3.5/iFolderServer-CentOS.repo
cp iFolderServer-CentOS.repo /etc/yum.repos.d/

Fedora Core 4

wget http://forgeftp.novell.com/ifolder/server/3.5/iFolderServer-Fedora.repo
cp iFolderServer-Fedora.repo /etc/yum.repos.d/

NOTE: This process will not work for Fedora Core 5 until there is a mod_mono rpm package.

Install iFolder Server

CentOS 4.3

yum -y install ifolder3-server

Fedora Core 4

yum -y install ifolder3-server

Fedora Core 5

wget -r -np -nH -nd --accept=rpm  http://forgeftp.novell.com/ifolder/server/3.5/current/linux/FEDORA-CORE-5.0-i386/rpms/
rpm -Uvh log4net*.rpm libflaim-4*.rpm
rpm -Uvh --nodeps ifolder3-server*.rpm

Create .config directory and assign Apache ownership

Failing to following these steps will result in the server not [working (https://bugzilla.novell.com/show_bug.cgi?id=163666)]. Consider yourself warned.

mkdir /var/www/.config
chown -R apache:apache /var/www/.config

Configure the Server's Firewall to allow http traffic

If your running a firewall on this machine, your going to need to allow incoming traffic on port 80 (http). Eventually port 443 (https) will also need to allow incoming traffic once the iFolder Enterprise Server builds support it.

system-config-securitylevel-tui

If the Firewall is enabled, select the Customize button and enable WWW (http) and Secure WWW (HTTPS).

Disable SELinux

Since the iFolder team has limited exposure with SELinux, we haven't had time to research what SELinux configuration changes are required to get the iFolder server to work properly in an SELinux environment. For the time being this means you will need to disable SELinux to get iFolder Server to work. If anyone from the community is familiar with SELinux, please feel free to modify this how-to with the necessary steps.

Modify SELinux configuration file

vi /etc/sysconfig/selinux

Change

SELINUX=enforcing

to

SELINUX=permissive

or

SELINUX=disabled

Once you've saved the change, reboot the machine

reboot

Start Apache

If Apache isn't running after rebooting the machine, you'll want to do the following:

Start the Service

/etc/init.d/httpd start

Configure the Apache service so it restarts automatically on system startup

chkconfig httpd on

Using the iFolder Server

Your now ready to provision addtional users or begin accessing your server with the default admin account.

Trouble Shooting

Service Temporarily Unavailable

When attempting to access http://host/ifolder or http://host/admin you receive a Service Temporarily Unavailable error in the browser.

Unable to login to iFolder Server

If your able to access http://host/ifolder or http://host/admin, but unable to login and you see errors like this "ERROR Simias.Service.Manager - Local database object does not exist." in your server's /var/lib/simias/Simias.log, then you will need to do the following steps as root:

  • Stop Apache
/etc/init.d/httpd stop
  • Remove the following directories
rm -rf /tmp/.wapi
rm -rf /tmp/apache-temp-aspnet-0
rm -rf /var/lib/simias/*
  • Start Apache
/etc/init.d/httpd start

Your session has been closed Please log in

It is possible that apache does not have the correct rights to the /var/www/.config directory or it does not exist. When viewing the Simias.log you will see the following error:

   2006-04-05 14:46:56,538 [23112624] INFO  Simias.Storage.Provider.Provider - 
   Created new store /var/lib/simias.
   2006-04-05 14:46:57,540 [23112624] ERROR Simias.Service.Manager - Object 
   reference not set to an instance of an object
   System.NullReferenceException: Object reference not set to an instance of an object
   in <0x00064> Simias.Storage.Identity:get_Credential ()
   in <0x00016> Simias.Storage.Identity:get_PublicKey ()
   in <0x004ba> Simias.Storage.Store:.ctor ()


Be certain that you have created the /var/www/.config directory and that you have chown'd it to the apache user and group.

FC5: After restarting Apache: Simias.CreateException: Failed to create Flaim DB

If after restarting Apache you receive a stacktrace similar to:

    Simias.CreateException: Failed to create Flaim DB. --> 
    Simias.SimiasException: Flaim error FERR_FILE_EXISTS FERR_FILE_EXSITS-- 
    End of inner exception stack trace --

Because of a bug in Mono on FC5, when Apache shuts down Mono continues to run. As a result when you restart Apache new Apache/Mono processes are created, but they can not access the Flaim DB & files because they are locked by the old Mono processes.

Until a fix is available, you will need to manually kill the old Mono processes. See How to kill Mono.