Installing Project Mono on OpenSuse 11.4

Put together a short tutorial for a Lab for school about install mono on linux machines to enable installation of .net applications and aspx sites.

Installed the following packages seemed to do the trick.

yast2 –install apache2 nano  xsp apache2-mod_mono mono-complete

Got the xsp site code from a old distrubution of xsp. I assuming many of the links did not work because the version of mono and everything else was a much newer version.

http://download.mono-project.com/sources/xsp-if/xsp-1.0.6.1.tar.gz

Used this tool to generate a apache host file for the mono test app folder.

http://go-mono.com/config-mod-mono/Default.aspx

[youtube]https://www.youtube.com/watch?v=f_Bj3zRVHP0[/youtube]

Remote Linux GUI Apps using Putty

Put together a quick video tutorial on setting up X Forwarding through putty to execute linux GUI apps remotely.
This is a different approach then using VNC
It uses putty to forward X11 (linux GUI) commands to a local Windows X server called Xming
Only change on Ubuntu required change to
/etc/ssh/ssh_config
Change lines
# ForwardX11 no
to
ForwardX11 yes

Adding Ubuntu 11 to Windows 2008 R2 Domain

I found this video on youtube that had a great tutorial that made adding a ubuntu machine to 2008 domain a snap.

Step 1: install likewise add to domain

From the Ubuntu terminal perform the following tasks. Note replace ad.joznet.com with your domain name.

  • sudo apt-get install likewise-open5
  • sudo domainjoin-cli join ad.joznet.com administrator
  • sudo reboot

From there you can verify the machine is part of the domain by in to the domain controller and checking under computers (Figure 1)

Step 2: Modify samba to allow domain login

  • sudo apt-get install samba (not sure if this is required)
  • sudo nano /etc/samba/lwiauthd.conf
      • winbind use default domain = yes
  • sudo reboot
Samba authentication

Step 3: Modify super user doer file

  • sudo nano /etc/sudoers
  • add the under under ‘#Allow members of group sudo to execute any command’
    • %ad.joznet.com\domain^admins ALL=(ALL) ALL

Step 4: Login as domain user now

  • “Other user”
    • administrator@ad.joznet.com

[youtube]http://www.youtube.com/watch?v=uwdlhrqy33Y[/youtube]

Varnish Rules WordPress Multi-Site

Getting your wordpress site to load fast can be a jaunting task. I have been testing out Varnish Cache for the last 2 weeks and found it to pretty effective and pushing our resource forward.

WordPress is crazy CPU and database intense. I have been playing Varnish and have found that there are several key areas that I need to have working.

First one would be our affiliate module at our site. It sets a cookie every time ends up on our network or on a affiliate link.

First rule looks for our affiliate cookie. If it doesn’t exist it passes the connection directly to Nginx. If it does exist it simply remove the cookie. The content at that point is cached so when the user visits the site again the page does not have to be reloaded.

sub vcl_recv {
# This checks to see if the client has the affiliate cookie if not the page is not cached.
if (req.http.Cookie !~ “affiliate”) {
return(pipe);
}

#This one fixs uploading issues I had with larger files.
if (req.request == “POST” && req.http.Cookie ~ “wordpress_logged_in_” )
{
return(pass);
}

#Clipping

remove req.http.cookie;
return (lookup);
}

sub vcl_fetch {
if (req.url ~ “wp-(login|admin)”) {

return (pass);
}

## This line I found to be critical to stop the user getting someone elses cached cookies. 🙂

if (!(req.url ~ “wp-(login|admin)”)) {
unset beresp.http.set-cookie;
}
set beresp.ttl = 24h;
return (deliver);
}

Setup memcached 64 bit Centos 5.4

memcached is a great program for storing session data on load balanced servers. It is very fast and easy to setup.

install repository –
Then, under either version, create a file at /etc/yum.repos.d/dag.repo with these lines in it:
>>>
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
>>>
yum install memcached;