iFolder on Ubuntu

Packages

sudo apt-get install build-essential automake autoconf mono-complete liblog4net1.2-cil uuid-dev libxml2-dev mono-apache-server mono-apache-server2
gsoap libapache2-mod-mono libncurses-dev libtool g++-4.3 gcc-4.3 apache2

Modules to enable

sudo a2enmod ssl
sudo a2enmod rewrite

See /usr/share/doc/apache2.2-common/README.Debian.gz for ssl information

Set hostname

First set your hostname using the hostname command, then edit the hosts file using tab seperation (all entries per host on one line)

hostname servershostnamegoes here
sudo vim /etc/hosts
127.0.0.1    servernamegoeshere    localhost

Install Flaim

cd ~
mkdir tmp
cd tmp
wget http://forge.novell.com/modules/xfcontent/private.php/flaim/development/flaim/downloads/source/libflaim-4.9.989.tar.gz -O - | tar -xzf -
cd libflaim-4.9.989/
sed -i "s/\-Werror//" Makefile
make
sudo make install

Install iFolder

cd ~/tmp
wget http://sourceforge.net/projects/ifolder/files/iFolder%20Clients/3.8.0/simias-1.8.3.9328.1.tar.gz/download -O - | tar -xzf -
cd simias-1.8.3.9328.1/
export CSC_LIBFLAG="/target:library"
export WSDL=wsdl2
export CSC2="gmcs -d:MONO -d:MONONATIVE"
export CSC="gmcs -d:MONO -d:MONONATIVE"
export MONO=mono
export CC=gcc-4.3
export CXX=g++-4.3

*NOTE - The following 3 lines are all one command*
sed -i -e "s+\$(GSOAP_PATH)/wsdl2h+wsdl2h+g" -e "s+\$(GSOAP_PATH)/soapcpp2+soapcpp2+g"
-e "s+\$(GSOAP_PATH)/stdsoap2.c+/usr/include/gsoap/stdsoap2.c+g"
-e "s+\$(GSOAP_PATH)/stdsoap2.h+/usr/include/stdsoap2.h+g" src/core/libsimias/Makefile.am

make
sudo make install
sudo updatedb
locate simias-server-setup
sudo /where/it/is/simias-server-setup

The only changes I made during the set up prompts was the choice not to use LDAP and the insertion of my hostname (which we set in the first few steps of this doco), pretty much kept everything else as the default.

You may want to open port 443 on the firewall (below is an example of just opening 443 to my internal network).

iptables -A INPUT -s 192.168.0.0/24 -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT

sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/simias.conf

sudo mkdir -p /var/www/.config/.mono/
sudo chown -R www-data:www-data /var/www/.config/

Locate the ifolder-admin-setup script and run it, make sure that you apply the correct apache user and group eg www-data

sudo /where/it/is/ifolder-admin-setup

Locate ifolder-web-setup (same as above and run it as sudo be sure to enter your external URL instead of accepting …localhost:443 and again make sure that the corrent apache user and group are used.

sudo /where/it/is/ifolder-web-setup

fix up the conf files

sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/ifolder_admin.conf

and

sudo sed -i 's/apache2\/mod_mono.conf/apache2\/mods-enabled\/mod_mono.conf/g' /etc/apache2/conf.d/ifolder_web.conf 

then restart apache2

/etc/init.d/apache2 restart

Gochyas (Read these first)

SSL HostName Issue

You will have to create a self signed Cert as part of this install if you are choosing SSL when installing iFolder. You will have to Google that but take note of the following during the creation of the cert.

Did not get much joy in the browser so I checked the /var/log/apache2/error.log and saw the following

[warn] RSA server certificate CommonName (CN) `ubuntu’ does NOT match server name!?

To solve this make sure that you have your hostname set as the ServerName in the apache config files that are being used. And most importantly this name must patch the setting called Common Name (eg, YOUR name) []: that you have to enter while creating your certificate eg running

sudo openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/server.cert -keyout /etc/ssl/certs/server.key

mod_mono

During the install of mod_mono I chose yes for the following (the default is no)

Configuration file `/etc/apache2/mods-available/mod_mono.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** mod_mono.conf (Y/I/N/O/D/Z) [default=N] ? Y
Advertisements

6 thoughts on “iFolder on Ubuntu

  1. These are errors that I am generating at the moment:

    awk ‘ /CommonName/ { print NR,$0 } ‘ /var/log/apache2/error.log

    8893 [Sun Apr 04 17:15:20 2010] [warn] RSA server certificate CommonName (CN) `localhost.localdomain’ does NOT match server name!?
    8896 [Sun Apr 04 17:15:21 2010] [warn] RSA server certificate CommonName (CN) `localhost.localdomain’ does NOT match server name!?

    These are errors that I am generating at the moment:

    How about more detail on properly setting up the certificates.

    When you state:
    “To solve this make sure that you have your hostname set as the ServerName in the apache config files that are being used” which apache config files are you referring to?

    I am a little confused by this statement as well:
    “And most importantly this name must patch the setting called “Common Name (eg, YOUR name) []:” that you have to enter while creating your certificate eg running”

    • Hi
      Hostname…
      If you are not sure what your servers hostname is you can type “hostname” at the command prompt and it will output the name. If you would like to change the servers hostname type “hostname newhostname” at the command prompt (eg “hostname dog”) Your hostname will now be “dog”.
      Hosts file…
      Another area to check is the /etc/hosts file. Be sure to have “127.0.0.1 and localhost and hostname” all as one entry on a single line seperated by tabs, eg 127.0.0.1 localhost dog).
      Apache conf files…
      It is important to add the following parameter to the apache configuration file associated with the iFolder installation “ServerName hostname” eg ServerName dog. The name of the apache conf file will depend on how you have set up apache (if you are using virtual hosts etc) It may be etc/apache2/sites-enabled/000-default or etc/apache2/sites-enabled/default-ssl or even etc/apache2/apache.conf.
      Certificate…
      You can use a command like the following to create a certificate.
      sudo openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/server.cert -keyout /etc/ssl/certs/server.key
      At the point where is asks you to enter “Common Name (eg, YOUR name)[]:” … Do not enter your name (like John Smith), enter the servers hostname (like dog).
      Hope this helps
      Tim

  2. Pingback: Tweets that mention iFolder on Ubuntu « Tech Team -- Topsy.com

  3. Thank you for this article very interesting.

    I have a little problem with my installation IFOLDER + LDAP. I’m using ldap but i can’t create compatible users to synchronise with ifolder.

    All is ok for both of the configuration. But when synchronization happens, no user is detected? I don’t know where do i have to create them.

    Is it necessary a user in a specific organizational unit ?

    I hope that someone could help me.

    Thanks

    ———-SIMIAS CONF—————————————————————————————————————

    objectClass: value :top
    OpenLDAP
    Creating cn=ifolderadmin,dc=example,dc=com…
    Skipped (User Exists)
    Creating cn=simiasproxy,dc=example,dc=com…
    Checking cn=simiasproxy,dc=example,dc=com…
    Done
    Skipped (User Exists)
    Checked cn=simiasproxy,dc=example,dc=com…
    Checking cn=ifolderadmin,dc=example,dc=com…
    Done
    Adding LDAP settings to /var/simias/data/simias/Simias.config…
    Checking cn=simiasproxy,dc=example,dc=com…
    Done
    Done
    Configuring User Movement plugin..

    Configuring Ldap plugin..

    Setting up Log4Net file…
    Done
    Setting up permissions…
    Done

    SUCCESS

    —————————————————————LDAP configuration——————————————-

    # Exportation LDIF pour :
    # Généré par phpLDAPadmin ( http://phpldapadmin.sourceforge.net/ ) pour August 26, 2010 3:26 pm
    # Serveur: My LDAP Server (127.0.0.1)
    # Portée de la recherche: sub
    # Filtre de recherche: (objectClass=*)
    # Entrées totales: 5

    dn: dc=example,dc=com
    objectClass: top
    objectClass: dcObject
    objectClass: organization
    o: novell
    dc: example

    dn: cn=admin,dc=example,dc=com
    objectClass: simpleSecurityObject
    objectClass: organizationalRole
    cn: admin
    description: LDAP administrator
    userPassword: novell

    dn: cn=ifolderadmin,dc=example,dc=com
    sn: ifolderadmin
    givenName: ifolderadmin
    displayName: ifolderadmin
    userPassword: novell
    objectClass: inetOrgPerson
    uid: ifolderadmin
    cn: ifolderadmin

    dn: cn=simiasproxy,dc=example,dc=com
    sn: simiasproxy
    givenName: simiasproxy
    displayName: simiasproxy
    userPassword: novell
    objectClass: inetOrgPerson
    uid: simiasproxy
    cn: simiasproxy

    dn: ou=novell,dc=example,dc=com
    objectClass: organizationalUnit
    objectClass: top
    ou: novell

    ———————————SIMIAS.LOG————————————————————————————————————————————————

    2010-08-26 17:13:08,393 [User Move thread] DEBUG Simias.UserMovement.iFolderUserMove – UpdateUserMoveQueue: Updating user Reprovision queue, There are 0 users to be Reprovisioned
    2010-08-26 17:13:38,394 [User Move thread] DEBUG Simias.UserMovement.iFolderUserMove – UpdateUserMoveQueue: Updating user Reprovision queue, There are 0 users to be Reprovisioned
    2010-08-26 17:14:08,395 [User Move thread] DEBUG Simias.UserMovement.iFolderUserMove – UpdateUserMoveQueue: Updating user Reprovision queue, There are 0 users to be Reprovisioned
    2010-08-26 17:14:38,396 [User Move thread] DEBUG Simias.UserMovement.iFolderUserMove – UpdateUserMoveQueue: Updating user Reprovision queue, There are 0 users to be Reprovisioned
    2010-08-26 17:15:08,397 [User Move thread] DEBUG Simias.UserMovement.iFolderUserMove – UpdateUserMoveQueue: Updating user Reprovision queue, There are 0 users to be Reprovisioned
    2010-08-26 17:15:38,398 [User Move thread] DEBUG Simias.UserMovement.iFolderUserMove – UpdateUserMoveQueue: Updating user Reprovision queue, There are 0 users to be Reprovisioned

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s