Tags:
create new tag
,
view all tags
-- Main.AlessandroPaolini - 2011-02-03 ---+++ <strong>Operazioni da eseguire sul MASTER SERVER</strong><strong><br /></strong> <strong>sul master server creare l'utente per mezzo del quale lo slave contatter� il DB, ad esempio:<br /><br /></strong># mysql -p -e "grant super, reload , replication slave, replication client on (asterisco)<strong>.</strong>(asterisco) to replica@'grid-se.pr.infn.it' identified by 'replicapass'" ;<br /><br />e per ogni database (VO) che si vuole replicare, assegnargli questi permessi:<br /><br /># mysql -p -e "grant select, lock tables on voms_myvo.* to replica@'grid-se.pr.infn.it'"<br /><br />e poi aggiungere queste righe nel file di mysql (� importante che sul master sia attivo il binary log)<br /><br /># cat > /etc/my.cnf <<EOF <br /># [mysqld]<br />#log-bin=mysql-bin<br />#server-id=1<br />#innodb_flush_log_at_trx_commit=1<br />#sync_binlog=1<br />#EOF<br /><br />fare ripartire mysql ---+++ Operazioni da eseguire sullo SLAVE SERVER sullo slave lanciare questi script:<br /><br />-- [[%ATTACHURL%/first_replica.sh][first_replica.sh]] per il primo database che si intende replicare o nel caso sia l'unico<br />-- [[%ATTACHURL%/next_replicas.sh][next_replicas.sh]] per i databases successivi (uno per ogni lancio) che si intende replicare sullo stesso slave server<br /><br />per entrambi gli script, impostare le seguenti variabili:<br /><br />-- master_host, master_mysql_user, master_mysql_pwd che si riferiscono al master server ed all'utente creato in precedenza<br />-- mysql_username_admin e mysql_password_admin che si riferiscono allo slave ESEMPIO DI IMPOSTAZIONI DELLE VARIABILI:<br /><em>voms_database="" # VOMS database<br />master_host="<strong>voms.cnaf.infn.it</strong>" # Master<br />master_mysql_user="<strong>gianpeppo</strong>" # Master MySQL admin user (l'utente replica creato sul master)<br />master_mysql_pwd="<strong>pass di gianpeppo</strong>" # Master MySQL admin pass (la password dell'utente replica sul master)<br />master_log_file="" # Master LOG file<br />master_log_pos="" # Master LOG file<br />mysql_username_admin="<strong>root</strong>" # MySQL admin username (si riferisce allo slave)<br />mysql_password_admin="<strong>secret</strong>" # MySQL admin pass (la password di root dello slave)</em> con il lancio di first_replica.sh verr� scritto il file /etc/my.cnf<br />nel caso si debbano replicare altri databases, prima di ogni lancio di next_replicas.sh, modificare a mano /etc/my.cnf aggiungendo le righe relative al db che s'intende replicare<br /><br />se vengono impostate le variabili suddette, la sintassi di lancio degli script � la seguente:<br /><br />./next_replicas.sh --master-db=voms_myvo --db=voms_myvo<br /><br />**NOTA: se la VO si chiama pippo, il DB si chiama voms_pippo; se la VO si chiama pippo.pip, il DB si chiama voms_pippo_pip; se la VO si chiama pippo.pip.pi, il DB si chiama voms_pippo_pip_ (almeno in base alla nostra esperienza finora)<br /><br />**NOTA: sullo slave server � bene disabilitare la registrazione degli utenti, per cui nel file di configurazione /opt/glite/etc/config/glite-voms-server.cfg.xml impostare in true il valore di voms.admin.webRegistration.disable<br /><br />**NOTA: � meglio non lanciare pi� questo script:<br /><br /># /opt/glite/etc/config/scripts/glite-voms-server-config.py --configure (o --start)<br /><br />perch� sovrascrive il my.cnf<br /><br />al termine della procedura di replica, affinch� le modifiche nel database divengano completamente effettive bisogna far ripartire voms e voms-admin:<br /><br />lista dei comandi utili da far ripartire (non sempre sono necessari tutti)<br /><br /># /opt/glite/etc/init.d/voms-admin stop<br /># /opt/glite/etc/init.d/voms stop<br /># service mysql restart<br /># service tomcat5 restart<br /># /opt/glite/etc/init.d/voms start<br /># /opt/glite/etc/init.d/voms-admin start<br /><br />==========================================================================================*
Attachments
Attachments
Topic attachments
I
Attachment
Action
Size
Date
Who
Comment
sh
first_replica.sh
manage
6.1 K
2011-05-24 - 15:16
AlessandroPaolini
sh
next_replicas.sh
manage
6.3 K
2011-05-24 - 15:16
AlessandroPaolini
E
dit
|
A
ttach
|
PDF
|
H
istory
: r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
Topic revision: r5 - 2011-05-24
-
AlessandroPaolini
Home
Site map
CEMon web
CREAM web
Cloud web
Cyclops web
DGAS web
EgeeJra1It web
Gows web
GridOversight web
IGIPortal web
IGIRelease web
MPI web
Main web
MarcheCloud web
MarcheCloudPilotaCNAF web
Middleware web
Operations web
Sandbox web
Security web
SiteAdminCorner web
TWiki web
Training web
UserSupport web
VOMS web
WMS web
WMSMonitor web
WeNMR web
Sandbox Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback