Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)

Catégorie:AD971

De AJLSM
Aller à la navigation Aller à la recherche

Archives Départements de la Guadeloupe

Détails

  • Site Web: ad971.ajlsm.com
  • Version de base : 3.6 + IDX COLLABORATIVE
  • Description: AD971

Contacts



Transfert de données Rsync

Il y a un rsync lancé depuis le NAS de la guadeloupe vers le serveur de production, chez OXYD.

En cas de maintenance, il faut demander un accès teamviewer. Actuellement: Id: 408 851 873 et Mdp: 6704.

Sur la machine:

Login: DAD\ajlsm, 
mdp: cd971

Il y 2 tâches planifiées:

  1. 22h50: D:\sauve\OXYD\mount-arch-disk.bat, qui monte le NAS sur le disque J:\\
  2. 23h00: D:\sauve\OXYD\rsync-data-oxyd.bat, qui lance la synchro en tant que telle.

Ce tutorial a été suivi.

Script de montage du NAS:

net use j: /delete
net use j: \\192.168.14.205\dad archives /user:interne\archives /p:yes

Script de copie:

"c:\Program files\grsync\bin\rsync" -r -t --progress --delete --size-only ^
  --modify-window=1 -z --log-file=log\rsync-data-to-oxyd.log ^
  --stats -h -e "ssh -i C:\backup\ssh_key -c 3des-cbc" ^
  /cygdrive/j/ root@87.252.2.109:/var/data/ad971/

Installation

 apt-get install openjdk-7-jre-headless openjdk-7-jre-lib 
 apt-get purge openjdk-6-jre-headless:amd64 openjdk-6-jre-lib
 apt-get install tomcat7 libtcnative-1 imagemagick iipimage-server php5 php-console-table php-http php-pear php5-curl php5-gd php5-imap php5-ldap php5-mcrypt php5-mysql php-mail-mimedecode mysql-server
 a2enmod proxy proxy_http proxy_ajp rewrite

Supplément Data:

 mkdir -p /var/data/pleade/recette/{ead,cdc,datadir,pdf,files,images,images-preparees}
 chown -R tomcat7:tomcat7 /var/data/pleade/recette/{datadir,images-preparees}

Supplément Drupal

wget http://zend.to/files/zendto-repo.deb
sudo dpkg -i zendto-repo.deb
sudo apt-get update
sudo apt-get install zendto

Configurations Logicielles

/etc/mysql/my.cnf:

key_buffer_size         = 8M
character_set_server	= utf8
collation_server	= utf8_general_ci
max_connections 	= 50
max_allowed_packet 	= 2G
query_cache_limit	= 2M
query_cache_size        = 128M
table_cache		= 256
innodb_file_per_table
innodb_flush_method	= O_DIRECT
innodb_log_file_size	= 128M
innodb_buffer_pool_size = 512M
wait_timeout		= 1200
max_connect_errors	= 9999	# More than this number of interrupted connections from a host this host will be blocked from further connections

Ne pas oublier ensuite:

rm -f var/lib/mysql/{ibdata1,ib_logfile0,ib_logfile1}

Le fichier de conf d'accès:

[client]
user=root
host=localhost
password=XXXX

Et la création des BDD:

create user sdxapp@localhost identified by 'sdxapp-pwd';
create database pleade default character set utf8 default collate utf8_general_ci; grant all privileges on pleade.* to sdxapp@localhost;
create database pleade_maps default character set utf8 default collate utf8_general_ci; grant all privileges on pleade_maps.* to sdxapp@localhost;
create database drupal_ad971 character set utf8 default collate utf8_general_ci; grant all privileges on drupal_ad971.* to sdxapp@localhost;


/etc/apache2/sites-available/default

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	ServerName localhost

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	# Create a directory for the iipsrv binary
	ScriptAlias /cgi-bin/ "/usr/lib/iipimage-server/"

	# Set the options on that directory
	<Directory "/cgi-bin/">
	   AllowOverride None
	   Options None
	   Order allow,deny
	   Allow from all

	   # Set the module handler
	   AddHandler fcgid-script .fcgi
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

/etc/apache2/sites-available/ad971-recette/conf:

<VirtualHost *:80>
        ServerName ad971-recette.ajlsm.com
        LimitRequestFieldSize 81920
        ProxyIOBufferSize 81920

        AddDefaultCharset utf-8
        ErrorLog /var/log/apache2/ad971.errors.log
        CustomLog /var/log/apache2/ad971.access.log combined

        #SSLEngine on
        #SSLCertificateFile      /etc/apache2/ssl/wildcard-poulidor-new-22174.obspm.fr.pem
        #SSLCertificateKeyFile   /etc/apache2/ssl/wildcard-poulidor-new-22174.obspm.fr.key
        #SSLCertificateChainFile /etc/apache2/ssl/cru-tcs-chain.pem

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        RewriteEngine On
        RewriteOptions inherit
        # Pour apache 2.4: LogLevel warn rewrite:trace1
        RewriteLog "/var/log/apache2/rewrite.log"
        RewriteLogLevel 0

        # blocage de l'accès direct aux images
        RewriteCond %{REQUEST_URI} ^/(.*)/img-server/.*/.*\.(jpg|JPG|gif|GIF|png|PNG|jpeg|JPEG|tif|TIF|tiff|TIFF)
        RewriteCond %{REQUEST_URI} !^/(.*)/img-server/.*/.*\.(pdf|PDF)
        RewriteCond %{REQUEST_URI} !^/(.*)/img-server/__preparees__/(vignette|miniature)/.*
        RewriteCond %{HTTP_REFERER} !^http://localhost
        RewriteCond %{HTTP_REFERER} !^http://ad971-recette.ajlsm.com
        RewriteRule .* /403.html [R,L]

        ## Redirection pour l'indexation par les bots de Google & Co ##
        # Pour la fenêtre EAD
        RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit.*) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(.*bot.*) [NC]
        RewriteCond %{QUERY_STRING} ^id=(.*)&c=(.*)&ishtml=true
        RewriteRule ^/ead-fragment.xsp /ead.html?id=%1&c=%2 [R,L]
        # Les requêtes docsearch-terms depuis la fenêtre EAD
        RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit.*) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(.*bot.*) [NC]
        RewriteCond %{QUERY_STRING} ^r=(.*)&f=(.*)&v=(.*)&ishtml=true
        RewriteRule ^/docsearch-term.xsp /results.html?base=ead&search_type=simple&champ1=root-id&op1=AND&query1=%1&champ2=%2&op2=AND&query2=%3 [R,L]
        # Pour la visionneuse
        RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit.*) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(.*bot.*) [NC]
        RewriteCond %{QUERY_STRING} ^(.*)ishtml=true(.*)$
        RewriteRule ^/img-viewer/(.*)/viewer\.html /img-viewer/$1/viewer.html?%1%2 [R,L]

        ProxyPass /cgi-bin/iipsrv.fcgi http://localhost/cgi-bin/iipsrv.fcgi
        ProxyPassReverse /cgi-bin/iipsrv.fcgi http://localhost/cgi-bin/iipsrv.fcgi

        ProxyPass /pleade/ ajp://localhost:8009/recette/ connectiontimeout=5 timeout=300 retry=0
        ProxyPassReverse /pleade/ ajp://localhost:8009/recette/

        ### Drupal ###
        DocumentRoot  /root/recette/drupal
        <Directory "/root/recette/drupal">
                # Pour Apache 2.4: Require all granted
                AllowOverride All
        </Directory>

</VirtualHost>

Puis appliquer la conf sur Tomcat7

Cette catégorie ne contient actuellement aucune page ni aucun média.