Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, April 1, 2010

How to upgrade Ubuntu Server 9.04 to 9.10 (to 10.04)

The upgrade of Ubuntu Server 9.04 to 9.10 is not as easy as I thought. I tried the a few different methods which I found from the Internet. But none of them are useful. And finally I found a way to solve the issue by myself. If you had same trouble as mine. You should read though this article.


Basically here are the steps which most peoples would refer to:

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install update-manager-core

$ sudo do-release-upgrade


But I can tell you these steps doesn't help in my case. I still got the message when I did the last step:
Checking for a new ubuntu release
No new release found


I also tried the following step:

$ sudo apt-get dist-update


Still same thing, when I typed command:
$ cat /etc/lsb-release


It still shows me, it's Jaunty version 9.04 which is not what I want:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=Jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"


Finally I got the idea from Ubuntu Repositories. Basically you need to edit the file /etc/apt/sources.list, and change all "Jaunty" to "Karmic". Then do the following steps again:

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get dist-upgrade


After reboot, you will see your Ubuntu version is changed to Karmic version 9.10.

$ cat /etc/lsb-release


DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=Karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"


Hope this guide will help you to upgrade your Ubuntu Server from 9.04 to 9.10 successfully.

Tips:

Using VI editor tool to replace Text "Jaunty" to "Karmic" at once:
$ vi /etc/apt/source.list

Then type the following command at the bottom of the VI editor:
:%s/karmic/lucid/g

You will see the following message:
18 substitutions on 18 lines

Now save and quit.
:wq!


Done!

Update on 2-Apr-2010:

Just checked Ubuntu Web Site, Ubuntu release Lucid (10.04) beta version is ready. So I modified the file /etc/apt/sources.list again, and replaced all "Karmic" with "Lucid". Then do the following steps:

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get dist-upgrade


After reboot, you will see your Ubuntu version is changed to Karmic version 9.10.

$ cat /etc/lsb-release


DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=Lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04"


Tuesday, October 27, 2009

How to install Nagios 3 on Ubuntu 9.04

This manual is only covered how to install Nagios 3 on Ubuntu 9.04. Since the Nagios 3 is one of the Ubuntu package, so you can easily and quickly install Nagios 3 on Ubuntu system.

Assume you already install Ubuntu 9.04 OS, now we can start install Nagios 3 software:


  • Install Nagios version 3

    # sudo apt-get install nagios3



  • Create the web user password file after finished installation of Nagios 3

    # sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin
    New password: xxxxxxxx
    Re-type new password: xxxxxxxx



  • Then you should already have a working Nagios!

    Open a browser, and go to http://localhost/nagios3/

    At the login prompt, login as:

    User: nagiosadmin
    Password: xxxxxxxx

    Note: There was a problem with gvfs, you will see the following error message:

    Nagios sent error message "DISK CRITIAL - /home/usr/.gvfs is not accessible:Permission denied"


    This problem is due to very special permissions set by fuse on the .gvfs directory. The workaround for this problem is here:

    >> modify /etc/nagios/conf.d/localhost_nagios2.cfg as follows:

    define command{
    command_name check_all_disks_plus
    command_line /usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -u GB -A -i .gvfs
    }

    define service{
    use generic-service
    host_name localhost
    service_description Disk Space
    check_command check_all_disks_plus!20%!10%
    }

    Then run

    # sudo /etc/init.d/nagios3 restart



  • If you would like to add a new host for monitoring, then you should add the configuration file for it.

    #cd /etc/nagios3/conf.d
    #vi newhosts.cfg

    define host{
    use generic-host
    host_name server1
    alias server one at lab
    address -------- [server1's IP address here]
    }

  • Let's create a new hostgroup for occasion, and add new hosts to it.

    Edit the file hostgroups_nagios2.cfg and add a new group:

    vi hostgroups_nagios2.cfg

    define hostgroup{
    hostgroup_name lab-servers
    alias Lab Servers
    members server1
    }

  • Now let's associate some services to that host

    # vi services_nagios2.cfg


    - find the section called "check that ping-only hosts are up", and change the line:

    hostgroup_name ping-servers


    to

    hostgroup_name ping-servers,lab-servers


  • Verify that your configuration file is ok:

    # nagios3 -v /etc/nagios3/nagios.cfg


    ... You should get:

    Total warnings: 0
    Total errors: 0


    Things look okay - No serious problems are detected during the check.

  • Reload/Restart Nagios Services

    # /etc/init.d/nagios3 restart


  • Go to the web intergace (http://localhost/nagios3) and check the host that you just added.

    Once the new host can be monitored from above URL, you are ready to add all your Servers/PCs/Routers/Network Equipments that would like to monitor.


NOTE:

- This requires a bit of planning, but you should have all the elements for doing this...
- Think well about the logical structure of the files - it should be possible for you to do without doing too much work!

Friday, June 19, 2009

How to install Xerox Network Printer on Ubuntu

This is the first time that I am trying to install a Xerox WorkCentre Pro C2636 on Ubuntu machine. Since the WorkCentre Pro C2636 is an network printer. And Ubuntu doesn't have default printer driver for this printer. So I googled and found there isn't a dedicated driver for C2636. Finally I found the another driver on http://www.linuxfoundation.org/en/OpenPrinting.


And here is the work around for C2636 on Ubuntu:

  1. Go to the http://www.linuxfoundation.org/en/OpenPrinting

  2. Select Printers -> Xerox -> WorkCentre C2424, then press Show.

  3. I tried the PPD file which from cljet5 by click direct download PDD, and it works great for me.

  4. After you download the PPD file, select System -> Administration -> Printing.

  5. Click New Printer, and Select AppSocket/HP JetDirect in Devices window.

  6. Type the IP address into Host field. Then click Forward button.

  7. Wait for next screen to pop-up, then select Provide PPD file, choose the location of the PPD file which you downloaded above and click Forward.

  8. Give the Short Name in next window, and type the IP address for that printer in Location field. Then click Apply.

  9. Now everything is set, you can double click the printer icon that you just created. And print a test page.


Good Luck!

Thursday, April 30, 2009

Ubuntu Tips - (Updated)

I like Ubuntu, and I collected some tips from the Internet when I encounter problems. I think you might be interested in them too.

Just record a few below:

  1. How To Use Proxy Server To Access Internet at Shell Prompt


    This is the 1st problem I met, since my machine can access the Internet only via a Proxy Server, so when I type something like:

    # apt-get install packagename


    It always give me an error, and cannot get anything updated or installed.

    So I just googled the Internet and found this post http://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/ is really useful.

    Basically it's using http_proxy environment variable in Ubuntu or any Linux OS, and it allows you to connect text based internet session/application via Proxy Server. So just type the following command to set proxy server:

    # export http_proxy=http://yourproxyserverip:port/


    Also you can setup the proxy variable for all users. To setup the proxy environment variable as a global variable, edit /etc/profile file:

    # vi /etc/profile


    And the following line:

    export http_proxy=http://yourproxyserverip:port/


    If you would like to use password protected proxy server, please refer to the link here.


  2. How to install software package or find the package based on file?

    Sometime I need to install a new customized package from somewhere, it requires pre-install some other packages. Or when you try to compile some new software from source, system might tell you missing some files or library. I sure you will have some question, How do you install individual package on Ubuntu?

    And here are the answers:

    • Via Graphical User Interface

      Under main menu, select System, then select Administration and click on Synaptic Package Management. Type a query into the search, then select a package you think is relative to what you want, Click Install.


    • Via Command Shell

      - Start a Terminal windows (Konsole, xterm, or any other command line/bash shell interface)

      - Type

      sudo -s


      (sudo as in superuser do, su as in "switch user") to get administrative privileges to install software

      - Type your password if prompted.

      - Type
      sudo aptitude install packagename


      If you need to know the package name of your program. Type

      sudo aptitude search 'programname or filename'


      will yield search results for your package when you supply it to the terminal. Here is the "current state" flag for search results:

      • i — installed: successfully installed to system

      • c — config: package not installed, but configuration files remain

      • p — purged: package has no files on system

      • v — virtual: package does not exist, but another "Provides" it

      • B — broken: dependencies unresolved, fix required

      • u — unpacked: only files unpacked, not configured

      • C — half-configured: configuration failed, fix required

      • H — half-installed: removal failed, must be reinstalled


      - In some cases, it may automatically know which package you want, such as "sudo aptitude install firefox" Look on the package page of the Ubuntu distribution site.


      - If you are not sure of the name of the program you are trying to install, you can use tab completion to try and find it (most major distributions have it.) Simply type the first few letters of the package you want to install and hit tab once or twice. For example, type fire and then hit tab, it will bring up all packages that begin with fire; firefox will be one of them.


      - Wait for it to prepare to install the software package from the repository.
      If you are prompted whether or not to install, type "y". Next time if you would rather have it do it automatically, type

      sudo aptitude install package -y


      Wait for it to finish installing, and close the terminal.


      - Another small tip is to update your software packages list by using the following command:

      sudo aptitude update


      - It should be in the Main Menu under the appropriate category. If not, restart your computer.




  3. How to Change the Computer Name?

    Open you terminal window and type the following command:

    sudo gedit /etc/hostname


    When prompted, enter the administrator password and click the OK button. The hostname file will open, displaying the current computer name. Replace the current computer name with the desired new name. Save the new file and Close all open windows and restart your system.







Friday, April 3, 2009

[Guide]Howto Install Software RAID 5 on Ubuntu - 1

After search Software RAID5 installation for Ubuntu, I decide to try it on my Ubuntu server. And I couldn't get it boot after I successfully configured RIAD5 during ubuntu server's installation. By the end, after I read the Installation SoftwareRAID, I figured out it's because my RAID 5 configuration for the /boot partition was wrong. Since the /boot filesystem cannot use any softRAID level other than 1 with the stock Ubuntu bootloader.

Ok, here is my version of Software RAID5 installation for Ubuntu Server on IBM ThinkCentre 8189-KJU (Known as M50).

Basically I had 3 PCs 160GB Seagate Barracuda 7200 Hard Disk Drives which connected to 2 IDE Channels on IBM ThinkCentre Desktop PC. The 1st and 2nd Hard Disk connected to the 1st IDE Channel, and the 3rd one and DVD drive connected to the 2nd IDE Channel.


Basically I planned 200MB space on both sda (which is Hard Disk1) and sdb (which is Hard Disk 2) for the /boot partition with RAID1, 2GB space on both sda and sdb for the swap partition with RAID1, and left of space (around 158GB) on sda, sdb and almost everything on sdc for the root partition / with RAID5.

So here is the setup:
  • sda - 200MB sda1 RAID1 /boot
    145GB sda5 RAID5 /
    2GB sda6 RAID1 swap

  • sdb - 200MB sdb1 RAID1 /boot
    145GB sdb5 RAID5 /
    2GB sdb6 RAID1 swap

  • sdc - 200MB sdc1 - No going to use.
    145GB sdc5 RAID5 /
    2GB sdc6 - Not going to use.


As I said before, since the /boot file system cannot be running on RAID5, but only RAID1. Also I left most space to RAID5 for the root / file system which include all my data files as well. For the swap, I think you can configure it either RAID1 or RAID5, it's doesn't matter, but I configured as RAID1 in my setup, since I think RIAD1 should have enough protection and faster than RAID5 system.

Ok, I am not going to go through every steps for setting up the Ubuntu Server, but only the steps for configure RAID system:

  • From the "Partition Disks" dialog box, select "Manually edit the partition table".

  • Select the 1st disk ("sda")

  • Say "Yes" to "Create a new empty partition" select "physical volume for RAID", not the default "Ext3 journaling file system".

  • TO be continue ...


Monday, March 30, 2009

Spinning Cube On Ubuntu

A few days ago I saw one of my friend show me a spinning cube with classy MacOSX like dock bar and many other effects on his IBM T41 Laptop with Ubuntu Linux installed. Then I went home and loaded latest ubuntu on my IBM ThinkCenter M50 Desktop, and googled the internet. Finally I figured out the solution to enable/install/use the cool spinning cube!!!

You can find the completion Guide from https://help.ubuntu.com/community/CompositeManager/CompizFusion.

And here I just list the simply steps to get Compiz installed and run:


  1. Go to System -> Preferences -> Appearance, and select Visual Effects tab and click on Extra. You may be prompted to install restricted drivers and if so, please click Yes, if not: you will have a few effects enabled by default.

  2. Install CompizConfig Settings Manager. Just open a terminal windows and type the following command:


    sudo apt-get install compiz compizconfig-settings-manager


  3. Then go to System -> Preferences -> CompizConfig Settings Manager and enable Desktop Cube, Rotate Cube and Cube Reflection and Deformation. You can also select other settings as you wish.

  4. Go to General Options, on the last tab Desktop Size, set the Horizontal Virtual Size to 4. And now you will have a spinning cube. See this:

    To trigger it, press Ctrl + Alt + LeftClick or Ctrl + Alt + LeftButton on the mouse and drag to spin it.

    You may also use Ctrl + Alt + DownArrow to unfold it and then LeftArrow/RightArrow to move around the unfolded cube.


  5. Now you can go back to CompizConfig Settings Manager to try some other cool effects.


Although the spinning cube is cool, but Compare iPC OSx86 which running on my Dell Desktop, I will still prefer OSx86, because it's real of Mac OS.

Comments System

Disqus Shortname