Thursday, August 1, 2013

Installing Mono on Ubuntu

So I went into the process of installing Mono (from source) on Ubuntu. While the process is pretty straightforward, the problem is no single place to understand the full process. So I am listing the process here for my own sake and it will probably be out of date within 1 week of publishing this post.

Starting point is from a fresh install of Ubuntu Server. I will just list the steps first, then some explanations.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git autoconf libtool gettext pkg-config build-essential
cd ~
git clone git://github.com/mono/mono.git
cd mono
git checkout tags/mono-3.2.0
./autogen.sh --prefix=/usr/local
make get-monolite-latest
make
sudo make install
mozroots --import --ask-remove
sudo vi /etc/environments
add line "EnableNuGetPackageRestore=true"
reboot to load new environments file
modify .nuget\NuGet.targets file in your solution

If you want to host a website with Nginx and FastCGI Mono Server

sudo apt-get install nginx
cd ~
git clone git://github.com/mono/xsp.git
cd xsp
git checkout tags/3.0.11
./autogen.sh --prefix=/usr/local
make
sudo make install

Explanation:

sudo apt-get update
sudo apt-get upgrade

  • You do want all of the O/S updates, right?

sudo apt-get install git autoconf libtool gettext pkg-config build-essential

  • Install packages required to build Mono.
  • Install git to download the source from Github

cd ~
git clone git://github.com/mono/mono.git
cd mono
git checkout tags/mono-3.2.0

  • Download latest source for Mono from Github
  • Rollback source to the latest released version by git tag.

./autogen.sh --prefix=/usr/local
make get-monolite-latest

  • Initial setup to enable build
  • get-monolite-latest will download a "lite" version of the Mono C# compiler. This is required for computers without Mono already installed.

make
sudo make install

  • Build and Install

mozroots --import --ask-remove

  • To add trusted root certificates into your server. You will need to do this to be able to download packages from Nuget's website via https.

sudo vi /etc/environments
add line "EnableNuGetPackageRestore=true"
reboot to load new environments file

  • If you use NuGet Package Restore, this enable it when you build your solution. There is no Visual Studio checkbox you can click.

modify .nuget\NuGet.targets file in your solution

<SolutionDirTrimmed Condition=" '$(OS)' != 'Windows_NT'">$(SolutionDir)</SolutionDirTrimmed>
<SolutionDirTrimmed Condition=" '$(OS)' == 'Windows_NT'">$(SolutionDir.Trim('\\'))</SolutionDirTrimmed>
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDirTrimmed)" </RestoreCommand>

Wednesday, February 20, 2013

My Podcasts

Time to fire up the blog...

This post just lists up the podcasts I regularly listen to with some description. I have a long commute so I can easily catch up on podcasts. I also listen to podcasts while I exercise. I can't really listen to podcasts while I work. The podcast is either just background noise or I don't do any work. Not sure how other people catch up on podcasts while working. I am a very "single threaded" person.

Before listing up some of the podcasts, I need to mention the podcast app I use. Downcast (http://www.downcastapp.com/) is the one I use. Lots of great settings with some information iCloud synced to multiple devices. Some of my favorite things about the app are speed adjustment (I listen at 1.5x speed), pull to refresh, and background downloading per iOS rules. One thing to watch out is the episode iCloud sync. It sometimes deletes unplayed episodes because I didn't download it on another device.

Life:

No sure how to name this category. Probably could have just listed as "Not Technology".


TED Talks (http://www.ted.com/):
  • You have heard of TED right?
Wait Wait...Don't Tell Me (http://www.npr.org/programs/wait-wait-dont-tell-me/)
  • Funny NPR news game show.
Car Talk (http://www.cartalk.com/)
  • NPR show that talks about cars. Hosts are very funny.
This American Life (http://www.thisamericanlife.org/)
WNYC's Radiolab (http://www.radiolab.org/)
Rodderick on the Line (http://www.merlinmann.com/roderick/)
  • Hard to explain, but very stream of consciousness and funny. Warning, bad language, so adults only.

Tech:

  • Most of my work is in .NET.
Developing Perspective (http://developingperspective.com/)
  • Podcast on developing in iOS, but a lot of great concepts that can be used in development with other technologies.
  • I told you I work with .NET.
Herding Code (http://herdingcode.com/)
  • Let me tell you again, I work with .NET.
  • Stack Exchange people talking about their work and decisions.