Skip to content
Snippets Groups Projects
INSTALL.en.md 3.55 KiB
Newer Older
This procedure is meant for Ubuntu et Debian GNU/Linux 
# Necessary packages :
##  Ubuntu Trusty
apt-get install python-software-properties php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysqlnd php5-xhprof graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
## Debian Wheezy
apt-get install php5 php5-gd php5-imagick php5-xdebug php-pear php5-mysqlnd graphviz apache2 mysql-server libapache2-mod-php5 git php5-mcrypt php5-curl yaz
yaourt -S php php-gd php-imagick xdebug php-pear apache mariadb php-apache php-xhprof graphviz git
```

## CentOS
```
rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
llaffont's avatar
llaffont committed
yum install php54w php54w-gd php54w-pear php54w-mysql php54w-pecl-xdebug php54w-xml php54w-soap php54w-mbstring
llaffont's avatar
llaffont committed
You need to build Imagick extension from scratch

# Install PHPUnit (Account root / sudo):

```
  cd /usr/local/bin
  wget https://phar.phpunit.de/phpunit.phar
  mv phpunit.phar phpunit
# Downloading source code
git clone http://git.afi-sa.fr/afi/opacce.git opacce
Launch update.sh script
Laurent's avatar
Laurent committed

Laurent's avatar
Laurent committed
cd opacce
./update.sh
Laurent's avatar
Laurent committed


#  Apache / PHP Configuration:
## Activate the following modules :
llaffont's avatar
llaffont committed
a2enmod headers rewrite php5
Modify /etc/httpd/conf/http.conf and add the line: 
Laurent's avatar
Laurent committed

```
LoadModule php5_module modules/libphp5.so
```

Activate mod_mpm_prefork (see https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP).


Deactivate negotiation module which is in conflict with Zend Framework on index/index urls:
## Configure PHP
In /etc/php5/apache2/php.ini (ArchLinux: /etc/php/php.ini), configure the following variables:
```
post_max_size = 10M
upload_max_filesize = 10M
error_reporting  =  E_ALL & ~E_NOTICE & ~E_DEPRECATED
```

Activate the following extensions if they are not already actived (they should be): 
```
php5enmod calendar curl gd gettext iconv mcrypt mysql pdo_mysql openssl soap imagick
```
On Archinux uncomment the corresponding lines.

## Configure Apache
In Apache conf, delete indexes option (file list) and authorise .htaccess: 
Laurent's avatar
Laurent committed

llaffont's avatar
llaffont committed
<Directory /var/www/>
  Options FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
Warning: For apache 2.4
llaffont's avatar
llaffont committed
<Directory /var/www/>
  Options FollowSymLinks
  AllowOverride All
  Require all granted
</Directory>
# User rights on temp folder
llaffont's avatar
llaffont committed
chmod -R 777 opacce/temp
# MySQL config

## Finalise the installation (ArchLinux)

See https://wiki.archlinux.org/index.php/MySQL#Installation


# Configuration

Edit /etc/mysql/my.cnf and add to the [mysqld] section the following line (in order to force fulltext indexation from the first letter) 
Laurent's avatar
Laurent committed

llaffont's avatar
llaffont committed
ft_min_word_len = 1
Restart mysql.
Warning: If you have encoding problems, in Cosmogramme, you can force UTF8 like this:
llaffont's avatar
llaffont committed
skip-character-set-client-handshake
character-set-server=utf8
Connect to mysql and import the database schema

```
mysql -uroot -ppass
mysql> create database opac;
mysql> connect opac;
mysql> source opacce/scripts/opac2.sql;
```

#  OPAC Config
In the opacce directory, copy and configure
llaffont's avatar
llaffont committed
cp config.ini.default config.ini
touch local.php
#  Cosmogramme Config
 In the cosmogramme folder, copy and configure

```
cp config.ref.php config.php 
```
  go to http://localhost/opacce/cosmogramme
 connnect with the account admin/achanger and click on the patch update link
# Connect to the opac
  Use the account compte admin/achanger
go to http://localhost/opacce/admin
# To run the tests:
llaffont's avatar
llaffont committed
cd opacce/tests/
phpunit