When i installed Debian, i forgot to install GNOME! How to install?

apt-get install x-window-system

Once X installed proceed with gnome, following packages are minimum but gives you gnome gui based interface… so on it's easier to add other packages from synaptic.

apt-get install gnome-core gdm synaptic

Be careful on you /et/apt/source.list file- if the CDROm is un-commented then installation will begin from CDRom otherwise it will download from internet… it's a relatively bigger downloads!

Share

.htaccess tips and tricks

Redirecits

redirectpermanent /training/test.html http://www.example.com/learning/newtest.html

Allow SSI FIles

AddType text/html .shtml .shtm .htm .html

AddHandler server-parsed .shtml .shtm .htm .html

Parsing PHP in HTML

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html 

Allow or prevent directory browing

IndexIgnore */*

Options +Indexes

Password Protection

<Files secret_file.html>
    AuthType Basic
    AuthName "Team Page"
    AuthUserFile path_to_password_file
    Require user username
</Files>
Share

Linux Rescue Mode, recovering from boot

When things go wrong, there are ways to fix problems. However, these methods require that you understand the system well. This chapter will describe the ways that you can boot into rescue mode and single user mode, where you can use your own knowledge to repair the system.

What is Rescue Mode?

Rescue mode provides the ability to boot a small Linux environment entirely from a diskette, CD-ROM, or using some other method.

As the name implies, rescue mode is provided to rescue you from something. During normal operation, your Red Hat Linux system uses files located on your system's hard drive to do everything — run programs, store your files, and more.

However, there may be times when you are unable to get Linux running completely enough to access its files on your system's hard drive. Using rescue mode, you can access the files stored on your system's hard drive, even if you cannot actually run Linux from that hard drive.

Normally, you will need to get into rescue mode for one of two reasons:

  • You are unable to boot Linux.

  • You are having hardware or software problems, and you want to get a few important files off your system's hard drive.

Next, we will take a closer look at each of these scenarios.

Read more

Share

Linux ISO and DR Solution- Mondo Rescue

Mondo Rescue is a GPL disaster recovery solution. It supports Linux (i386, x86_64, ia64) and FreeBSD (i386). It's packaged for multiple distributions (RedHat, RHEL, SuSE, SLES, Mandriva, Debian, Gentoo).
It supports tapes, disks, network and CD/DVD as backup media, multiple filesystems, LVM, software and hardware Raid. You need it to be safe.
 
Visit: http://www.mondorescue.org/ 
Share

Virtual Hosting with Tomcat

This is a guide on setting up Tomcat to do virtual hosting and make it behave like a simple webserver with jsp and servlet support, for many different sites all hosted on the same IP address. The aim is to have a single directory for each virtual host, which can be manipulated individually without hassles from managing multiple .war files and other configuration difficulties.

To configure Tomcat for a virtual host, you need a <Host ..> directive in the server.xml file, and a ROOT.xml file in the conf/Catalina/$host directory. Here's the minimal setup required for a copy of Tomcat serving directly on Port 80, using no connectors or other configuration difficulties.

This was written for Tomcat 5 on linux, with Tomcat installed in /usr/local/tomcat

We start with the simplest configuration, of one website, called 'localhost' which keeps it's files in /usr/local/tomcat/webapps/localhost . We're not using any .war files here – all the files are placed straight into the directory.

Read more

Share

Zip and Unzip Command in Linux

Zipping a Directory

zip is a compression and file packaging utility for Unix, Linux, VMS, MSDOS, OS/2, Windows NT, Minix, Atari and Macintosh, Amiga and Acorn RISC OS etc. This utility is installed by default on most Linux computers. he program is useful for packaging a set of files for distribution; for archiving files; and for saving disk space by temporarily compressing unused files or directories.

To zip directory called pics in your home directory (/home/you/pics), type the following command:

$ zip -r myvacationpics.zip /home/you/pics/

It recurse into directories (all files and directories inside pics) to produced zip file called myvacationpics.zip.

Unzipping a Directory

 

unzip command will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems. The default behavior (with no options) is to extract into the current
directory (and subdirectories below it) all files from the specified ZIP archive.

By default, all files and subdirectories are recreated in the current directory; the -d option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). This option need not appear at the end of the command line; it is also accepted before the zipfile specification (with the normal options), immediately after the zipfile specification, or between the file(s) and the -x option. The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed.

Syntax:
unzip {.zip-file-name}-d {/path/to/extract}

For example extract package.zip into /opt, enter:
# unzip package.zip -d /opt
# cd /opt
# ls

If you want to rename package directory use mv command:
# mv package newname

Share

Installing GCC, C++ and GD in Linux

By Using YUM these compiler and libraries can be setup-

  • GCC compiler
  • C/C++ development libraries
  • GD development libraries

For GCC, C/C++-

yum install gcc gcc-c++ autoconf automake

For GD-

yum install gd gd-devel php-gd

On Debian/Linux to install GCC use-

# apt-get update && apt-get upgrade
# apt-get install build-essential
# gcc -v
# make -v

That's it!

Share

Setup Tomcat with Apache2 and Java on Ubuntu 10.04 Server

Apache Tomcat (or Jakarta Tomcat or simply Tomcat) is an open source servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure Java" HTTP web server environment for Java code to run.
 
Tomcat should not be confused with the Apache web server, which is a C implementation of an HTTP web server; these two web servers are not bundled together. Apache Tomcat includes tools for configuration and management, but can also be configured by editing XML configuration files.

Read more

Share

Installing VirtualBox From Precompiled Binaries

First, we install the packages gdeb, gedbi, and gdebi-core. Open the Synaptic Package Manager (System > Administration > Synaptic Package Manager):

You can use the search function to find the three packages. Select them for installation and click on Apply. Close Synaptic after the packages have been installed:

Read more

Share