Install Drupal7 in Ubuntu is very convenient, the most convenient way of course is sudoapt-getinstalldrupal7 but Ubuntu Drupal7 package compared to the official download made a considerable adjustment, so the installation is simple, however, it takes a lot of effort and time to learn, mainly because there are too many differences with the online reference materials in the directory structure, so we decided to install it manually, installation steps are as follows: 1. Preparation: Install the tasksel package
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 linuxidc: linuxidc/var/www/drupal7
The reason for changing the owner of the Drupal7 working directory from root to linuxidc (username under Ubuntu) is for security reasons, and the second 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:
ServerName drupal7.linuxidc. me //
ServerAdmin ubuntu.linuxidc@gmail.com // administrator mailbox for this VM
DocumentRoot "/var/www/drupal7" // main directory of the VM
// Set 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.
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
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.linuxidc. 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, refer to the highlights on the next page.: Http://www.linuxidc.com/Linux/2014-04/100895p2.htm