Saturday 17 February 2007

IBM T22 Settings for Linux

Ubuntu Server Home IP: 192.186.2.5
Belkin 802.11g wireless card
Obtain IP address automatically
TCP/IP DNS Server address:
Preferred: 4.2.2.2.
Alternate: 4.2.2.1.
Network Adapters
Location: PCI Bus 2
Device 0
Function 0
HP Scanjet 2400 Series
HP Photosmart 8400 sERIES

Saturday 3 February 2007

james snyder server project four

james snyder server project four

the situation by this time was that I had pinged ok.
I did the Linux Inernet Protocol configuration command:

ifconfig

this gave me the ip address of the new server machine.

I knew that http://192.168.2.5/ was the IP

I did this command:

sudo /etc/init.d/apache2 start

and this command should have started the apache service.

I checked the index of my root file:

Index of /

Icon Name Last modified Size Description[DIR] apache2-default/ 26-Jul-2006 18:50 -
Apache/2.0.55 (Ubuntu) PHP/5.1.2 Server at 192.168.2.5 Port 80

to update the server system I ran the following command:

sudo nano /etc/apt/sources.list

and this brought up my list of repository sources.
I scrolled down the list and saw a load of lines starting with 'deb'
and realised that there were three types of repositories in Linu Ubuntu, these being:

standard,
universe,
mulitverse.

standard was all free-dom (as in free speech) and Ubuntu community supported
universe weren't always free (as in free speech)
and multiverse was Open Source community contributed

my best option now was to go through the sources list and remove the '#' from the start of any lines with a deb to uncomment them.
so now I saved the list and exited nano with the command

ctrl+x

now I needed to update the sources so I typed the command:

sudo apt-get update

I knew that sudo was the superuser command for Debian Ubuntu, like the old SU command.
then I commanded instead of commanding sudo apt-get install ubuntu
I had to immediately command:

sudo apt-get upgrade

because it was better to udate/upgrade everything, reboot into the new kernel and then install the desktop.

The sudo apt-get upgrade was then running for few minutes.

sudo apt-get install openssh-server

to install the ssh server
then I could go to the router and forward port 22 to the server

I pinged 192.168.2.5 again. The network was ok, there were no errors
I went back to the sources list and looked at the sources list of a similar Ubuntu LAMP server
i forgot to set options in the ping command so it continued in verbose mode.
i killed it and exited it and went back to the command prompt with

ctrl+c

Then I checked the ideal sources list model and compiled it word for word onto my sources list as follows:

deb http://gb.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ edgy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ edgy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://gb.archive.ubuntu.com/ubuntu/ edgy universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ edgy-backports main
restricted universe mu$
deb-src http://gb.archive.ubuntu.com/ubuntu/ edgy-backports main
restricted univers$

deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted
deb http://security.ubuntu.com/ubuntu edgy-security universe
deb-src http://security.ubuntu.com/ubuntu edgy-security universe

It looked fine
i thought the best thing to do would be to comment out the last 4 entrys

I commented out the last 4 security ones, to try to stop the errors
I just wanted to finish the install and update
and so I thought I would add the security tools in later.
so I went ahead and commented out the last 4 security lines in nano editor.
back to

$:

to update again and then upgrade
or I could do both at the same time!

sudo apt-get update && sudo apt-get upgrade

I first thought that & means background process, but && will run one comand after the other,
so only one line of commands to type instead of two....

I rebooted the machine with the reboot command

sudo reboot

then I did the update command again

sudo apt-get update

and then the upgrade command

sudo apt-get upgrade

I went back into sudo nane /etc/apt/sources.list
and installed a new externeal cdrom drive onto the server.

on my router page the default gateway was http://192.168.2.1/
I went to virtual servers and checked my port forwarding
I wanted port 22 forwarded to the IP address of my server
I went to whatismyip.com to see the resulting ip address
then I could dial in and take look at the source problem first hand
I enabled the ubuntu server IP posts as follows

inbound port 22 - 22 type TCP private IP address 192.168.2.5private port 22 - 22

and applied

1. bittorrent 6881 just remains enabled

I was still trying to find my ip address.
I commanded ifconfig: 127.0.0.1 Mask 255.0.0.0
whatismyip.com gave me my WAN (wide area network address) ie. my internet facing addess
It looked something like 84.154.34.21
I then connected to my router via ssh port 22
and the router said, 'ohh this needs to go to the server'
I then used the user and pass and got to the server command line
to be able to then sort out my apt list
IP was actually: 80.193.51.42
it made a note of my settings for future reference help
now I wanted a graphical desktop.
I thought about using xfce in the long run as it's fast on an old machine,
but gnome is a bit more forgiving/easy at the early stages
so I did sudo apt-get install ubuntu-desktop
I took a while to downlaod everything and install gnome
then I was back at the command prompt after a long list of "failed to fetch http://gb.archive.ubuntu.com etc"
either my source.list was still unhappy or my ethernet cable was not plugged in properly...
I used putty to link from my Windows laptop upto the Linux server
I opened up the suorcces list making sure I copied all the ## lines as well.
the ## were commenting out the information lines
and stopping the machine form reading them
then I used the ctrl exit. yes.
I saved it as a different file,
renamed the old file sources2.list
and then the new one to source.list
and then did the commands chmod and chown for the new file
what i learnt from this is that you can isolate and identify the problem and error
by trial and error but firstly check all the hardware is connecting and up to date first.

Thursday 1 February 2007

james snyder server project three

james snyder server project three

This computer has been built by me to accept HTTP requests from client Web browsers, and to serve them HTTP responses along with optional data content like Web pages.
The computer program that I have installed and configured to provide this functionality is called Debian Ubuntu 6.06 Linux LAMP server.

I only needed three file partitions: /, swap and home
to ensure back up of files. /var was not required on a laptop.
to use ssh i used name.homelinux.com
I could use that only if I had set up an address with dyndns.
otherwise I just used the local or wan IP address
i have not yet installed webmin & 'open DNS' already or opendns
I need to change the dns servers on my router and they will need to point to
208.67.222.222 & 208.67.220.220
http://www.newsforge.com/article.pl?sid=07/01/23/1712221
preferred DNS server was : 4.2.2.1
I make a note of the dns servers I already have set up in case I need to change them
for webmin i went here http://www.webmin.com/
i downloaded and installed the webmin-1.320.tar.gz
i ignored the webmin in synaptic or the deb file, they were both dodgy
I'll be wanting a wiki for a more detailed log
now there is a purpose for my new web server, to learn more about HTTP, HTTPS, how a real web server works, CGI, PHP, hosting, and LAMP - to learn all these things without reading books, so learning on a real live system.
maybe it could also be used to test Web browsers, Web log analysis software and set up a non profit Web hosting service.....

james snyder server project two

James Snyder server project log 2

log 2

the router that was doing the dhcp.
i configured the network manually
ip - 192.168.2.2
subnet 255.255.255.0
gateway 192.168.2.1

The I looked at all of my Internet Protocol (IP) settings.

IP Configuration

Host Name . . . . . . . . . . . . : ibm6790-43g
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : Belkin
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Intelr PRO/100 VE Desktop Connection
Physical Address. . . . . . . . . : 00-09-6B-D4-45-C6
Ethernet adapter Wireless Network Connection 2:
Connection-specific DNS Suffix . : Belkin
Description . . . . . . . . . . . : Belkin 54g Wireless USB Network Adapter #2
Physical Address. . . . . . . . . : 00-11-50-BD-18-19
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.2.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.1
DHCP Server . . . . . . . . . . . : 192.168.2.1
DNS Servers . . . . . . . . . . . : 4.2.2.24.2.2.1
Lease Obtained. . . . . . . . . . : Monday, January 29, 2007 7:58:26 AM
Lease Expires . . . . . . . . . . : Tuesday, January 19, 2038 3:14:07 AM

the 3 bits i needed at this stage was an IP address, a subnet mask and a gateway address

IP Address. . . . . . . . . . . . : 192.168.2.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.1
DHCP Server . . . . . . . . . . . : 192.168.2.1
hostname: ubuntu

For the HTTP proxy my windows box had the IP address ending with .5

IDE1 master (hda) - 20.5 GB, number1 primary 106.9MB K ext3 /media/hda1, number 2 20.4GB

I configured logical volume manager

I had got one 20 Gig disk
IDE1 master (hda) - 20.5 GB

I knew how much ram
256

Later I bought more RAM to double the processing power of the machine.

Then I set the partitions of the hard disk of the new Linux server as follows:
/ 10
/swap 1 gig
/home 5 gigs
/var 4 gigs
the /var partion is where the www folder is held and so I wanted to be able to reinstall without wiping that folder
The new partition size was then 10GB
i created a new partion, set the size to 10 Gig, set the type to ext2, set the mount point as '/'
10 = primary
I only needed logical when I had more than 4 partions - swap didn't count

the partition settings were:
ex2 file system; / mount point;
defaults mount options, label none;
5% reserveved blocks;
standard typical usage;
off bootable flag,
partition size 10GB.
pri/log 10.5GB FREE SPACE
number 1 primary 10.0 GB f ext2 /
swap was the next partition i did.
instead of finishing partitioning i selected pri/log 10.5GB FREE SPACE
pri/log 10.5GB FREE SPACE = swap
i selected the free space and created a new partition in it
the new partition size was 10.5 1 Gig for the swap partition
ideally swap should have been twice as big as my RAM
primary type of partition
seeing as I had got a reasonable sized disk I thought I may as well round it up to a one Gig
primary again
location at the beginning
if I put it at the end then my / would no longer be at the end
though they make no real difference, these partition settings.
I was not sure whether to specify to use the partition as a journaling system & Mount point
Anyway I edited the partition number 2 of IDE1 master hda.
I used a file system in this swap partition.
I set set it to be swap so I didn't need to set a mount point
swap has it's own special file system type
at that moment it was set to use as Ext3 journaling file system; the mount point was /home
i went up to the ext3 bit, hit return and chose swap from the list
I then saw that most of the other options had disappeared
now i had

number 2 primary 1GB f swap
pri/log 9.5GB FREE SPACE
number 1 primary 10GB f ext2 /

so next was /var
i went down to the free space, and hit enter
I reckoned a 5 gig partition would do which left 4 Gigs for my home
This new partition size was 5GB. It was a primary type again.

primary, ext 2
beginning location for the new partition
mount point: /var variable data
home 4GB. primary & NOT ext2

now I had:

IDE1 master hda 20.5GB
number 2 primary 1GB f swap
number 3 5GB f ext2 /var
number 4 primary 4GB f ext3 /home
unusable 485.3MB
number 1 primary 10GB f ext2

The login prompt looked like this :~$

Now that I was at the login prompt ready to type in commands, I did a quick ping to check that I had a network

ping www.bbc.co.uk
ping the router ping 192.168.2.1

james snyder server project one

james snyder server project log 1

i just met a local web hosting company and they told me their commercial set up uses this configuration:

vmware + Cpanel + CENTOS linux = run your own web servers from home

however, i thought that the ubuntu server edition did fine.

I could occasionally connect it to the LCD projector TV (a Sony LCD KDF-E50A12U)!

my first steps was to command the computer to

apt-get install ubuntu-desktop

which in human language means that i was ordering the computer to go and find a graphical user interface operating system on the internet, download it on top of my server computer amd install onto the hard drive automatically.

james snyder server project five

james snyder server project five

log 5


I set SSH to listen on TCP port 22.

my ssh name was something like

name.homelinux.com

On one of my laptops, I logged into my firewall router page so that I could configure all the IP address settings in view of my new web server.

I made the following minor changes:

IP .2 > change to mine IP
IP .3 > change to mine IP

I checked my Network configuration:

Hostname: ubuntuhostname
HTTP Proxy: http://[[user]] [:pass] @] host
[:port] /"
partition to master
server domain name 127.0.1=servername

I verified my DNS settings:

212.58.224.125

and to update my web server operating system with the newest releases of software:

sudo apt-get update

and to check these updates in the sources file:

$/source/sources in mailform release file

and then to install the SSH server program so that he could look at my system from remote, from afar:

sudo apt-get install openssh-server

then I installed a program on one of my windows laptops that enabled me to log into my new Linux Web Server via remote control, called PUTTY.
When I executed the new Putty program, I had to check these settings:

MS WIN:PUTTY:192.168.2.5
use WAN address: myipaddress.com
80.193.51.42

preferred DNS server: 4.2.2.1

Tomorrow I am going to check //192.168.2.1 as my default gateway to configure my router via ssh....