Ubuntu School – which: Finding Ruby

Projects
I've been getting my feet wet with Ruby the past couple of days and decided to post this as much for my own recollection as anything else. When you're creating a .rb script file the first line (as with nearly all \*nix script files) contains a reference to the executable which should be used to execute the script. ``` #!/usr/bin/ruby ``` But what if you don't know precisely where that file lives? The [which](http://linux.about.com/library/cmd/blcmdl1_which.htm) command will find it for you. Which is a command which provides you the fully qualified path to shell commands, and this includes script hosts like ruby. ``` callisto:~ kdmurray$ which ruby /usr/bin/ruby ``` This also works for Perl, Python and any number of other executables. Ever wonder where the pwd command lives? or nano? or…
Read More

Ubuntu School – What Groups Do I Belong To?

Projects
This is a quick one. If you need to figure out what groups your user account belongs to you can simply use the **groups** command from the command line: ``` kdmurray@titan:~$ groups kdmurray adm cdrom sudo dip plugdev sambashare lpadmin debian-transmission smbmedia smbbackups ccnet ``` You can also use this command to find out what groups any other users belong to. This is particularly useful when setting up new services or new network shares and you need to confirm which groups the user belongs to. ``` kdmurray@titan:~$ groups ccnet ccnet : users ccnet ``` Try to find yourself a use for the **groups** command this week!
Read More

Home Server Build part 5 – DNS Basics (Ubuntu School)

Articles
Once the server has been configured one major "infrastructure" task remains - setting up DNS. This is where those clever names you thought up back in [the "prerequisites" stage](http://kdmurray.net/2012/06/23/home-server-build-part-3-os-installation-ubuntu-school/) come into play. Strictly speaking DNS isn't required for everything else to work properly, but it's one of those things that makes the overall solution that much more elegant. When you're connecting to various components in your network it's so much nicer to refer to them by name rather than simply by IP address. A key piece of information you'll want to keep close at hand is the Webmin [BIND module](http://doxfer.webmin.com/Webmin/BINDDNSServer) documentation. This provides an easy-to-understand guide to managing DNS using [BIND](http://en.wikipedia.org/wiki/BIND) and Webmin. It was key to me being able to complete this tutorial. ### Create the Domain's Master Record…
Read More

Home Server Build part 4 – Remote Access (Ubuntu School)

Articles
Now that the basic server is set up and ready to go it's time to get started with the good stuff. The first thing on the priority list is making sure we know how to control the server. Being able to control and administer the server remotely is the key to being able to run the server as a [headless](http://en.wikipedia.org/wiki/Headless_system) machine. The key technology of this remote access strategy is [SSH](http://www.openssh.org/). ### SSH - Secure SHell SSH is a key technology common in all [POSIX](http://en.wikipedia.org/wiki/POSIX) operating systems. The program provides command-line terminal access to the remote system over an encrypted connection. SSH has effectively served as a replacement for telnet which provides remote terminal services, but is not encrypted. It is also possible to route traffic from your computer through…
Read More

Home Server Build part 3 – OS Installation (Ubuntu School)

Articles
This is the latest in my series of articles discussing the setup of a home server using Ubuntu 12.04 server. This article will guide you through the setup process which is quite simple and easy to follow. ### The System: Ubuntu 12.04 Server (LTS) 1. At boot the system will prompt for the language to use during installation. 2. Select the **Install Ubuntu Server** option from the list. 3. Select the language to use for the system. 4. Select the country the system is in. 5. Select the keyboard layout. If you have a system created in North America you can skip auto-detect and take the defaults on the next two screens. 6. The system will begin some initial configuration and load basic components. 7. Enter the system's hostname that…
Read More

Home Server Build part 2 – Prerequisites (Ubuntu School)

Articles
Servers are a misunderstood breed of the computer world. Most people think of a server as a large powerful computer sitting in the basement of a corporate office. The truth is that a server is a much less specialized computing device than most people realize. It's simply a computer that provides one or more services to other computers on the network. And truthfully, even in many corporate environments today the servers have been virtualized, or deployed as [blade servers](http://en.wikipedia.org/wiki/Blade_server) which take up very little physical space and help to cut down on power and cooling costs -- but that's a topic for another day. This section is all about the things you want to make sure you've thought about before you get started with your server project. While the process…
Read More

Home Server Build part 1 – Introduction (Ubuntu School)

Articles
What started life as an idea for a blog post as much for my own future reference as it was for anyone else has taken on a life of its own in what will be at least a 6-post series. It's a step by step guide to how I've configured my primary home server including all of its hardware, services and applications. I find that on occasion this server, as with all my computers, could benefit from a full OS rebuild. I'm a bit of a junkie when it comes to computer maintenance, so undoubtedly that has something to do with it too. My Windows and Mac systems are typically not much of a challenge. The lack of customization required for me to get them back to the point at…
Read More

Ubuntu School – GUI (xubuntu-desktop) for Ubuntu Server

Projects
Whether it's because you're not fully versed in the power of the command line, or you just want to use a tool that will speed things along like gparted, the command-line isn't always the best tool for the job. Sometimes you just need a GUI, even if it's just for a few minutes. I'm going to walk through how to do the installation on Ubuntu 11.10 with the assumption that you only want the GUI occasionally, and don't want it consuming server resources all the time. The first step is to get the GUI tools installed. ``` sudo apt-get update sudo apt-get upgrade sudo apt-get install xubuntu-desktop ``` That was the simple part. At this point you now have the GUI installed, but it will start the GUI every time…
Read More

Ubuntu School – Get Rolling with Webmin on Ubuntu Server 11.10

Projects
Even if some Linux purists would have you believe the command-line is the only way to go, the pragmatist in me will always take an appropriate GUI over a complicated command-line any day. You can run a lot of powerful services for your home network using one or more Ubuntu server machines. With the right tools you don't need to be a Linux expert to make that happen. The tool of choice is [Webmin](http://webmin.com/ "Webmin"). This is a set of web-based tools which allow you to control virtually every piece of server-side software on you Ubuntu server. The GUI is intuitive and straight-forward, the documentation is excellent, and the project is under active development. Because Webmin isn't in the standard repositories you will have to do a couple of quick…
Read More

Ubuntu School – Add an Existing User to a Group

Projects
Occasionally you need to grant an existing user some additional permissions to files, directories or applications. This typically means some kind of change in your permissions settings for the object in question. But because you can only have a single owner for a given object you need to be careful making these changes. Something you can do, though, is extend the permissions on the object to a set of users by way of a group. Logically, a group is nothing more than a named collection of users who all have the same access (by way of that group) to some resource. Users in Ubuntu typically carry one primary, and one or more secondary groups (I won't get into the differences here). By adding group permissions to your resources (ie give…
Read More