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
multiple drupal site installation
if you want multiple sites installed with your drupal,e.g. you need a new site as http://127.0.0.1/new,
1. set-up new database as stated above,
2. then make new configuration files by:
mkdir /etc/drupal/127.0.0.1.new
touch /etc/drupal/settings.php
chmod a+w /etc/drupal/settings.php
3. Give directions to httpd by adding
Alias /new /usr/share/drupal
to your /etc/httpd/conf.d/drupal.conf file.
4. Finish your configuration in your web browser
firefox http://127.0.0.1/new/install.php
5. protect your configuration file
chmod a-w /etc/drupal/new/settings.php
Now you should have your new site at
http://127.0.0.1/new
6. set up cron jobs as in the main article