Retrospecter... Installing Drupal 8 (II).- Let's do the basic installation

Drupal 8 is comming soon

Once our Debian is upgraded and we have PHP on its 5.6 version, we can proceed to our Drupal installation, we can go again to our installation page pointing browser to site URL.

After choosing language now we can pass over basic requeriments since we already have the right PHP version, now it's time for PHP libraries, one that is not usually installed by default with PHP.

We can do it as root in a terminal or ssh:

apt-get install php5-gd

It will complain also about file permission so from Drupal root we can give it the required permission:

mkdir sites/default/files
chmod a+w sites/default/files

It will also complain because there is no file called settings.php:

cp sites/default/default.settings.php sites/default/settings.php

Now it will ask about the database, we need to manually create it so we can provide details for Drupal:

apt-get install postgresql-client <-- if it's not installed yet
su postgres
createuser drupaluser -P
createdb drupaldb --owner=drupaluser
psql -U drupaluser -d drupaldb -h localhost
<- to verify database is correctly created and used can connect to it

(Note.- lall users and passwords are ficticious, whenever they are similar to current usenames or passwords it is not intended)

With all of this we can now make the installation, there are minor details, not mandatory, so since now we can install I will show the details below.

Clean URLs

Clean URLs are those without file names, parameters or variables, to use them with apache, yes I know it's cooler to use Nginx nowadays but I'm loyal to apache, you need to install mod_rewrite and to enable it on server configuration, in Debian Jessie module is installed with apache so you just need to enable it:

a2enmod rewrite
service apache2 restart

To use it on your site config you just need to edit the file /etc/apache2/sites-available/010-drupal.conf we created before and add this into <Directory>:

                RewriteEngine on
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteCond %{REQUEST_URI} !=/favicon.ico
                RewriteRule ^ index.php [L]

Installing PECL_uploadprogress

PECL and PEAR are library and extension  repositories for PHP, it's always nice to give them a try to see what is there before start programming, to install this extension we need to do:

apt-get install php-pear <-- this package includes PECL
apt-get install php5-dev <-- we need it to complile extensions
pear upgrade-all <-- this updates all repositories
pecl install uploadprogress

Doing so we have the extension compiled but we need to enable it in php, the ugly way to do so is adding it to php.ini, the Debian way is creating a new file:

vi /etc/php5/apache2/conf.d/20-uploadprogress.ini

With this content:

; configuracion para PECL uploadprogress
; priority=20
extension=uploadprogress.so

Once it's done, restart apache and we are set:

service apache2 restart

Drupal 8 is installed and ready to be used.