Differenze tra le versioni di "Gruppo Meteo/HowTo/server-centos"

Da raspibo.
Jump to navigation Jump to search
(Creata pagina con ' yum install postgresql-server postgresql-contrib yum install python-psycopg2 /var/lib/pgsql/data/pg_hba.conf # TYPE DATABASE USER ADDRESS ...')
 
Riga 1: Riga 1:
 +
= Installazione RMAP server su centos 7 =
  
 +
== istallazione sistema operativo ==
 +
TBD
  
 +
 +
== postgresql ==
 
yum install postgresql-server postgresql-contrib
 
yum install postgresql-server postgresql-contrib
 
yum install python-psycopg2
 
yum install python-psycopg2
Riga 50: Riga 55:
  
 
  rmapctrl --syncdb
 
  rmapctrl --syncdb
 +
 +
 +
== apache ==
 +
 +
/etc/httpd/conf.modules.d/00-mpm.conf
 +
LoadModule mpm_worker_module modules/mod_mpm_worker.so
 +
 +
<IfModule mpm_worker_module>
 +
#StartServers          2
 +
#MaxClients          150
 +
#MinSpareThreads      25
 +
#MaxSpareThreads      75
 +
#ThreadsPerChild      25
 +
#MaxRequestsPerChild  0
 +
ServerLimit        16
 +
StartServers        2
 +
MaxRequestWorkers  150
 +
MinSpareThreads    10
 +
MaxSpareThreads    35
 +
ThreadsPerChild    15
 +
MaxRequestWorkers      240
 +
MaxConnectionsPerChild 10000
 +
</IfModule>
 +
 +
 +
/etc/httpd/conf.d/rmap.conf
 +
 +
ServerName rmap.it
 +
 +
WSGISocketPrefix /run/wsgirmap/rmap
 +
WSGIDaemonProcess www.rmap.cc user=rmap group=rmap maximum-requests=100 graceful-timeout=200 processes=10 threads=5 request-timeout=180 socket-timeout=180 header-buffer-  size=65000
 +
WSGIProcessGroup www.rmap.cc
 +
WSGIApplicationGroup %{GLOBAL}
 +
 +
 +
<VirtualHost *:80 >
 +
 +
    ServerName rmap.it
 +
    ServerAlias rmap.cc rmapv.rmap.cc rmapv.rmap.it www.rmap.cc www.rmapv.rmap.cc www.rmap.it www.rmapv.rmap.it localhost localhost.localdomain 127.0.0.1 partecipa.rainbolife.eu
 +
 +
    Include conf.d/rmap.inc
 +
 +
</VirtualHost>

Versione delle 19:18, 27 feb 2018

Installazione RMAP server su centos 7

istallazione sistema operativo

TBD


postgresql

yum install postgresql-server postgresql-contrib yum install python-psycopg2

/var/lib/pgsql/data/pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD                                                                

# "local" is for Unix domain socket connections only                                                                                  
# allow postgres user to use "ident" authentication on Unix sockets                                                                   
local   all             postgres                                ident
# allow all other users to use "md5" authentication on Unix sockets                                                                   
local   all             all                                     md5
# IPv4 local connections:                                                                                                             
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:                                                                                                             
host    all             all             ::1/128                 md5


/var/lib/pgsql/data/postgresql.conf

max_connections = 100
shared_buffers = 128MB
work_mem = 100MB
maintenance_work_mem = 200MB
effective_cache_size = 1GB


su - postgres
initdb
exit
systemctl enable postgresql.service
systemctl start postgresql.service
su - postgres
createuser -P -e rmapadmin
createdb --owner=rmapadmin rmapadmin
exit

/etc/rmap/rmap-site.cfg

[database]
DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.                     
DATABASE_NAME = 'rmapadmin'             # Or path to database file if using sqlite3.                                                  
DATABASE_USER = 'rmapadmin'             # Not used with sqlite3.                                                                      
DATABASE_PASSWORD = 'rmapadmin'         # Not used with sqlite3.                                                                      
DATABASE_HOST = 'localhost'             # Set to empty string for localhost. Not used with sqlite3.                                   
DATABASE_PORT = '5432'                  # Set to empty string for default. Not used with sqlite3.                                     
rmapctrl --syncdb


apache

/etc/httpd/conf.modules.d/00-mpm.conf

LoadModule mpm_worker_module modules/mod_mpm_worker.so

<IfModule mpm_worker_module>
#StartServers          2
#MaxClients          150
#MinSpareThreads      25
#MaxSpareThreads      75
#ThreadsPerChild      25
#MaxRequestsPerChild   0
ServerLimit         16
StartServers         2
MaxRequestWorkers  150
MinSpareThreads     10
MaxSpareThreads     35
ThreadsPerChild     15
MaxRequestWorkers      240
MaxConnectionsPerChild 10000
</IfModule>


/etc/httpd/conf.d/rmap.conf

ServerName rmap.it

WSGISocketPrefix /run/wsgirmap/rmap
WSGIDaemonProcess www.rmap.cc user=rmap group=rmap maximum-requests=100 graceful-timeout=200 processes=10 threads=5 request-timeout=180 socket-timeout=180 header-buffer-  size=65000
WSGIProcessGroup www.rmap.cc
WSGIApplicationGroup %{GLOBAL}


<VirtualHost *:80 >
   ServerName rmap.it
   ServerAlias rmap.cc rmapv.rmap.cc rmapv.rmap.it www.rmap.cc www.rmapv.rmap.cc www.rmap.it www.rmapv.rmap.it localhost localhost.localdomain 127.0.0.1 partecipa.rainbolife.eu

   Include conf.d/rmap.inc
</VirtualHost>