Augustina's Technological Blog

Technology, Perl, Linux, and a Woman's perspective on the FOSS community

Archive for the ‘Server’ Category

Upgrading Ubuntu Server via CLI

leave a comment »

I needed to upgrade my 6.10 Edgy Ubuntu server to 7.04 Feisty.  It was pretty easy to do, the trick is knowing the right commands.

First, update the sources.list file and change each occurrence of “edgy” to “feisty” (without the quotes):

<code>sudo nano /etc/apt/sources.list</code>

Then, for example, change
deb http://archive.ubuntu.com/ubuntu/ edgy main restricted
to
deb http://archive.ubuntu.com/ubuntu/ feisty main restricted

Now update package list:

<code>sudo apt-get update</code>

Install the update manager:

<code>sudo apt-get install update-manager-core</code>

Start the upgrade tool:

<code>sudo do-release-upgrade</code>

The update can take several hours as it has to download a lot of stuff.  I did mine unattended for the most part, just peeking in to make sure there weren’t any dialogues holding things up.

Advertisements

Written by missaugustina

September 13, 2007 at 5:54 pm

Posted in Server, Ubuntu

NXServer for Remote Desktop Access

leave a comment »

I had set up NX Server awhile ago for remote desktop access to my Linux machine and recently had to re-set it up again, so I thought I’d document what I did so that I don’t forget ;D

NXServer is an alternative to VNC.  It’s faster and served over a secure channel, which is important if you need to manage machines without a VPN.  Generally it’s easier to use VNC, but I thought it would be fun to play around with a different system.

It’s important to know that you need a GUI, preferably Gnome in order to do this.  Otherwise you might as well SSH.  Speaking of SSH you’ll need to install openSSH if you don’t have it already.  You can do that by going to your terminal and typing the following:
<code>sudo apt-get install ssh</code>

once you have that installed, you’re ready to get NXServer, et al..

NX Server is made by NoMachine.  You’ll need to go to their <a href=”http://www.nomachine.com/select-package.php?os=linux&id=1″>Linux downloads page</a> to get a copy.  Select “NX Free Edition for Linux DEB – i386 ” to get .deb packages that can be automagically launched from Firefox.  You’ll need to download the Client and install it, then the Node, then Server.

Once you have installed those, you’ll need to set up a user for your connection.  I recommend using whatever user you already log in with.  If you need to create an additional user specifically for remote access, use the “useradd” command to do it within Ubuntu first.  In the terminal type the following:
<code>/usr/NX/bin/nxserver –useradd yourusernamehere</code>

You’ll need to install nxclient on any machine you want to be able to connect to your Linux machine.  There are both Mac and Windows versions available (Mac requires X11).  Also if you want more than 2 concurrent connections you’ll need to buy a license.

Written by missaugustina

August 28, 2007 at 5:56 pm

Posted in Applications, Server, Ubuntu

Setting Up Ubuntu Server

leave a comment »

The Ubuntu LAMP Server installation is pretty straightforward and there are a lot of HOWTO’s on the web that walk you through how to do it. What you do after that however is pretty dated in most of the resources I had found. I struggled to find up to date information that pertained to 6.10 Edgy and have logged it here for reference.

Update Repositories
After installing the LAMP server, you’ll want to update your sources.list file.

sudo nano /etc/apt/sources.list

Uncomment the extra repositories.

Update apt:

sudo apt-get update

While you’re in apt, be sure to install build-essential and ssh:

sudo apt-get install package-you-want-to-install

Static IP Address
By default your server will be set up to acquire an IP address via DHCP. If your server needs a static IP, you’ll need to configure it as follows:

sudo nano /etc/network/interfaces

Type the following into the file, replace eth0 with your Network Card’s interface if it’s not eth0 (type “ifconfig” in the bash shell if you’re uncertain). Be sure to comment out anything you see in your config that’s different rather than deleting it, just in case something stops working. Alternatively you can create a backup of the interfaces file by typing “sudo cp interfaces interfaces.bak”

auto eth0
iface eth0 inet static
address your.ip.address.here
netmask your.netmask.goes.here
network ipfirstfour.ipsecondfour.0.0
broadcast ipfirstfour.ipsecondfour.ipthirdfour.255
gateway your.gatewayorproxy.goes.here

example:

iface eth0 static
address 192.168.1.34
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.1.255
gateway 192.168.1.0

finally, restart network services.

sudo /etc/init.d/networking restart

Resolving your Host Name
If you assigned a host name to your machine it might not show up in the DNS servers right away. you can check that your DNS servers are correctly entered by opening the resolv.conf file:
sudo nano /etc/resolv.conf

check that it says something like this:
search host.com
nameserver 123.456.789.1

If you are doing this on an internal network, you may have to send a request to the IT department to update their DNS entry for your server.

If you want to change your host name you’ll need to edit the file /etc/hostname and change the name of the system:

sudo nano /etc/hostname

Edit the file with your desired host name and Ctl-X to write out the changes and exit.

Then run

/etc/init.d/hostname.sh start

to make the change active, or restart your system.

Webmin
Webmin is an awesome tool for remote server administration. I don’t have a desktop environment installed on my servers and now I don’t need a keyboard or mouse either. To install webmin you’ll need to go to webmin.com and get the url of their latest distribution. The online HOWTO’s I read were all very out of date with regards to acquiring this or else I was just typing the wrong package to install in apt. Once you have the url you can download the .deb package! You can access the Webmin website from you bash shell by installing Lynx via apt. Lynx is an old school text based web browser.


wget http://url.of.webmin/install/.deb

Install it using dpkg

sudo dpkg --install webmin

If you get errors during the install about missing libraries, get them in apt

sudo apt-get -f install

You can log in by going to https://your.host.ip.address:1000 to access the Webmin interface. If your domain name is resolving (try “nslookup yourdomainname”) then you can replace the IP address with your domain name.

MySQL
You’ll need to set up a root user in mySQL before you do anything else, even access it from Webmin.


mysqladmin -u root password yournewpasswordhere

After you do that you’ll get the bash prompt again. Now set your super user.

mysqladmin -h yourmachinename -u root password anotherpasswordhere

You’ll get a prompt…

Password:

Type in the “root” password you set in the first command.

Restart mySQL…

sudo /etc/init.d/mysql restart

And that’s all she wrote…! Feel free to correct me if I’ve made any mistakes.. I’m just recording what i did in order to set it up on my machine…

Written by missaugustina

March 13, 2007 at 6:07 pm

Posted in Applications, Server, Ubuntu

Configuring Samba

leave a comment »

I got Samba working and my Mac OS X machine can see my Ubuntu workstation AND share files AND not everybody in the world can do the same. Ubuntu offers a System->Administration->Sharing interface but it’s still very much a work in progress. In fact I would recommend against using it because it didn’t seem to offer much in the way of customizing security options (like specifying samba users). The fact that it is in a sad state is obvious by the number of Samba problems posted in ubuntu forums.

I found this HOWTO:
http://www.ubuntuforums.org/showthread.php?t=202605

The difference is I didn’t make a separate home partition and I didn’t use a Samba directory (although I set it up just in case I decided to use it). For my purposes I just need to share my documents.

I was able to get my Mac to connect! I was having issues connecting to my Mac from Ubuntu but fixed those by changing settings on the Mac. Previously I was using FTP which is a little buggy, but still good for higher directory access on the rare occasions when I need it.

Written by missaugustina

March 7, 2007 at 6:26 pm

Posted in Applications, Server, Ubuntu