Download and extract files
$ wget https://www.drupal.org/files/projects/drupal-x.x.tar.gz
$ tar -zxvf drupal-x.x.tar.gz
Move to root folder
$ mv drupal-x.x /var/www/html
Create the configuration file and grant permissions
In the sites/default directory, copy the default.settings.php file and rename the copied file to settings.php.
$ cp sites/default/default.settings.php sites/default/settings.php
Give the web server write privileges (666
or u=rw,g=rw,o=rw
) to the configuration file.
$ chmod a+w sites/default/settings.php
Give the web server write privileges to the sites/default directory.
$ chmod a+w sites/default
Create the Drupal database
To complete the installation, you must create an empty database and a user with full access to the newly created database for Drupal to use. You can do this by command line, or through phpMyAdmin or another database client.
$ mysqladmin -u username -p create databasename
Where ‘username’ is a MySQL user which has the CREATE and GRANT privileges. MySQL will prompt for the ‘username’ database password. Next you must set the access database rights. Log in to MySQL:
$ mysql -u username -p
$ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON databasename.* TO ‘username’@’localhost’ IDENTIFIED BY ‘password’;
Run the installation script
Point your browser to the base URL of your website
http://www.example.com