• Edit
  • Delete

ullright Webservice Setup (For Ubuntu Linux)

This guide explains how to install the webservice infrastructure (LAMP) for ullright using a fresh Ubuntu Linux installation.
Tested with Ubuntu 12.04LTS and 14.04LTS.

This guide is valid both for installing a local dev environment, but also for a web server.

Use your favourite editor like nano, gedit, etc instead of vim if you like.

Install packages

  • sudo apt-get install lamp-server^
  • sudo apt-get install php5-imagick php5-gd php5-imap php5-mcrypt subversion vim bzip2  optipng jpegoptim jhead

Configure PHP

Recommended PHP settings

  • sudo vi /etc/php5/cli/php.ini
    • html_errors = On
      short_open_tag = Off
      memory_limit = 128M
      default_charset = "UTF-8"
      
  • sudo vi /etc/php5/apache2/php.ini
    • short_open_tag = Off
      default_charset = "UTF-8"
      post_max_size = 16M
      upload_max_filesize = 16M
      session.cookie_lifetime = 1000000
      session.gc_maxlifetime = 1000000
      

Ubuntu 14.04 php config bugs

  • sudo ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini
  • sudo ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/cli/conf.d/20-mcrypt.ini
  • sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/apache2/conf.d/20-imap.ini
  • sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/cli/conf.d/20-imap.ini

Configure Apache

  • Ubuntu 12.04:
    • sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
    • sudo vi /etc/apache2/sites-available/default
      • Replace the content with
        NameVirtualHost *
  • Ubuntu 14.04:
    • sudo a2dissite 000-default
  • sudo vi /etc/apache2/apache2.conf
    • ServerName localhost
  • sudo a2enmod rewrite
  • sudo a2enmod headers
  • sudo a2enmod expires
  • sudo service apache2 start