Thursday, March 25, 2010

MojoPortal on SLES 11 with Mono Extension

MojoPortal (http://www.mojoportal.com) is an open source, cross-platform*, content management system (CMS) using ASP.NET as the web development language. Its intended for personal and commercial use and license under the Common Public License 1.0. You can read more on the motivations of the author here.

* - With Mono, cross-platform is a truer statement now. senyumkenyit

On the Windows platform, you would require IIS (web server) with ASP.NET 3.5 SP1 and a database (usually MS SQL Server). With SUSE Linux Enterprise Server 11 and the Mono Extension, we have Apache2 (web server) with Mono 2.4 runtime and PostgresQL database as the counterparts.

This blog entry will show you in rather painless fashion on how to install MojoPortal on SUSE Linux Enterprise Server 11 (with the Mono Extension) and start using it. To help with reading efficiency, I have 2 sections, the first section is the Expressed version where I assumed the reader is skilled and proficient with SUSE whereas the second is the Expanded version where it will include more details and screenshots. Finally, a little more info/detail, my setup has SLES 11 with Mono Extension virtualized on top of SLES 11 Xen hypervisor.

As a next step, I would consider leveraging SUSE Studio to build a small MojoPortal appliance (thus eliminating the need for this journal) and users can simply download the entire workload (OS, App & Data) without doing any "wiring". Tempting... stay tuned... senyum

Pre-requisite: You already have a "vanilla" SLES 11 installed with basic network access and software repositories setup (ie DVD or online through NCC).

Expressed/Summarized (aka for SUSE admins) instructions:

1) Download SUSE Linux Enterprise Mono Extension from this LINK. You only require the SLES-11-Mono-GM-DVD1.iso (140Mb). The other ISO (162Mb) is meant for the older SLES 10 SP2.

2) Download MojoPortal already packaged as an RPM from openSUSE.org. At the time of this entry, I downloaded and used mojoportal-2.3.3.1-3.6.noarch.rpm (12Mb) from this LINK. If link does not work, surf to http://software.opensuse.org/search and search for "mojo" with SLES/SLED 11 selected in the listbox.

3) Install (if not already) Apache2 web server: < zypper in apache2 >

4) Install PostgresQL database: < zypper in postgresql-server >

5) Install Mono Extension/runtime on top of SLES 11. Use YaST -> Software -> Add-On Products or < yast2 add-on > to install the Mono Extension, ISO you downloaded in step (1).

6) Install MojoPortal web application: < rpm -ivh --nodeps mojoportal-2.3.3.1-3.4.noarch.rpm >. The nodeps flag is required as the mojoportal RPM is still looking for the older version 2.0 of Mono. The official SLE 11 Mono Extension is at version 2.4.

7) Ensure PostgreSQL server is running < rcpostgresql start >, and proceed to configure PostgreSQL database for MojoPortal: < /usr/share/mono/asp.net/data/mojoportal-2.3.3.1/init >

8) Configure Apache2 web server for MojoPortal: < cp /usr/share/mono/asp.net/conf/mojoportal-2.3.3.1/mojoportal.conf /etc/apache2/conf.d/ > and edit the mojoportal.conf file in the /etc/apache2/conf.d/ directory < vi /etc/apache2/conf.d/mojoportal.conf >, put a # in front of the line < MonoServerPath mojoportal "/usr/bin/mod-mono-server2" > and remove the # in the following line < #MonoServerPath mojoportal "/opt/novell/mono/bin/mod-mono-server2" >. Restart Apache2 to have these configuration changes in effect < rcapache2 restart >.

9) Open a web browser and point to http://[hostname Or IP addr]/mojoportal . The initial startup will take awhile as MojoPortal initializes for the first time. Login as MojoPortal Administrator with ID admin@admin.com and Password admin.

10) To ensure Apache2 web server and PostgreSQL database server is always auto-started on reboot: < chkconfig -s apache2 on > and < chkconfig -s postgresql on >

For more usage knowledge, please see MojoPortal.com for details at http://www.mojoportal.com/documentation.aspx
Link

Expanded/Detailed (aka for those new to SUSE) instructions:

1) Download SUSE Linux Enterprise Mono Extension from this LINK. You only require the SLES-11-Mono-GM-DVD1.iso (140Mb). The other ISO (162Mb) is meant for the older SLES 10 SP2.


2) Download MojoPortal already packaged as an RPM from openSUSE.org. At the time of this entry, I downloaded and used mojoportal-2.3.3.1-3.6.noarch.rpm (12Mb) from this LINK. If link does not work, surf to http://software.opensuse.org/search and search for "mojo" with SLES/SLED 11 selected in the listbox.


3) Install (if not already) Apache2 web server via YaST -> Software -> Software Management.


4) Install PostgresQL database via YaST -> Software -> Software Management.


5) Install Mono Extension/runtime on top of SLES 11. Use YaST -> Software -> Add-On Products or < yast2 add-on > to install the Mono Extension, ISO you downloaded in step (1).





6) Install MojoPortal web application downloaded in step (2) with the following command executed as root: < rpm -ivh --nodeps mojoportal-2.3.3.1-3.4.noarch.rpm >. The nodeps flag is required as the mojoportal RPM is still looking for the older version 2.0 of Mono. The official SLE 11 Mono Extension is at version 2.4.

7) Ensure PostgreSQL server is running < rcpostgresql start >, and proceed to configure PostgreSQL database for MojoPortal: < /usr/share/mono/asp.net/data/mojoportal-2.3.3.1/init >

8) Configure Apache2 web server for MojoPortal: < cp /usr/share/mono/asp.net/conf/mojoportal-2.3.3.1/mojoportal.conf /etc/apache2/conf.d/ > and edit the mojoportal.conf file in the /etc/apache2/conf.d/ directory < gedit /etc/apache2/conf.d/mojoportal.conf >, put a # in front of the line < MonoServerPath mojoportal "/usr/bin/mod-mono-server2" > and remove the # in the following line < #MonoServerPath mojoportal "/opt/novell/mono/bin/mod-mono-server2" >.

Restart Apache2 to have these configuration changes in effect < rcapache2 restart >.

9) Open a web browser and point to http://[hostname Or IP addr]/mojoportal. The initial startup will take awhile as MojoPortal initializes for the first time. Login as MojoPortal Administrator with ID admin@admin.com and Password admin.


10) To ensure Apache2 web server and PostgreSQL database server is always auto-started on reboot, use YaST -> System -> System Services (Runlevel)


For more usage knowledge, please see MojoPortal.com for details at http://www.mojoportal.com/documentation.aspx
Go to http://software.opensuse.org/search and enter "mojoportal" in the text field and ensure you select SLES/SLED 11 in the drop-down box and click Search.

Cheers!
peace