Location: PHPKode > projects > XMLNuke Web Development Framework XML > xmlnuke-php5-v3.5r356/xmlnuke-php5/data/sites/docs/xml/en-us/install_ubuntu_csharp.en-us.xml
<?xml version="1.0" encoding="utf-8"?>
<page>
	<meta>
		<title>Installing XLMNuke CSharp on Ubunto(Gutsy)/Debian/Linux
</title>
		<abstract>How to install XMLNuke CSharp on Ubuntu(Gutsy)/Debian/Linux.</abstract>
		<created>5/2/2008 21:43:09</created>
		<modified>Wed Nov 19 2008 16:50:59</modified>
		<keyword>xmlnuke</keyword>
		<groupkeyword>key_installing</groupkeyword>
	</meta>
	<blockcenter>
		<title>Installing XLMNuke CSharp on Ubunto(Gutsy)</title>
		<body>
			<p>The installation of XMLNuke CSharp in Linux environments requires that the Mono equivalent of .NET 2.0 be installed. To do this, follow the steps below:</p>
			<p>
				<code information="Installing Mono">
sudo aptitude install mono-gmcs mono-apache-server2  asp.net2-examples mono-xsp2
sudo aptitude install libapache2-mod-mono apache2-mpm-prefork
</code>
Important note: The compilation of apache used in this installation was PreFork. This installation is standard if you run it concurrently with another language, like PHP5. If you already have apache installed, and it is not PreFork, please remove it from the installation.
</p>
			<p>
After installing Mono, open the file /etc/apache2/mods-available/mod_mono.conf and uncomment the line that contains the mono-server2 (reference to ASP.NET 2.0), so that it is more or less like this:

<code information="File /etc/apache2/mods-available/mod_mono.conf">
AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx
DirectoryIndex index.aspx

# Include the web application definitions generated by
# mono-server-update.conf. If you want to use XSP2, reverse the
# comments.
#Include /etc/mono-server/mono-server-hosts.conf
Include /etc/mono-server2/mono-server2-hosts.conf
</code></p>
			<p>
Once the mono installation process is completed, XMLNuke must be compiled. If you downloaded a pre-compiled version for .NET, please skip this step.
</p>
			<p>
				<code information="Compiling XMLNuke CSharp">
cd xmlnuke/xmlnuke-csharp-sources
./build.sh
</code>
			</p>
			<p>
Once the installation/compilation process for XMLNuke is finalized, the apache must be configured. Copy the following lines inside the configuration of your Virtual Host:

</p>
			<p>
				<code information="Configuring Apache"><![CDATA[
Alias /xmlnuke-csharp "[YOURDIR]"

AddMonoApplications default "/xmlnuke-csharp:[YOURDIR]"

<Directory [YOURDIR]>
    SetHandler mono
    <IfModule mod_dir.c>
       DirectoryIndex index.aspx default.aspx
    </IfModule>
</Directory>
]]></code>
Remember to substitute [YOURDIR] for the installation directory of your XMLNuke. Next, restart Apache and everything should be working. 
</p>
		</body>
	</blockcenter>
	<blockcenter>
		<title>Problem solving</title>
		<body>
			<p>
				<ul>
					<li>If the log error for apache shows a code similar to the one described below: Failed running '/usr/lib/pkgconfig/../../bin/mod-mono-server --filename /tmp/mod_mono_server_default --applications /samples:/usr/share/asp.net2-demos --nonstop (null) (null) (null) (null) (null) (null) (null)'. Reason: No such file or directory. This occurs because your installation probably did not correctly treat the selection of the mod-mono-server2 when you used ASP.NET 2.0. To resolve this specific problem:
 <br/><br/>
ln -s /usr/bin/mod-mono-server2 /usr/bin/mod-mono-server<br/><br/></li>
					<li>The installation was only successful when the apache configuration described above is defined for the ENTIRE server and not for a Virtual Host. To configure it for the entire server, the configuration file was placed within the mod-enabled.
<br/><br/></li>
					<li>XMLNuke CSharp was tested with the following mono versions: 1.2.4 (Ubuntu) e 1.2.1 (Debian Etch)<br/><br/></li>
					<li>The following tutorial was followed to install Mono on Apache: <a href="https://help.ubuntu.com/community/ModMono" target="_blank">https://help.ubuntu.com/community/ModMono</a>. Entretanto não está sendo utilizado o recurso do arquivo <i>.webapp</i>. However, the file resources are not being used. In its place, the <i>AddMonoApplication</i> is being configured. </li>
				</ul>
			</p>
		</body>
	</blockcenter>
	<blockcenter>
		<title>Installing the MySql Connector to .NET on Ubuntu
</title>
		<body>
			<p>
The most recent .NET MySql connector must be downloaded (that supports .NET 2.0). You can obtain it at: <a href="http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.1.4-noinstall.zip/from/pick#mirrors">http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.1.4-noinstall.zip/from/pick#mirrors</a>.  (Remeber to select only the "Windows and Binaries" version without the installer). Once downloaded, access the .ZIP file directory and execute the following commands:</p>
			<p>
				<code information="Install the .NET connector of MySql">
mkdir mysqlconnector
cd mysqlconnector
unzip ../mysql-connector-net-5.1.4-noinstall.zip
cd bin
sudo gacutil -i MySql.Data.dll
cd /usr/lib/mono/2.0/
sudo ln -s ../gac/MySql.Data/5.1.4.0__c5687fc88969c44d/MySql.Data.dll 
</code>
Restart apache.
</p>
		</body>
	</blockcenter>
</page>
Return current item: XMLNuke Web Development Framework XML