- Download Mono from http://www.go-mono.com/mono-downloads/download.html
- Download xsp server and mod_mono from http://ftp.novell.com/pub/mono/sources-stable/. The xsp is simple server that is able to run .NET and mod_mono is an apache module that runs .NET
- Install Mono
- Install xsp
- Unzip xsp and locate the directory in your terminal
- Type:
- ./configure
- make
- sudo make install
- Troubleshooting: pkg-config does not exist on your machine. Install Darwin ports and then follow directions given here: http://pkgconfig.darwinports.com/. After install make sure that path to "port" installation is added to the $PATH variable.
- Install mod_mono
- Unzip mod_mono and locate the directory in your terminal
- Type:
- ./configure
- make
- sudo make install
- Check, where the mod_mono.conf has been installed
- Find your httpd.conf (on Snow Leopard by default it is located in /private/etc/apache2/httpd.conf also the mod_mono.conf should be located in the same directory)
- Edit httpd.config (sudo nano /private/etc/apache2.conf) and insert following line:
Include /private/etc/apache2/mod_mono.conf - Restart apache by typing:
sudo apachectl restart - Troubleshooting: Sometimes, when you try to view the .aspx page the server becomes unresponsive and you'll get: Service Temporarily Unavailable error. If you check your apache error log (/private/var/log/apache2/error_log) most probably you'll find following error there:
Cannot open assembly '/usr/lib/mono/2.0/mod-mono-server2.exe': No such file or directory.
The problem is, that system tries to search for default (Linux) installation directory. You need to modify again the httpd.conf file and insert following line:
MonoServerPath /usr/bin/mod-mono-server
Make sure that contents of /usr/bin/mod-mono-server are pointing to the correct installation of the Mono on your machine (e.g.: exec /Library/Frameworks/Mono.framework/Versions/2.6.4/bin/mono $MONO_OPTIONS "/Library/Frame...) - You are reday to go!
Well, I hope you've found this tutorial usefull. If so, drop me a message! :)
No comments:
Post a Comment