Ich bin der auf Seite [Seite einfügen] beschriebenen Vorgehensweise gefolgt. https://www.wapt.fr/fr/doc/waptserver_u ... entos.html Ich bin jedoch während des Vorgangs auf einige Fehler gestoßen.
Falls dies für andere hilfreich sein sollte, hier die Änderungen, die ich vornehmen musste, um die Migration erfolgreich abzuschließen:
So deinstallieren Sie wapt 1.3:
Code: Alle auswählen
yum remove tis-waptrepo tis-waptsetup tis-waptserver
systemctl stop apache2
systemctl disable apache2
Code: Alle auswählen
yum remove tis-waptrepo tis-waptsetup tis-waptserver
systemctl stop httpd
systemctl disable httpd
Im Abschnitt Aktualisieren Sie den CentOS-/Red Hat-Server :
Code: Alle auswählen
yum install postgresql94-server postgresql94-contrib
Code: Alle auswählen
yum install postgresql94-server postgresql94-contrib mongodb
Ich habe außerdem den folgenden Befehl ausgeführt, damit das Migrationsskript das Vorhandensein der Sperrdatei überprüfen konnte:
Code: Alle auswählen
chmod 755 /var/lib/mongodb
Code: Alle auswählen
--- /opt/wapt/waptserver/waptserver_upgrade.py.orig 2018-03-29 15:00:58.908069144 +0200
+++ /opt/wapt/waptserver/waptserver_upgrade.py 2018-03-29 15:12:00.480088326 +0200
@@ -67,7 +67,10 @@
"""Connect to a mongo instance and write all wapt.hosts collection as json into a file"""
if platform.system()=='Linux':
mongo_datadir = '/var/lib/mongodb/'
- if 'dbpath' in subprocess.check_output('mongoexport --help',shell=True):
+ distrib_tuple = platform.linux_distribution()
+ current_distrib = distrib_tuple[0].lower()
+ print ('detected distrib : %s ' % current_distrib)
+ if ('dbpath' in subprocess.check_output('mongoexport --help',shell=True)) and (current_distrib != "centos linux"):
data = subprocess.check_output('mongoexport -d wapt -c hosts --jsonArray --dbpath=%s' % mongo_datadir,shell=True)
else:
data = subprocess.check_output('mongoexport -c hosts --jsonArray --db wapt',shell=True)
Code: Alle auswählen
--- /opt/wapt/waptserver/scripts/postconf.py.orig 2018-03-29 15:51:46.261262372 +0200
+++ /opt/wapt/waptserver/scripts/postconf.py 2018-03-29 15:52:12.043380391 +0200
@@ -234,8 +234,12 @@
def upgrade2postgres(configfilename):
print ("mongodb process running, need to migrate")
run_verbose('sudo -u wapt PYTHONPATH=/opt/wapt PYTHONHOME=/opt/wapt /opt/wapt/bin/python /opt/wapt/waptserver/waptserver_upgrade.py upgrade2postgres -c "%s"' % configfilename)
- run_verbose("systemctl stop mongodb")
- run_verbose("systemctl disable mongodb")
+ if type_redhat():
+ run_verbose("systemctl stop mongod")
+ run_verbose("systemctl disable mongod")
+ else:
+ run_verbose("systemctl stop mongodb")
+ run_verbose("systemctl disable mongodb")
def nginx_set_worker_limit(nginx_conf):
already_set=False
Code: Alle auswählen
PYTHONPATH=/opt/wapt PYTHONHOME=/opt/wapt python /opt/wapt/wapt-signpackages.py -i -s --message-digest=sha256,sha1 -c /root/wapt-private-20180312-1522.crt /var/www/html/wapt/*.wapt
PYTHONPATH=/opt/wapt PYTHONHOME=/opt/wapt python /opt/wapt/wapt-signpackages.py -i -s --message-digest=sha256,sha1 -c /root/wapt-private-20180312-1522.crt /var/www/html/wapt-host/*.wapt
