Install Drupal 7 in Ubuntu 14.04 LTS

Source: Internet
Author: User

Installing Drupal 7 in Ubuntu is very convenient, and the most convenient way is of course

Sudo apt-get install drupal7

However, the Drupal 7 package of Ubuntu has been greatly adjusted compared with the official download, so the installation is simple, but it takes a lot of effort and time to learn, there are too many differences between the directory structure and the online reference materials, so we decided to install it manually. The following are the installation steps:

1. preparations:

Install tasksel Software Package

Sudo apt-get install tasksel

Install the LAMP Service (Apache2, Mysql, and PHP)

Sudo tasksel install lamp-server

Create a working directory for Drupal7

Sudo mkdir/var/www/drupal7

Sudo chown bkjia: bkjia/var/www/drupal7


The reason for changing the owner of the Drupal7 working directory from root to bkjia (username under Ubuntu) is for security reasons, and the other is to facilitate operations on the Drupal7 working directory.

Create a VM file for Drupal7

Sudo vi/etc/apache2/sites-available/drupal7.conf


The details are as follows:

<VirtualHost *: 80>

ServerName drupal7.bkjia. me //

ServerAdmin ubuntu.bkjia@gmail.com // administrator mailbox for this VM

DocumentRoot "/var/www/drupal7" // main directory of the VM

<Directory "/var/www/drupal7"> // you can specify the attributes of the home Directory of the VM.

Options FollowSymLinks // allow soft links

AllowOverride All // allow overwriting, that is, allow the. htaccess file to overwrite attributes.

</Directory>

ErrorLog "/var/log/apache2/drupal7_errors.log" // specify the Error log File

CustomLog "/var/log/apache2/drupal7_accesses.log" common // specify the access log file

</VirtualHost>


Where:

ServerName refers to the DNS domain name of the VM.

ServerAdmin is the administrator email address of the VM.

DocumentRoot is the home directory of the VM.

Directory indicates setting the properties of the VM working Directory.

Options FollowSymLinks // This working directory allows soft links

AllowOverride All // allow overwriting, that is, allow the. htaccess file to overwrite attributes.

ErrorLog // specify the Error Log File

CustomLog // specify the access log file

Note:
If you do not have a DNS domain name, you can also modify the c: \ windows \ system32 \ drivers \ etc \ hosts file with the Administrator permission on your test machine (client) and add the following statement:

X. X drupal7.bkjia. me

X. X indicates the IP address of the server where the VM is located. In this way, you can directly access the DNS domain name on your machine to access the VM.

Enable ReWrite module of Apache2

Sudo a2enmod rewrite

Sudo service apache2 restart

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.