TurnKey Linux Virtual Appliance Library

Considerations For Windows Users

As a windows user, the Linux environment is a pretty alien and hostile place. Fear not, others have survived the installation process, and some have even gone on to live full and fulfilling lives. 

So firstly some general tips. Please note this is not intended to be a how to guide to linux (my entire Linux knowledge can fit onto a small Wiki page....), rather a fix for the major pain points I encountered working with the Appliance. 

The admin account is called 'root'

You can switch to other consoles at any time by using Alt+F1 ... Alt+F8. This allows you to run the rails built in server on one console and still execute rails commands on another. 

If when you log in on one of these consoles with an account other than root (you create them later), all you get is a $ as a prompt. Just type bash<enter>. This seems to work, (no one told me to do this, so ymmv). I am probably missing huge implications here, but from a lost Windows users point of view, this helps. 

cd for change directory,

ls to list them 

rm removes files 

--help as a switch will get you help

shift+page-up/page-down pages the console and allows you to see all that stuff that went off the top.

General concept

You attach the appliance CD to the virtual environment of your choice (I recommend Virtual Box), and boot it. After a fairly straight-forward installation process you are left hanging on a strange blue text dialog. You then configure the appliance partly on the Linux command line, and also via Webmin - a rather nice web management console. You edit files on a share on the appliance which maps to the rails application directory (/var/www/[app]). You then hit the appliance on the web address for your web server (either the rails one or Apache). There, simple.

Left Hanging

So, the installation process leaves you at a blue text dialog with a bunch of web addresses. What's going on?

The addresses  you see on the screen are the various ways you talk to the box. The first two are the addresses for the default Apache rails site on the box. NOTE, this site looks like part of the configuration system - it has two buttons in the middle of the screen (this confused me for ages, thinking I couldn't find the example site). Check you can get to it from the host machine. 

The Webmin address is the other important address. I believe the login details should be those you specified during the installation process (root/[password]).

Okay, so you now have two main tasks

1) Get access to the files on the appliance in a sensible way

2) Get a working rails site up and running. 

Samba Shares

Okay, first of all Linux straight out of the box isn't terribly interested in windows networks. To get it to play nice with the host machine you are going to need Samba installed. This could probably  be done in one Ninja line on the Bash prompt, however I think a quick detour into Webmin is much more realistic here :) 

So go into Webmin via the links provided by the appliance.

Up the top left you have the main menu. Go to "WebMin->WebMin Configuration" then choose the Webmin modules option. Click on the "..." next to the option "Standard module from www.webmin.com". At this point a new page pops up. If at the top right, it says something about Webmin being out of date, close it down, and back out to the main configuration menu, then choose upgrade Webmin. Get that sorted, then come back here. 

Search for samba on the page - should be the second occurrence - and select and install that. 

Hopefully in the servers menu you should now have an menu option "Samba windows file sharing". If not, probably go for the restart Webmin button found at the bottom of the Webmin configuration screen.

Select the "Samba windows file sharing" option. 

Most of this is self explanatory, however watch out for the users. Samba maintains it's own list of users (no I have no idea why either), and these have to be manually synced to the unix ones (buttons at the bottom of the page). Not only that, but I found that although the user was sync'd, the password wasn't. Hence the "Edit samba users and passwords option"). I created a real Linux user (via System->Users and groups) then sync'd that and set his password in Samba. 

This all done (you did add a share to the /var/www folder and set it Read/Write to all known users right?), you should now have a share that you can see from windows. 

The last gotcha here is that when you create files and folders later, if you use another user account (say root) to run the commands, it gets ownership of the files. You will then not be able to edit them. The solution to this is to either log in as your newly created user, or reset all the permissions on the files via the Tools->file manager->Info. 

When doing this, select the folder you want to reset the permissions on in the right panel,  chick info, set the write for the group permissions on the box that pops up and change the group to users. Finally set the bottom drop list to "this directory and all sub directories", and save. 


Doing rails stuff

First, you need to get off that blue dialog on the console screen. The urls are kinda handy, so lets leave it there and switch to another prompt. Press Alt+F1 (the iniital screen is on Alt+F8). Right, root is your account, and the password is the one you set during installation.

As you logged in as root, you get a bash prompt automatically, I suspect other users either need some configuration (no idea) or you just type "bash<enter>" at the $ sign each time you log in. 

Now you are (I believe) in your home directory. We want to be in the website directory, so type "cd /var/www" to get to the root of the web sites. Type "ls" to get a listing here. I have many test apps here now, but I believe you should just have "railsapp" which is the test application. 

This is the point where a proper rails tutorial takes over - have fun!


Hope this helps some fellow Windows lost souls.


Jeremy's picture

Nice work on the Wiki entry but IMO Samba is overkill!

Awesome that you stuck this wiki page up. I think most of it is gold and I'd quite like to rob a significant portion of it for a generic TKL "Considerations For Windows Users" (without some of the RoR stuff), which I may well do in the near future (if someone doesn't beat me to it).

My main consideration is that IMO installing Samba to an appliance is a huge overkill and definately not necessary (or even desirable) Although having said that instructions on how to are not all bad. But IMO while a little scary for some, command line instructions are easier and more full proof. Instead of convaluted instructions:

apt-get update && apt-get update install samba webmin-samba

I think that installing some client software on the Win machine is far easier and much less daunting for a Linux newb Win user than mucking around installing and configuring Samba! Filezilla and WinSCP are 2 SFTP clients which are easy to install and use on Win OSes and will basically connect to TKL out of the box with bare minimum configuration.

I was almost tempted to edit your wiki entry but I thought that for now I'll just stick this comment on and see what others think. That was my experience (as a Linux newb Win user when I first encountered TKL ~1.5yr ago) anyway...

Cool, thanks - pillage

Cool, thanks - pillage away.

Right, I think it's best if you understand my intention using the appliance server (and I suspect most windows people coming here). I CAN run rails on windows just fine, but the ruby/rails community seems to be at home in Linux, and trying to work through tutorials etc is like pushing water uphill in many cases. Sure it can be done, but isn't there an easier way?

So what are we trying to beat? Well, my windows setup is Eclipse with a plugin (I forget the name) opening up a directory that is mapped into my workspace. I edit a file, hit save and BLAM the website is updated. This is all very convenient, except for the parts where I have to go to the command line and execute rails commands, or when I'd like to use some of the cool tools/plug-ins which are Linux orientated. Plus I have only one rails environment, and I understand it can be desirable to run multiple versions sometimes. 

Enter the appliance. By doing this as a samba share, rather than a ftp process I get everything I'm after. I map the share as a drive in windows, and I can just add the folder to my eclipse workspace. My regular windows backup software can also just have the drive added etc etc.  Plus I get the convenience of a freeze dried environment that I can duplicate if needed. It may be possible to get one of these FTP apps to act like a file share, but to be honest, going that way round didn't occur to me. 

So, yes, I'd agree that it's a bit more complex (especially without instructions!!), but it was what I was after. 

Now as to the command line. That looks nice and quick, but as a windows user I have no idea what state that's going to leave me in. Does it auto-upgrade Webmin as well as the samba? Obviously it won't set-up my users or shares, so unless we do some more command-line magic, I still need to hit Webmin. 

This is really the massive culture gap we're bridging here. A quick command line or better yet an evil Perl or Bash script may be totally awesome (I have heard stories that the world was created in 6 days by an out-of-control Perl script - on the 7th day a Cron job was running clearing up the temporary files), but I and (probably most windows users) will have no idea what to do the second something slightly unexpected happens - or worse yet, how to undo it! Hence the graphical round-the-houses approach :)

Might be worth giving the command line option, but please make it idiot proof*. That's windows idiot , not Linux idiot :) 

(*99.9% idiot resistance is fine)

Hi Downloaded Filezilla.


Downloaded Filezilla. Now what? Do I have to configure the linux box (virtual) as an FTP server?! I am using turnkey core as I plan to install the packages I need.


P.S. - I should probably mention that the Windows host and turnkey guest can see each other quite happily (pinging works both ways). I need them to interact a little bit more. Filezilla says:

"Error:    Could not connect to server
Status:    Waiting to retry...
Status:    Resolving address of core
Status:    Connecting to
Status:    Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error:    Could not connect to server"

Using WinSCP

Thanks for the instructions.  This helped me get set up but like the last commenter, I went with installing WinSCP on my windows machine instead of installing Samba on the Appliance. 

You have to either get the appliance talking windows file sharing language or get the windows box to talk the linux file sharing language.  I found the second option was easier:  I installed WinSCP and entered the appliance IP address, username and password and it connected to the file system.  Now i can drag and drop files into the appliance's file system.  This means the appliance stays clean and light weight.

Great suggestion

Great suggestion its alot easier to setup

Drive mapping from Windows to appliance

Hi, I suggest to try the Freeware SFTP NetDrive. You can map a drive letter to any folder of the appliance.