Install drupal on your own linux machine

The following steps shows a success installation of drupal on a Fedora system:

1.download and install
    yum install httpd php mysql mysql-server php-mysql drupal phpmyadmin

2.start services
    /sbin/chkconfig httpd on
    /sbin/chkconfig mysqld on

    /sbin/service httpd start
    /sbin/service mysqld start

3.change mysql root password
    mysqladmin -u root password 'new-password'           [quotes are required]

4.Make additional security-related changes to mysql.
     mysql -u root -p
     mysql> DROP DATABASE test;                            [removes the test database]
     mysql> DELETE FROM mysql.user WHERE user = '';        [Removes anonymous access]
     mysql> FLUSH PRIVILEGES;

5. Following the above steps, the document root for Apache is /var/www/html/

Create a test PHP script (such as phpinfo.php) and place it in the document root. A useful test script sample:

     <?php
        phpinfo();
     ?>

6. Create a database and database user for your data. You will use this database and user name in your database connection string. The GRANT statement actually creates a new MySQL user account.

     mysql> CREATE DATABASE drupal;
     mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupal_user'@'localhost' IDENTIFIED BY 'thepassword';
     mysql> flush privileges;

7.modify apache conf files to allow access from 127.0.0.1 or from internet
    vi /etc/httpd/conf.d/drupal.conf
    vi /ect/httpd/conf.d/phpmyadmin.conf

8.setup drupal
    chmod a+w /etc/drupal/default/settings.php
    firefox http://127.0.0.1/drupal
After installation,
    chmod a-w /etc/drupal/default/settings.php

9.create first drupal account as site-manager

10.set up cron jobs
    crontab -e
#    Add this line to run cron at 0:00 and 12:00 everyday
        0 0,12 * * * /usr/bin/wget -O - -q -t 1 http://www.example.com/cron.php
#       making backup of database on 1st and 15th every month at 0:10
        10 0 1,15 * * mysqldump --user=... --password=... databasename >backup-`date --rfc-3339=date`.sql
#       making backup of drupal installation on 1st every month at 0:10
        10 0 1 * * tar -cjf drupal-`date --rfc-3339=date`.tar.bz2 /usr/share/drupal

11. change php upload limits

vi /etc/php.ini

edit this line: upload_max_filesize = 2M

and this: post_max_size=8M

and this: memory_limit=32M 

you may want them to be 20M,50M,64M respectively.

 

Done

shared user accounts for multi-site configuration

If you want to share user accounts for several sites, they need to use the same database, and you need to create your settings.php manually:

1. Do not try to view your site in your browser until you have completed the entire configuration described below.

Open the file 'settings.php' in the sites/default folder. Go to
line 93 (or somewhere around there) and you should find a line like
this:

$db_url = 'mysql://username:password@localhost/databasename';
change this line with your DB name, DB user and password. This line needs to be the same for your different sites.

 2. Just below the line we just changed above, there is a line that goes like:
$db_prefix=’’;
Since we want to share some but not all of the tables in the database
between our sites, we can instruct Drupal by adding site-specific
prefixes for the names of those tables we do NOT wish to share.
Put the following into your settings.php file:

$db_prefix = array(
'default' =>'',
'blocks'=> 'main_',
'boxes' => 'main_',
'menu' => 'main_',
'variable' => 'main_',
'cache' => 'main_',
'cache_menu'=> 'main_',
);

This sets table sharing as the default, except for those tables listed, which are prefixed by 'main_'.

 3. Our users and editors must be able to move freely between our three
websites. To achieve this, edit the variable '$cookie_domain' near the
end of the settings.php table, so that it looks like this:
$cookie_domain = 'example.local';

 ------------

Ref: http://drupal.org/node/201673