Ubuntu 7.10, From Installation to Complete Setup - An Idiots guide

Chapter Skip


Initial and Essential Configuration

Install

  Install Ubuntu 7.10

  1. Insert CD
  2. Select 'Boot Options' when your pc boots if it doesn't launch from cd automatically
  3. Follow the Ubuntu Installation guide via the live cd

Setup

  Pre Use / Screen Setup on your Ubuntu 7.10

  1. Top menu -> System -> Preferences -> Fonts
  2. Decrease font size and set correct font display system for your pc
  3. Top Menu -> System -> Preference -> Screen Resolution

    If you have trouble with your resolution, things you might want to start googleing are as follows ( This could take you days / weeks to get setup correctly, and even then 90% chance it won't be 100% perfect and glitchy ! Consider this your first introduction to linux )

  4. sudo apt-get install vim-full Installs / enables the full version of vim

Update

  Update existing installation files on your Ubnuntu 7.10

We should firstly update the current ubuntu installation you've just installed to make sure everything is up to date. Simply run the following commands; (Comments in itallic)

  1. sudo apt-get upgrade Upgrades repositry list of packages for your system
  2. sudo apt-get update Downloads updated packages / system files and installs. voilla
  3. reboot
  4. Install / Update any remaining software updates / packages again
    After rebooting, ubuntu may find new stuff install which it also needs to update, so just once more should sort it

SSH

  Install / Setup / Configure SSH Acess / Server on your Ubuntu 7.10

You will no doubt at some point be needing to ssh into your box, thus, we need to setup ssh.

  1. sudo apt-get install openssh-server Installs the ssh deamon - This will automatically start after installation and start everytime your system boots.

You may then want to take a few ssh config security precautions - Click here to read more from ubuntuforums.org


Setting up your Web Development Environment

Assuming your going to be using your new ubuntu machine as a web server, follow the following sets for the ( or my ) 'ultimate web dev setup'

Apache2

  Install / Setup / Configure Apache2 on Ubuntu 7.10

  1. sudo apt-get install apache2 This installs Apache.
  2. You can now check apache2 is setup and running by going to http://localhost

You may also wish to install the Mod_Rewrite modules for your sexy urls. To do so simply type:

  1. sudo a2enmod rewrite This enables the mod_rewrite module
  2. sudo apache2 -k force-reload Reloads apache

Https / SSL Certificate

  Install / Setup / Configure an SSL Certificate for your Apache2 on Ubuntu 7.10

The following code is to install / set up an SSL certificate on your apache2 so you can run scripts on https

  1. wget http://www.theatons.com/test/Linux/apache2-ssl.tar.gz wget - " a non-interactive network retriever"
  2. tar xzvf apache2-ssl.tar.gz tar - Create / Extract files from archive
  3. sudo mv ssleay.cnf /usr/share/apache2/ mv Move file / Directory
  4. sudo mv apache2-ssl-certificate /usr/bin/
  5. sudo mkdir /etc/apache2/ssl
  6. sudo apache2-ssl-certificate executes apache2-ssl-certificate script, you will have to answer a few questions..
  7. sudo a2enmod ssl
  8. sudo ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl ln -s - Create symbolic link
  9. sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl cp - Copy File / Directory
  10. sudo gedit /etc/apache2/sites-available/ssl
  11. sudo gedit /etc/apache2/sites-available/default
  12. sudo apt-get install ca-certificates This installs common CA certificate PEM files (Nessesary for using curl on https)
  13. sudo apache2 -k force-reload reloads apache

You can check this is by going to https://localhost

MySQL

  Install / Setup / Configure MySQL 5 on your Ubuntu 7.10

This installs and sets up mysql on your server

  1. sudo apt-get install mysql-server libmysqlclient15-dev

You should be prompted to set a root password after the downloads are complete and it begins to unpack

You can now check MySQL is installed and setup correctly on your ubuntu machine by typing: mysql -u root -p. You should then be prompted for your password, then taken to mysql> - The MySQL command line.

If you want more information, check the mysql manual page

PHP

  Install / Setup / Configure PHP 5 on your Ubuntu 7.10

This installs / sets up PHP on your computer

  1. sudo apt-get install php5 php5-common libapache2-mod-php5 php5-gd php5-dev curl libcurl3 libcurl3-dev php5-curl php-pear php5-mysql

You can now go and make a .php file and put it in your /var/www ..however, you must restart apache for the php module to be loaded.. - sudo apache2 -k graceful will do the job.

XSL / XSLT

  Install / Setup / Enable XSL / XSLT Support for your PHP (PHP5) Ubuntu 7.10

This allows you to have XSLT support for your php installation

  1. sudo apt-get install libapache2-modxslt php5-xsl
    • libapache2-modxslt - XSLT processing module for Apache 2.0.x based on libxml2
    • php5-xsl - XSL module for php5

You may also want to reload apache again here if you wish to test this at this point: sudo apache2 -k force-reload

Image Magick | Imagick

  Install / Setup / Configure Image Magick (Imagick, ImageMagick) for PHP (PHP5) on Ubuntu 7.10

Installs ImageMagick onto your box, allowing you to perform easy high quality image manipulations via the linux cli or php

  1. sudo apt-get install imagemagick libmagick9-dev
    • imagemagick - Image manipulation programs
    • libmagick9-dev - Image manipulation library
  2. sudo pecl install imagick
    • This will install the php imagick extension on to your system
    • You will notice the last line when its finished says ' You should add "extension=imagick.so" to php.ini '
    • Following this, perform the following steps..
  3. echo "extension=imagick.so" | sudo tee -a /etc/php5/apache2/php.ini
    • echo .. - Outputs the quoted string to the cli
    • tee -a - Appends to the end of the file the previous echo
  4. sudo apache2 -k force-reload reloads apache

You can check this is installed by making a phpinfo(); file and then just crt+f 'imagick'

PDO

  Install / Setup / Configure PDO with PDO_MYSQL Drivers for PHP (PHP5) on Ubuntu 7.10

Installs and sets up PDO and installs / enables the PDO_MYSQL drivers.. nessesary for getting pdo to interact with MySQL ( Take note idiotic / rip off hosts: eg: FastHosts.co.uk )

  1. sudo pecl install pdo Installs pdo
  2. sudo pecl install pdo_mysql Installs PDO_MySQL drivers
  3. echo "extension=pdo.so" | sudo tee -a /etc/php5/apache2/php.ini
  4. echo "extension=pdo_mysql.so" | sudo tee -a /etc/php5/apache2/php.ini
    • echo .. - Outputs the quoted string to the cli
    • tee -a - Appends to the end of the file the previous echo
  5. sudo apache2 -k force-reload reloads apache

You can check this is installed by making a phpinfo(); file and then just crt+f 'pdo' and 'pdo_mysql'

Setting up the home network (SSHFS and NTFS)

This section details how to setup a samba server with shared files on your ubuntu box, and then how to connect windows to that server

Installing the Samba Server

  Installing your Samba Server on Ubuntu 7.10

This tutorial is an almost copy / paste of the excellent, detailed how-to provided by Stormbringer on the ubuntu forums. I am simply providing it here so all info is in one place, but once again, credits to this post on ubuntu forums by Stormbringer

  1. sudo apt-get install samba Installs the samba server files
  2. sudo /etc/init.d/samba stop Stops samba if it is running
  3. sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template Rename the existing samba file as a 'template' for future reference if nessesary
  4. sudo touch /etc/samba/smb.conf Make a new empty samba config file
  5. sudo gedit /etc/samba/smb.conf Open the new samba config file for editing

Server Config

  Configuring Samba on Ubuntu 7.10

Here just copy / paste the following into your /etc/samba/smb.conf

[global]
    ; General server settings
    netbios name = YOUR_HOSTNAME
    server string =
    workgroup = YOUR_WORKGROUP
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
    ;valid users = %S
    ;create mode = 0600
    ;directory mode = 0755
    ;browseable = no
    ;read only = no
    ;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
    ;path = /var/lib/samba/netlogon
    ;admin users = Administrator
    ;valid users = %U
    ;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
    ;path = /var/lib/samba/profiles
    ;valid users = %U
    ;create mode = 0600
    ;directory mode = 0700
    ;writeable = yes
    ;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
    path = /var/lib/samba/printers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

[printers]
    path = /tmp
    printable = yes
    guest ok = yes
    browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
    ;path = /media/cdrom
    ;browseable = yes
    ;read only = yes
    ;guest ok = yes

[MyFiles]
    path = /media/samba/
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = YOUR_USERNAME
    force group = YOUR_USERGROUP

You now need to just make sure the settings are correct for your setup..

  • netbios name = YOUR_HOSTNAME eg: ntom@ubuntupc .. hostname = 'ubuntupc'
  • workgroup = YOUR_WORKGROUP Any workgroup name will do, but make sure you windows has the same workgroup name either by setting this the same as your windows pc, or setting your windows pc the same as this
  • wins support = yes If your box doesn't have a static ip-address, or you cannot configure your router/server to provide you with a fixed dhcp-lease, change this configuration parameter to "no".
  • [MyFiles] This is the name of the share. Leave it as it is or adjust it to whatever you prefer. Don't use more than 31 characters and try to avoid spaces!
  • path = /media/samba/ The path for the shared files / directories.
  • force user = YOUR_USERNAME
    force group = YOUR_USERNAME
    Replace these with the username you will be connecting to ubuntu with.
  • Save and close gedit

Samba Users

  Adding / Setting Up Samba Users on Ubuntu 7.10

  1. sudo /etc/init.d/samba start Start samba
  2. sudo smbpasswd -L -a your_username -L - Local mode (must be first option)
    -a - Add user
  3. sudo smbpasswd -L -e your_username -e - Enable user

Ask a question, Submit a bug, or Leave some comments

Submit a question / comment