Tuesday, 15 July 2014

Install Drupal 7 on Linux


Install the PHP 5.3.3 and Apache 2.2.15,

restart your apache server:
/etc/init.d/httpd restart

To function Drupal properly with apache and php

vi /etc/httpd/conf/httpd.conf
AddType application/x-httpd-php .html

vi /data/testphp.php
and enter this then save :

<?php
phpinfo();
?>

restart your apache server:

/etc/init.d/httpd restart

Configure Mysql to work with Drupal

Install MySQL-5.6

mysql -u root -p
mysql> CREATE DATABASE drupal;
mysql> CREATE USER drupaluser@localhost;
mysql> SET PASSWORD FOR drupaluser@localhost= PASSWORD('typepasswordhere');
mysql> GRANT ALL PRIVILEGES ON drupal.* TO drupaluser@localhost IDENTIFIED BY 'password';
mysql> quit

Finally lets start with Drupal

Get the latest package here : http://drupal.org/project/drupal

Copy the file to /data
and unpack it by typing :

tar -xvzf drupal-7.28.tar.gz
cd drupal-7.28
chmod a+w sites/default
cd sites/default
cp default.settings.php settings.php
chmod a+w settings.php
mkdir files
chmod a+w files

vi /etc/httpd/conf.d/vhost

<VirtualHost 10.10.xx.xxx:80>
    ServerName www.testsite.com
    ServerAlias testsite.com
    DocumentRoot "/data/drupal"
    DirectoryIndex index.php
    <Directory "/data/drupal">
        AllowOverride All
        Allow from All
        Options -Indexes
    </Directory>
</VirtualHost>

/etc/init.d/httpd restart

Add an entry in C:\Windows\System32\drivers\etc\hosts
10.10.xx.xxx www.testsite.com

Open up browser and go to :
http://www.testsite.com/drupal-7.28
it will open up a Drupal page !

To prevent unwanted users working on them..

chmod go-w settings.php
chmod 757 files

Ref: http://altinukshini.wordpress.com/2011/01/09/how-to-install-drupal-7-on-linux/

No comments:

Post a comment