What are the various runlevels in linux OS?

Following are the run-levels which you could refer:

0 — Halt

1 — Single-user mode

2 — not used (user-definable)

3 — full multiuser mode

4 — not used (user-definable)

5 — full multiuser mode (with an X-based login screen)

6 — Reboot

If you use a command line login screen, then you are in run level 3.

If you use a graphical login screen, you are operating in run level 5.

The default run level can be changed by editing the /etc/inittab file.

 

It contains a line near the top of the file similar to the following:

Id:5:initdefault:

Change the number in this line to the desired run level.

 

You will have to reboot the system for the changes to take effect.

How to create password protecting directories?

1) Create a .htaccess file and specify the following code in it,

 

AuthType Basic

AuthName “Administration”

AuthUserFile /home/support/.htpasswd

require valid-user

 

2) To create a passwd file, use the following .htpasswd generator.It should allow you to generate a

 

username /  encrypted password pair.

 

http://www.desilva.biz/apache/pwdweb.html

 

The .htpasswd file will contain your username(s) and encrypted password(s) and will usually look like this:

 

Christopher:En7Cr9pT2Ed/u

Mak3m0n3y

 

Place the .htaccess file in the directory that is to be protected.

 

And place the .htpasswd outside the directory that is to be protected.

 

Example:

If you want to protect a directory “blog” under a particular domain

then the .htaccess file should be placed in the “blog” directory and the .htpasswd

the file should be placed in the “html ” directory.

 

Note that all the directories that are created under the blog directory will also get protected.

 

 

 

And execute the command grpconv to rebuild the file.

 

You can now create the new account, without any error message.

How will I resolve the below database error?

There seems to have been a slight problem with the database.

Please try again by pressing the refresh button in your browser.

 

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

 

We apologize for any inconvenience.

 

For this login to your server as root user and check the following paths for MySQL. Sock

 

/var/tmp

/tmp

/var/lib/mysql/

/usr/local/lib/

 

If you don’t get it, please create it.

 

Please note that mysql. Sock is symlink.

How will you check and confirm that your server is using suPHP?

 

It’s very simple to verify this. Have a simple ‘php info’ script.

Create a file named ‘phpinfo.php’ under the public_html of your domain

Insert the following code:

<? php
phpinfo();
?>

Access the file in your browser using the link http://yourdomain.com/phpinfo.php

At the top section search the line ‘Server API’.
If you see CGI’ then your account is hosted on a server with suPHP.
If it shows ‘apache’ then you are NOT on a suPHP server.