2015/08/18

Omeka Installation for Ubuntu

My take is Omeka 2.3 and 1.4.2 on Ubuntu 14.04. Basically the best documentation I can get is http://omeka.org/codex/Install_on_Ubuntu_using_Terminal and a reference at http://omeka.org/codex/Install_on_Ubuntu. Here are some tweaks:

First follow up the steps on package installation. Ubuntu 14.04 uses Apache 2.4.7, www-data as group name, and its document root is /var/www/html. I find it is easier utilizing this settings to make it working.

$ cd /var/www
$ sudo wget http://omeka.org/files/omeka-2.3.1.zip
$ sudo unzip omeka-2.3.1.zip
$ sudo mv omeka-2.3 omeka
# $ sudo mv omeka-2.3/* /var/www/html
# $ sudo mv omeka-2.3/.htaccess /var/www/html
$ sudo usermod -a -G www-data your_ubuntu_username
$ cd /var/www
$ sudo chown -R root.www-data html
$ sudo chmod 775 html

On permissions, only files directory needs 755 and 644.

Then, config MySQL server:

$ mysql --user=root -p mysql
mysql> CREATE USER ‘your_name’@’localhost’ IDENTIFIED BY ‘mysecret’;
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘your_name’@’localhost’ WITH GRANT OPTION;
# use some_db.* for specific database
mysql> SHOW GRANTS FOR ‘your_name’@’localhost’;
mysql> CREATE DATABASE omeka;

Edit db.ini to fit your configuration.

Edit Apache2 configuration file:

$ sudo vi /etc/apache2/apache2.conf
# line 166:
< AllowOverride None
---
> AllowOverride All

$ cd /etc/apache2/sites-available
$ sudo cp -a 000-default.conf your.site.com
$ sudo vi your.site.com
12c12
<       DocumentRoot /var/www/html
---
>       DocumentRoot /var/www/omeka
20,21c20,21
<       ErrorLog ${APACHE_LOG_DIR}/error.log
<       CustomLog ${APACHE_LOG_DIR}/access.log combined
---
>       ErrorLog ${APACHE_LOG_DIR}/omeka-error.log
>       CustomLog ${APACHE_LOG_DIR}/omeka-access.log combined

$ cd /etc/apache2/sites-enable
$ sudo ln -s ../sites-available/u2.rchss.sinica.edu.tw .
$ sudo rm -f 000-default.conf

Finally, you might want to update .htaccess file to enable index.php by default.

# Line 28 of /var/www/omeka/.htaccess
DirectoryIndex index.php

Visit http://localhost/install or http://localhost/install/install.php to configure.

For Omeka 1.x you might run into issues like 1) Access Forbidden on Theme Directory 2) Missing MySQLi Extension (not working for Omeka 2.x)

1) edit /etc/apache2/sites-available/000-default.conf to add this:

  <Location>
    DirectoryIndex index.php
    Order deny,allow
    Allow from all
  </Location>
</VirtualHost>

2) edit /etc/php5/apache2/php.ini

extension=mysqli.so

Common follow-up tasks: edit locale at application/config/config.ini

沒有留言: