strutture:lnf:dr:calcolo:sistemi:web_siti_nazionali
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
strutture:lnf:dr:calcolo:sistemi:web_siti_nazionali [2016/11/07 17:58] – rorru@infn.it | strutture:lnf:dr:calcolo:sistemi:web_siti_nazionali [2016/11/09 11:49] (current) – [Installazione pacchetti prerequisiti] rorru@infn.it | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Preparazione installazione Scientific Linux 7 per Joomla 3.6.x ====== | ||
+ | L' | ||
+ | ===== Installazione pacchetti prerequisiti ===== | ||
+ | Installare i seguenti pacchetti da repo: | ||
+ | |||
+ | $ yum install php-mysql php-gd php-pear php-cli php-pdo php-xml php-mbstring php-process wget vim curl httpd php-devel httpd-devel pcre-devel gcc php perl-ExtUtils-CBuilder perl-local-lib perl-version perl-Compress-Raw-Zlib perl-DBI perl-Params-Check perl-Archive-Extract perl-Module-Pluggable perl-FCGI perl-Pod-Perldoc perl-Pod-Usage perl-CPANPLUS-Dist-Build perl-Time-Local perl-Text-Unidecode perl-PathTools perl-autodie perl-File-Temp perl-Test-Simple perl-Filter perl-B-Lint perl-IO-HTML perl-HTTP-Date perl-LWP-MediaTypes perl-Net-LibIDN perl-HTTP-Daemon perl-HTTP-Cookies perl-macros perl-Data-Dumper perl-Time-Piece perl-Object-Accessor perl-Digest-SHA perl-ExtUtils-Manifest perl-parent perl-podlators perl-Text-ParseWords perl-Storable perl-constant perl-Socket perl-Time-HiRes perl-Scalar-List-Utils perl-Pod-Simple perl-File-Path perl-threads perl-ExtUtils-Install perl-ExtUtils-Embed perl-ExtUtils-ParseXS perl-core perl-ExtUtils-MakeMaker perl-Module-Load perl-Module-Metadata perl-CPAN-Meta-YAML perl-Net-Daemon perl-Compress-Raw-Bzip2 perl-PlRPC perl-DBD-SQLite perl-Log-Message perl-DBIx-Simple perl-Term-UI perl-File-Fetch perl-Parse-CPAN-Meta perl-CPANPLUS perl-Archive-Tar perl-CGI perl-Perl-OSType perl-CPAN-Meta-Requirements perl-Module-Build perl-Pod-LaTeX perl-Text-Soundex perl-DB_File perl-Sys-Syslog perl-Locale-Codes perl-Env perl-Version-Requirements perl-DBD-MySQL perl-HTML-Tagset perl-TimeDate perl-Business-ISBN-Data perl-URI perl-HTTP-Message perl-File-Listing perl-HTTP-Negotiate perl-Net-SSLeay perl-IO-Socket-IP perl-Net-HTTP perl-libwww-perl perl-libxml-perl perl-libs perl-Locale-Maketext-Simple perl-Module-Load-Conditional perl-Pod-Escapes perl-Module-Loaded perl-Package-Constants perl-IO-Zlib perl-devel perl-Digest perl-IO-Compress perl-Locale-Maketext perl-IPC-Cmd perl-Log-Message-Simple perl-JSON-PP perl-HTTP-Tiny perl-Pod-Parser perl-Encode perl-CPAN-Meta perl-Exporter perl-Pod-Checker perl-Carp perl-File-CheckTree perl-Digest-MD5 perl-threads-shared perl-Getopt-Long perl-Crypt-SSLeay perl-Encode-Locale perl-Business-ISBN perl-HTML-Parser perl-WWW-RobotRules perl-IO-Socket-SSL perl-XML-Parser perl perl-Module-CoreList perl-Thread-Queue perl-CPAN perl-Test-Harness gdbm-devel pyparsing systemtap-sdt-devel | ||
+ | |||
+ | |||
+ | ===== Installazione e configurazione '' | ||
+ | Installare '' | ||
+ | |||
+ | $ pecl install apc | ||
+ | |||
+ | Editare il file di configurazione ''/ | ||
+ | |||
+ | < | ||
+ | ; Enable apc extension module | ||
+ | extension = apc.so | ||
+ | |||
+ | ; Options for the APC module version >= 3.1.3 | ||
+ | ; See http:// | ||
+ | |||
+ | ; This can be set to 0 to disable APC. | ||
+ | apc.enabled=1 | ||
+ | ; The number of shared memory segments to allocate for the compiler cache. | ||
+ | apc.shm_segments=1 | ||
+ | ; The size of each shared memory segment, with M/G suffix | ||
+ | apc.shm_size=64M | ||
+ | ; A " | ||
+ | ; requested on your web server. Set to zero or omit if you are not sure; | ||
+ | apc.num_files_hint=1536 | ||
+ | ; Just like num_files_hint, | ||
+ | ; variables to store. | ||
+ | apc.user_entries_hint=4096 | ||
+ | ; The number of seconds a cache entry is allowed to idle in a slot in case this | ||
+ | ; cache entry slot is needed by another entry. | ||
+ | apc.ttl=7200 | ||
+ | ; use the SAPI request start time for TTL | ||
+ | apc.use_request_time=1 | ||
+ | ; The number of seconds a user cache entry is allowed to idle in a slot in case | ||
+ | ; this cache entry slot is needed by another entry. | ||
+ | apc.user_ttl=7200 | ||
+ | ; The number of seconds that a cache entry may remain on the garbage-collection list. | ||
+ | apc.gc_ttl=3600 | ||
+ | ; On by default, but can be set to off and used in conjunction with positive | ||
+ | ; apc.filters so that files are only cached if matched by a positive filter. | ||
+ | apc.cache_by_default=1 | ||
+ | ; A comma-separated list of POSIX extended regular expressions. | ||
+ | apc.filters | ||
+ | ; The mktemp-style file_mask to pass to the mmap module | ||
+ | apc.mmap_file_mask=/ | ||
+ | ; This file_update_protection setting puts a delay on caching brand new files. | ||
+ | apc.file_update_protection=2 | ||
+ | ; Setting this enables APC for the CLI version of PHP (Mostly for testing and debugging). | ||
+ | apc.enable_cli=0 | ||
+ | ; Prevents large files from being cached | ||
+ | apc.max_file_size=1M | ||
+ | ; Whether to stat the main script file and the fullpath includes. | ||
+ | apc.stat=1 | ||
+ | ; Vertification with ctime will avoid problems caused by programs such as svn or rsync by making | ||
+ | ; sure inodes have not changed since the last stat. APC will normally only check mtime. | ||
+ | apc.stat_ctime=0 | ||
+ | ; Whether to canonicalize paths in stat=0 mode or fall back to stat behaviour | ||
+ | apc.canonicalize=0 | ||
+ | ; With write_lock enabled, only one process at a time will try to compile an | ||
+ | ; uncached script while the other processes will run uncached | ||
+ | apc.write_lock=1 | ||
+ | ; Logs any scripts that were automatically excluded from being cached due to early/late binding issues. | ||
+ | apc.report_autofilter=0 | ||
+ | ; RFC1867 File Upload Progress hook handler | ||
+ | apc.rfc1867=0 | ||
+ | apc.rfc1867_prefix =upload_ | ||
+ | apc.rfc1867_name=APC_UPLOAD_PROGRESS | ||
+ | apc.rfc1867_freq=0 | ||
+ | apc.rfc1867_ttl=3600 | ||
+ | ; Optimize include_once and require_once calls and avoid the expensive system calls used. | ||
+ | apc.include_once_override=0 | ||
+ | apc.lazy_classes=0 | ||
+ | apc.lazy_functions=0 | ||
+ | ; Enables APC handling of signals, such as SIGSEGV, that write core files when signaled. | ||
+ | ; APC will attempt to unmap the shared memory segment in order to exclude it from the core file | ||
+ | apc.coredump_unmap=0 | ||
+ | ; Records a md5 hash of files. | ||
+ | apc.file_md5=0 | ||
+ | ; not documented | ||
+ | apc.preload_path | ||
+ | </ | ||
+ | |||
+ | Riavviare Apache: | ||
+ | |||
+ | $ systemctl restart httpd.service | ||
+ | |||
+ | ===== Ottimizzazione ===== | ||
+ | Inserire il file al percorso ''/ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType application/ | ||
+ | AddType audio/midi .mid .midi | ||
+ | AddType audio/mpeg .mp3 .m4a | ||
+ | AddType audio/ogg .ogg | ||
+ | AddType audio/wav .wav | ||
+ | AddType audio/wma .wma | ||
+ | AddType audio/ | ||
+ | AddType image/bmp .bmp | ||
+ | AddType image/gif .gif | ||
+ | AddType image/jpeg .jpg .jpeg .jpe | ||
+ | AddType image/png .png | ||
+ | AddType image/ | ||
+ | AddType image/tiff .tif .tiff | ||
+ | AddType image/ | ||
+ | AddType text/css .css | ||
+ | AddType text/plain .txt | ||
+ | AddType text/html .html .htm | ||
+ | AddType text/ | ||
+ | AddType text/ | ||
+ | AddType text/xsd .xsd | ||
+ | AddType text/xsl .xsl | ||
+ | AddType text/xml .xml | ||
+ | AddType video/asf .asf .asx .wax .wmv .wmx | ||
+ | AddType video/avi .avi | ||
+ | AddType video/divx .divx | ||
+ | AddType video/ | ||
+ | AddType video/mp4 .mp4 .m4v | ||
+ | AddType video/mpeg .mpeg .mpg .mpe | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | SetOutputFilter DEFLATE | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | BrowserMatch ^Mozilla/4 gzip-only-text/ | ||
+ | BrowserMatch ^Mozilla/ | ||
+ | BrowserMatch \bMSIE !no-gzip !gzip-only-text/ | ||
+ | BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Header append Vary User-Agent env=!dont-vary | ||
+ | Header set Connection keep-alive | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | AddOutputFilterByType DEFLATE application/ | ||
+ | AddOutputFilterByType DEFLATE application/ | ||
+ | AddOutputFilterByType DEFLATE application/ | ||
+ | AddOutputFilterByType DEFLATE application/ | ||
+ | AddOutputFilterByType DEFLATE application/ | ||
+ | AddOutputFilterByType DEFLATE image/svg | ||
+ | AddOutputFilterByType DEFLATE image/ | ||
+ | AddOutputFilterByType DEFLATE image/ | ||
+ | AddOutputFilterByType DEFLATE text/css | ||
+ | AddOutputFilterByType DEFLATE text/html | ||
+ | AddOutputFilterByType DEFLATE text/plain | ||
+ | AddOutputFilterByType DEFLATE text/ | ||
+ | AddOutputFilterByType DEFLATE text/ | ||
+ | AddOutputFilterByType DEFLATE text/xml | ||
+ | AddOutputFilterByType DEFLATE text/xsd | ||
+ | AddOutputFilterByType DEFLATE text/xsl | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | mod_gzip_on Yes | ||
+ | mod_gzip_dechunk Yes | ||
+ | mod_gzip_item_include file .(html? | ||
+ | mod_gzip_item_include handler ^cgi-script$ | ||
+ | mod_gzip_item_include mime ^text/.* | ||
+ | mod_gzip_item_include mime ^application/ | ||
+ | mod_gzip_item_exclude mime ^image/.* | ||
+ | mod_gzip_item_exclude rspheader ^Content-Encoding: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ExpiresActive On | ||
+ | ExpiresDefault A604800 | ||
+ | |||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType application/ | ||
+ | ExpiresByType audio/basic A604800 | ||
+ | ExpiresByType audio/midi A604800 | ||
+ | ExpiresByType audio/mpeg A604800 | ||
+ | ExpiresByType audio/ogg A604800 | ||
+ | ExpiresByType audio/ | ||
+ | ExpiresByType audio/ | ||
+ | ExpiresByType audio/ | ||
+ | ExpiresByType audio/ | ||
+ | ExpiresByType audio/x-wav A604800 | ||
+ | ExpiresByType audio/wav A604800 | ||
+ | ExpiresByType audio/wma A604800 | ||
+ | ExpiresByType image/bmp A604800 | ||
+ | ExpiresByType image/gif A604800 | ||
+ | ExpiresByType image/ief A604800 | ||
+ | ExpiresByType image/jpeg A604800 | ||
+ | ExpiresByType image/jpg A604800 | ||
+ | ExpiresByType image/png A604800 | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/tiff A604800 | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType image/ | ||
+ | ExpiresByType text/css A604800 | ||
+ | ExpiresByType text/html A604800 | ||
+ | ExpiresByType text/ | ||
+ | ExpiresByType text/plain A604800 | ||
+ | ExpiresByType text/ | ||
+ | ExpiresByType text/ | ||
+ | ExpiresByType text/xml A604800 | ||
+ | ExpiresByType text/xsd A604800 | ||
+ | ExpiresByType text/xsl A604800 | ||
+ | ExpiresByType video/asf A604800 | ||
+ | ExpiresByType video/avi A604800 | ||
+ | ExpiresByType video/divx A604800 | ||
+ | ExpiresByType video/ | ||
+ | ExpiresByType video/mp4 A604800 | ||
+ | ExpiresByType video/mpeg A604800 | ||
+ | ExpiresByType video/ | ||
+ | ExpiresByType video/ | ||
+ | |||
+ | < | ||
+ | Header set Cache-Control " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ExpiresActive Off | ||
+ | Header set Cache-Control " | ||
+ | Header set Pragma " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Header set Access-Control-Allow-Origin " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | FileETag MTime Size | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Configurazione virtual host macchina amministrazione ===== | ||
+ | Per configurare un virtual host utilizzare le direttive negli appositi file di configurazione di Apache: | ||
+ | |||
+ | < | ||
+ | Alias /apc.php / | ||
+ | Alias /it/apc.php / | ||
+ | |||
+ | < | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ServerName www.< | ||
+ | ServerAdmin wwwlnf@lnf.infn.it | ||
+ | DocumentRoot < | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Richiesto da Apache v2.4 | ||
+ | # | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Richiesto da Apache v2.4 | ||
+ | # | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | # Set timezone to Europe/Rome UTC+01:00 | ||
+ | SetEnv TZ Europe/Rome | ||
+ | |||
+ | DirectoryIndex index.php index.html | ||
+ | |||
+ | php_admin_value sendmail_path "/ | ||
+ | |||
+ | php_admin_value open_basedir "< | ||
+ | |||
+ | php_admin_value sys_temp_dir "< | ||
+ | php_admin_value upload_tmp_dir "< | ||
+ | php_admin_value upload_max_filesize " | ||
+ | php_admin_value post_max_size " | ||
+ | |||
+ | php_admin_value session.save_path "< | ||
+ | |||
+ | php_admin_value disable_functions " | ||
+ | |||
+ | php_flag " | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Richiesto da Apache v2.4 | ||
+ | # | ||
+ | | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Richiesto da Apache v2.4 | ||
+ | # | ||
+ | | ||
+ | </ | ||
+ | |||
+ | LogFormat "%v %h %l %u %t \" | ||
+ | ErrorLog " | ||
+ | CustomLog " | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | ===== Configurazione virtual host macchina utente ===== | ||
+ | Per configurare un virtual host utilizzare le direttive negli appositi file di configurazione di Apache: | ||
+ | |||
+ | < | ||
+ | |||
+ | Alias /apc.php / | ||
+ | Alias /it/apc.php / | ||
+ | |||
+ | < | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ServerName admasimmetrie.lnf.infn.it | ||
+ | ServerAdmin wwwlnf@lnf.infn.it | ||
+ | DocumentRoot / | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Richiesto da Apache v2.4 | ||
+ | # | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | php_admin_value sendmail_path "/ | ||
+ | |||
+ | php_admin_value open_basedir "/ | ||
+ | |||
+ | php_admin_value sys_temp_dir "/ | ||
+ | php_admin_value upload_tmp_dir "/ | ||
+ | |||
+ | php_admin_value upload_max_filesize " | ||
+ | php_admin_value post_max_size " | ||
+ | |||
+ | php_admin_value session.save_path "/ | ||
+ | |||
+ | php_admin_value disable_functions " | ||
+ | |||
+ | php_admin_value max_input_vars " | ||
+ | | ||
+ | php_admin_value max_execution_time " | ||
+ | | ||
+ | php_flag " | ||
+ | |||
+ | DirectoryIndex index.php index.html | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Richiesto da Apache v2.4 | ||
+ | # | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | LogFormat "%v %h %l %u %t \" | ||
+ | |||
+ | ErrorLog " | ||
+ | CustomLog " | ||
+ | </ | ||
+ | |||
+ | </ |