Howto

Ubuntu 8.04 LTS (Hardy Heron) Apache-PHP-MySQL Server

Once again, here's my updated simple installation of Apache, PHP and MySQL in Ubuntu 8.04 LTS (Hardy Heron) Server.

  1. Install SSH Client and Server (for my remote access)
    sudo apt-get install ssh
  2. Install Database Server
    sudo apt-get install mysql-server-5.0
  3. Install Apache HTTP Server
    sudo apt-get install apache2
  4. Install PHP5 and Apache PHP5 module
    sudo apt-get install php5 libapache2-mod-php5
  5. Restart Apache
    sudo /etc/init.d/apache2 restart

How to install common multimedia codecs in Ubuntu

Sometimes you you want to play some music or video but it doesn't allow you because it asked for some strange codecs that you may not understand :)

Good news is, it relatively easy to download most of them all together.

Here's how:

  1. Switch to super user
    sudo -s -H
  2. Update and upgrade your present system by using these two separate commands
    apt-get update

    apt-get upgrade

  3. Here's now the magic; install the following common codecs

How to know what version of Ubuntu you're using

With Ubuntu's LTS (Long Time Support) and usual 6 months release cycle, sometimes you tend to confuse or forget what version of Ubuntu you are using.

How to know what version of Ubuntu you're using?

Easy! Fire up your your terminal and type this command:

lsb_release -a

How to copy CD/DVD Disk in Ubuntu

Duplicating CD or DVD in Ubuntu is so easy.

First we create an image of the CD/DVD to your hard disk drive.

sudo umount /dev/cdrom
readcd dev=/dev/cdrom f=file.iso

And then, we finally burn the iso image file to blank or writable CD/DVD .

Right click on Image (ISO) file -> Write to Disc... -> Write

HyperTerminal replacement in Ubuntu - Minicom

I was kinda surprise that HyperTerminal is not available anymore in Windows Vista. No problem, I rebooted my notebook to Ubuntu and fire-up minicom.

  1. By default, minicom is not installed in Ubuntu, so you need to install it first.
    sudo apt-get install minicom
  2. Find the name of your Serial Port
    dmesg | grep tty
    In the output look for something like "tty". The output in my case is like this:
    $ dmesg | grep tty
    [ 17.341823] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

Ubuntu 7.04 : Apache-PHP-MySQL Server

Here are the packages you need to install to make your Ubuntu 7.04 as webserver with PHP and MySQL support.

  1. Install Apache:
    sudo apt-get install apache2
  2. Install PHP5:
    sudo apt-get install php5-common php5 libapache2-mod-php5
  3. Install MySQL:
    sudo apt-get install mysql-server mysql-client
  4. To use MySQL with PHP:
    sudo apt-get install php5-mysql

PHP5 for CentOS 4.4

I’m using right now CentoS 4.4 and PHP5 is not yet part of the rpm package. I can always download the source and compile it or search some pre-pack PHP5 RPM and install it.

Alternatively, here’s how to do it using the good old yum one liner command.

  1. Edit CentOS-Base.repo
    vi /etc/yum.repos.d/CentOS-Base.repo
  2. Enable CentOSPlus by changing:

    #additional packages that extend functionality of existing packages
    [centosplus]

Restrict printing time

Sometimes there are some requirements that you want to restrict the time a printer can print. Here’s how to do it:

  1. Open the Printers and Faxes Control Panel.
  2. Right-click the printer you want to configure in this manner and select Properties.
  3. Go to the Advanced tab, and then click Available From.
  4. To set the time period that the printer is available, click the up or down arrows, or alternatively, type a start and end time, such as "7:00 a.m. to 4:00 p.m."
  5. Click OK to finish the wizard.

Publishing printers into Active Directory

To publish a printer to Active Directory, follow these steps:

  1. Open the Printers and Faxes Control Panel.
  2. Right-click the printer you want to publish into the active directory, and go to the Sharing tab.
  3. Click Share This Printer, and enter the name for the printer share.
  4. Check the List in the Directory check box.
  5. Click OK.

Start or stop the printer spooler from a command line

To start or stop the printer spooler from a command line, follow these steps:

  1. Open a command prompt.
  2. Execute the following commands, depending on your intent: net start spooler to start the spooler, or net stop spooler to stop it.