-
Notifications
You must be signed in to change notification settings - Fork 130
ConfigureUbuntu
In this section you will make some minor changes to the Ubuntu configuration in preparation for remote administration of the MH box and for the installation of the necessary software modules that are required for Misterhouse to run properly. The first thing to do is to set up Ubuntu to get additional software packages from the Internet instead of the installation CD.
On the new MH box (server) login as the user you created during the OS installation.
Make a copy of the old sources.list file //**admin@mh_server:/#** sudo cp /etc/apt/sources.list /etc/apt/sources.list.old//
Edit the sources.list file //**admin@mh_server:/#** sudo nano /etc/apt/sources.list//
And replace the contents with the following text: code deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ precise-updates main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ precise universe deb-src http://gb.archive.ubuntu.com/ubuntu/ precise universe deb http://gb.archive.ubuntu.com/ubuntu/ precise-updates universe deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-updates universe
deb http://gb.archive.ubuntu.com/ubuntu/ precise multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise multiverse deb http://gb.archive.ubuntu.com/ubuntu/ precise-updates multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted deb-src http://security.ubuntu.com/ubuntu precise-security main restricted deb http://security.ubuntu.com/ubuntu precise-security universe deb-src http://security.ubuntu.com/ubuntu precise-security universe deb http://security.ubuntu.com/ubuntu precise-security multiverse deb-src http://security.ubuntu.com/ubuntu precise-security multiverse code After you've check the above carefully, or cut and pasted it over, save the file using Ctrl+X and Enter.
Issue the following command to get updated sources information now that you have changed the sources.list file: //**admin@mh_server:/#** sudo// //apt-get update//
All you are doing here is changing the list of places Ubuntu will go to look for the additional software packages we will be installing.
//**admin@mh_server:/#** sudo// //apt-get upgrade//
This will download any OS patches for Ubuntu and bring the system up to date. It's a good idea to run these two commands occasionally to keep the system updated with security patches if you have it permanently connected to the internet.
It is convenient to have your computers obtain network configurations through DHCP but this is not desirable when accessing MisterHouse remotely because the IP address assigned to the MH box could change. Although there may be other ways of dealing with this problem, I like my computers to have static IP addresses so that I always know where they are. Keep in mind I am only talking about the IP address your computer has on your internal network, not the IP address that is seen on the Internet which is likely to be a dynamically assigned address from your ISP.
Verify that the computer's hostname is as you would expect it to be: //**root@mh_server:/#**// sudo nano /etc/hostname
It should have a single line that contains the name you assigned to the computer when you installed Ubuntu. Next, look at the file that tells the computer where to look for the domain name servers (dns): //**root@mh_server:/#**// sudo nano /etc/resolv.conf
This file should contain something like the following:
search localdomain nameserver xx.xx.xx.xx nameserver xx.xx.xx.xx
Where the IP addresses shown match your primary DNS (probably your firewall or router) and a secondary DNS (in my case one that was provided by my ISP). If you installed Ubuntu on a network with DHCP enabled, it will have populated this file with the correct values and you should not have to change it. Next you will need to edit the “interfaces” file to add the static ip address: //**root@mh_server:/#**// sudo nano /etc/network/interfaces
Find the following lines
code format="bash"
- The primary network interface
And modify them as follows:
code format="bash"
- The primary network interface
Reboot your machine now and it should come up with the static ip address you assigned. //[There]// After the reboot, login as root again and type: //**root@mh_server:/#** ifconfig//
to make sure that the changes were done correctly. It will return something that looks like the following:
eth0 Link encap:Ethernet HWaddr 00:F0:B7:D3:11:23 inet addr:192.168.1.123 Bcast:192.168.1.255 Mask:255.255.255.0
When you first installed Ubuntu you set up a primary user (I called this user "admin"). Now you are going to create the user that will run mh. This user is called "mh".
Create the directory for misterhouse: //**root@mh_server:/#**// sudo mkdir /opt/misterhouse //**root@mh_server:/#**// sudo mkdir /opt/misterhouse/code //**root@mh_server:/#**// sudo mkdir /opt/misterhouse/data //**root@mh_server:/#**// sudo mkdir /opt/misterhouse/sound
Create the user and group “mh”: //**root@mh_server:/#**// sudo groupadd mh //**root@mh_server:/#**// sudo useradd -d /opt/misterhouse -c MisterHouse -g mh -p //[password]// mh
The mh user will need permissions to access the audio device and the serial ports. Do this by adding the user “mh” to the dialout group and the audio group: //**root@mh_server:/#**// sudo usermod -G mh,dialout,audio mh
Next: Enable Remote Access with SSH Back: Download & Install Ubuntu Return to Index