The developer installation doesn't follow any security procedure. Please do this only in your local machine. If you need to setup a test enviroment on your server, see Server Installation Guide
This guide has been tested on Ubuntu 14.04, but can be easily used for others systems as well.
Setup the enviroment
Install packages
First of all, you need to install necessary packages:
sudo apt-get install apache2 php5 php5-gd php5-pgsql php5-json postgresql git
Get the code
Unfortunately, our Gitlab installation doesn't use standard ssh port. You need to edit your configuration if you want to clone using ssh. Add in your ~/.ssh/config the following configuration:
host code.ubuntu-it.org
user git
port 2222
In this guide we will use ~/ubuntu/website/www-test
as installation folder. You can use whatever folder you want, but be sure that Apache has right permission on the folder.
Take the code:
cd ~/ubuntu/website/www-test
git clone git@code.ubuntu-it.org:ubuntu-it-web/www-test.git
If you don't have an account on code.ubuntu-it.org, you can use HTTP instead of SSH:
git clone http://code.ubuntu-it.org/ubuntu-it-web/www-test.git
If you want to clone contents of http://wwwtest.ubuntu-it.org you can download our backup. Of course we delete sensible data ;-) The backup is here, and is created everyday. Download the compress sql and extract it in your current folder
Configure Apache
You need to create a configuration for your local installation of wwwtest. First of all, create a new configuration coping default one:
cd /etc/apache2/sites-available/
sudo cp 000-default.conf wwwtest.conf
You need to change this file following your preferences. A working setup could be:
<VirtualHost *:80>
ServerName wwwtest
RewriteEngine on
DocumentRoot /home/rpadovani/Documents/ubuntu/website/www-test
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /home/rpadovani/Documents/ubuntu/website/www-test/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Of course, if you set a server name, remember to set it also in /etc/hosts, and set your directory as you prefer. When you have done with your configuration, remember to activate it:
sudo a2ensite wwwtest.conf
sudo a2enmod rewrite
sudo service apache2 reload
Configure Postgresql
You need this passage in any case, also if you don't want to import our backup.
Do login as postgres user:
sudo su postgres
Create a user and a database:
createuser --superuser --pwprompt ubuntuit
createdb ubuntuit_wwwtest
Then, we need to give right permissions to our new database:
psql -d template1 -U postgres
GRANT ALL PRIVILEGES ON DATABASE ubuntuit_wwwtest TO ubuntuit;
\q
Now, if you want, you can import our backup:
psql -U postgres ubuntuit_wwwtest -W < wwwtest.sql
Configure Drupal
To finish, you need a working setup for Drupal. The configuration file is sites/default/settings.php You can start editing sites/default/default.settings.php or using the following snippet of code:
<?php
$db_prefix = 'drupal_';
$update_free_access = FALSE;
ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');
$databases = array (
'default' =>
array (
'default' =>
array (
'driver' => 'pgsql',
'database' => 'ubuntuit_wwwtest',
'username' => 'ubuntuit',
'password' => 'yourPassword',
'host' => '127.0.0.1',
'port' => '',
'prefix' => 'drupal_',
),
),
);
$drupal_hash_salt = '';
?>
The End(?)
Just to be sure, restart your Apache configuration:
sudo service apache2 restart
Your local installation will be accesible from http://wwwtest (or whatever server name you set)
Install Valencia
Valencia is the theme used by http://wwwtest.ubuntu-it.org. You can install it automatically using composer.phar: Ỳou need to be in the root of website
php composer.phar install
With the same command you can sync the version of the theme you have with the upstream one
Support
If you need support, please join #ubuntu-it-web on Freenode or write an email to gruppo-web@ubuntu-it.org