PART 0 - DOWNLOAD DRUPAL
- Download the latest Drupal from here.
PART 1 - INSTALLING & CONFIGURE LAMP (Linux Apache MySQL PHP)
STEP 1 - Installing APACHE
- Open a terminal and type:
- To make sure that Apache is installed open a web browser and type:
- You should see something like this:
sudo apt-get install apache2
http://localhost
STEP 2 - Installing PHP
- Again open a terminal and type:
- Now you must restart Apache:
- To ensure that there are no issues with PHP run:
- A file called testphp.php will open.
- Copy and paste the following into the testphp.php
- Save the file and exit
- Now open a web browser and type:
- If it works then PHP is installed!
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo gedit /var/www/testphp.php
http://localhost/testphp.php
STEP 3 - Installing MySQL
- Open a terminal and type:
- The above command will install MySQL
- Now comes the tricky part!
- Log in MySQL by typing:
- Now you need to set a password (Change yourpassword with the password you want. Do not remove ' '. Type your password between ' '.)
- For example:
- The next step is installing phpMyAdmin (A tool for editing your databases)
- Now you must edit the php.ini file in order to get PHP to work with MySQL
- Uncomment the following line by removing the semicolon (;)
- For example:
- Finally restart Apache:
sudo apt-get install mysql-server
mysql -u root -p
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('12345');
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
gksudo gedit /etc/php5/apache2/php.ini
;extension=mysql.so
extension=mysql.so
sudo /etc/init.d/apache2 restart
PART 2 - DRUPAL
- Open a terminal and type:
- apache2.conf will open
- In order for Drupal to functioning properly with Apache and PHP type the following at the the end of the file:
- Click Save
- Now it's time to create a Database
- Type the following and enter your password:
- To create a Database type:
- Now you need to create a user
- Finally define a password for the newly created user
- Now you need to grand permissions for the user
- Go to the location that your Drupal was downloaded in PART 0 and unpack it
- Then copy the unpacked Drupal folder to /var/www/
- Now head to /var/www/ and change directory to drupal
- Change the permissions
- Copy default.settings.php to settings.php
- Change the permissions
- Finally create a directory named files
- and change permissions
- That's it!
- Now open a web browser and type:
- Finally follow the on screen Drupal instructions to install Drupal
sudo gedit /etc/apache2/apache2.conf
AddType application/x-httpd-php.html
mysql -u root -p
//Use whatever name you like instead of drupal
CREATE DATABASE drupal;
CREATE USER yourname@localhost;
SET PASSWORD FOR yourname@localhost = PASSWORD('yourpassword');
GRANT ALL PRIVILEGES ON drupal.* TO yourname@localhost IDENTIFIED BY 'yourpassword'
cp /home/user/Downloads/drupal-7.21 /var/www/
cd drupal-7.21
sudo chmod a+w sites/default
cd sites/default
cp default.settings.php settings.php
sudo chmod a+w settings.php
sudo mkdir files
sudo chmod a+w files
http://localhost/drupal-7.21
No comments:
Post a Comment