I’ve just read quite an interesting article on the Linux Mint blog courtesy of Linux Today. It describes how Clem, a Linux Mint user, managed to get a refund on Windows that was pre-installed on a Dell laptop they purchased, and then donated the money to Linux Mint!
One of the comments tries to argue that Clem shouldn’t have been entitled to a refund as they knew what they were buying. I don’t hold with this argument as last time I tried to purchase any laptop that wasn’t a netbook I found it impossible to buy one without Windows pre-installed – and to make it worse they were pretty much all Vista!
With people like Clem engaging in this kind of action, and with Ubuntu trying to make Linux more accessible to the average user, hopefully one day I’ll be able to purchase a laptop and have a choice of what I put on it.
I have recently been playing around with an old laptop and it’s give me the taste for delving deeper into the world of Linux. For this I normally use VirtualBox, but a friend of mine (who is an avid Mac fan) was recently raving about VMWare’s Fusion. I decided to see if they had anything similar for linux and give it a whirl. I toddled along to the VMWare site, couldn’t find anything, so Googled VMWare Server and went straight to the relevant page!
I downloaded, installed and connected to the VMWare Server admin via Firefox. All well and good. So now I wanted to actually use it. I decided to test it out using Debian as the Guest. I chose Debian simply because I know it, and I know it has a net install, meaning I could test out a minimum system.
I downloaded the ISO, and then set about creating my new Debian Guest. First problem, I couldn’t find the Debian ISO! After reading the docs (which always takes second place to proding and poking around) it turns out that you need to add a Data Store, using the Commands menu on the right hand side of the VMWare admin home.
Once I had sorted this out I then created the new Guest specifying NAT networking, attached the Debian ISO and started it up.I selected NAT networking because Host Only will not let me get access to the outside world from the guest – obviously a pain as I was using the Debian net install – and I have always found Bridge Networking to be as flaky as a delicious if not slightly dry Cadbury’s chocolate bar.
Hmm, VMWare is clearly very different to VirtualBox because it didnt open a window where I could see the new guest booting up. How do I communicate with the guest. Again, after some poking I found a tab for the Console, which at first asked me to install a Firefox plugin, but once that was installed I could see the Guest.
I then installed Debian and restarted the Guest server.
Once rebooting I then tried to install OpenSSH. Slight problem, I couldn’t get an outside line! I couldn’t even ping Google. Hmm. After some searching I found out that the problem was DHCP was not starting up. I ran the command (as root)
$ dhclient eth0
This allowed me to connect to the outside world, and to ensure it would always start up I followed the commands from this post within Debian Help:
Add the line
auto eth0
to /etc/network/interfaces
After this I managed to successfully install Open SSH server, by running the following command as root:
apt-getinstall openssh-server
So now it was already to I tried to connect via SSH from my Host Ubuntu system to my Guest Debian system. But how? Again, after some searching I found out that you had to forward some ports. On the host, edit /etc/vmware/vmnet8/nat/nat.conf. Uncomment the line under the SSH section that says:
# 8889 = 172.16.81.128:22
the restart the VMWare networking services:
sudo/usr/lib/vmware/net-services.sh restart
You can see from the nat.conf file that you can also forward other ports such as Web and FTP
Finally, you can now connect to your Guest from your Host with the command:
ssh-p8889 root@localhost
It took some effort, but I can now successfully connect to any number of Guests from my Host.
Sometimes I really love the Linux world. Sometimes it all fits so neatly together and lets you just get stuff done. Sure it might take a bit of digging around, but when it all comes together it really is beautiful!
I’m waxing lyrical today because I have just managed to fit all the pieces together for a certain aspect of a large project we’re working here at ibrow towers. This particular problem was a three parter:
Users can FTP into a server into their own directory.
These users should be created automatically (i.e. sign up on site, get details, ftp) and have the same login credentials as the rest of the site
Uploads to the FTP server should be monitored and each file processed
To solve this three part problem, I utilised the following:
VSFTPD FTP Server using MySQL as the credentials database
Recently I’ve been getting increasingly frustrated with both Thunderbird. Don’t get me wrong, it is an excellent email solution, but lately I’ve been finding that it is slowing down due to the amount of emails I have. I do have a webmail package attached to it, which I use of Thunderbird has slowed to a grinding halt, but sometimes, and as hard as this may be to believe, I’m not connected to the internets!
Also, using Thunderbird is just not geeky enough.
So I was looking for something better, something quicker that allowed me to download emails, but keep in sync my IMAP. And don’t forget, something truly dweeby. For me, this meant the command line. I find the more I use Linux the more I am drifting towards the command line as a way of getting things done.
After a bit of searching around, I found a Rails package called Sup. This looked like the ideal solution from my point of view. The authors seemed to be coming from the same head space I am regarding email, so I thought I’d give it a try.
After several hours hacking about, I now have it fully working, and even sending email, and I’ll outline the steps I took to get it up and running. I’m running Xubuntu Jaunty, but hopefully this will apply to most Ubuntu and Debian versions.
I love Ubuntu and today reminded me exactly why. It’s just so easy to do stuff in it!
I run a LAMP development server off my laptop, and today some of the PHP I was writing was throwing up some errors. Unfortunately I hadn’t installed XDebug which makes life so much easier when debugging PHP.
Oh no, I though. I’ll have to download it, install it, update the PHP.ini file. Argh.
But wait…no! I have Ubuntu, all it took was 2 easy steps:
Today I had a little problem deploying a new update to a site for one of my clients.
Normally the way I deploy is by writing a build script that updates the code from an SVN repository. This is easy peasy and means that once setup, the site doesn’t have to be touched apart from running the build script when a new update has been released.
However, this client has just moved their site to a new server, and for reasons that are beyond me, it doesn’t have Subversion installed, nor is it going to. So I have a problem. My method of deployment is SVN, but I can’t deploy using SVN. Also, the location the website is to be deployed to contains lots of cached images and web pages that I don’t want to wipe.
1. Checkout a brand new copy of the latest from the SVN repository onto my workstation.
2. Copy the code from this checkout up to the server using rsync. I need to make sure I don’t delete any files on the server that don’t exist on the workstation, and also make sure I don’t overwrite any newer files on the server than in the repository.
So this is how I did it.
Step One – SVN Checkout.
To create a clean checkout I did the following
1. Create a new directory
$ mkdir LIVE
2. Checkout the repository
$ svnco http://svnserver/reportistory/trunk/ ./LIVE --username rob
It should then pump out a load of info.
Now I could go into the newly checked out repository and update database settings etc to reflect the live server, plus chmod any directories I needed to (e.g. for writing cache files to etc)
The directory is now all ready to copy to the server
Step Two – Rsync to the Server
To rsync to the server I was connecting via SSH, and the command is as follows:
If we take a little time to analyse the above command because there is quite a lot going on there.
If we look at the switches first:
The -a switch ensures the files are transfered in “archive” mode, which essentially keeps the permissions etc.
The -v switch is for verbosity
-z compresses the transfers, reducing bandwidth
-u is very important, and it skips files that are newer on the live server. I needed this as the client can upload image and the system create cached files etc that should not be overwritten
And finally the -e switch allows you to specify a remote shell, effectively allows us to use SSH
After these switches we specify that we will be using SSH to conduct the transfer. If you don’t have the -e switch and the SSH command, you can use Rsync to copy from one file location to another, great for backing up onto an external hard drive.
After the SSH, you specify the source to transfer the files from, in this case the local directory ./LIVE. This is followed by the destination. Here it is a path on an server accessed by SSH. Note the colon (”:”) to separate the login details from the path details.
Finally I added the –progress switch just so it gives me a bit more information whilst uploading the files.
And that’s it. I still keep the site up-to-date with SVN, but I have another little step to deploy to the live server.
Notes: I’m running Ubuntu Intrepid, and the server I was trying to deploy to is some version of Redhat. But this should work for all flavours of Linux that have rsync installed and possibly even Mac OS X.
Just had a nightmare hour trying to get my lovely clean Xubuntu desktop back to normal.
For some strange reason it was loading in the Gnome desktop over the top. All very odd, loaded up as XFCE for a second or two, but then flashed into Gnome – very irritating.
Finally managed to track down the problem which was Nautilus was automatically loading, which was then replacing the desktop. After about an hour of Googling and 15 minutes of going through all the session config variables to try and work out where it was loading, I finally came across this thread in the brilliant Ubuntu Forums which mali2297 recommended removing the .cache directory. I did, and it worked!
For example’s sake, I did this:
$ rm/home/rob/.cache -Rf
I just thought I’d share this in case someone else is having a similar problem.