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 

 

Done