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.

Comments

Jeremy Davis's picture

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...

Harrison's picture

Hi

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.

Thanks

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 192.168.195.128:21...
Status:    Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error:    Could not connect to server"