[opencms-dev] Installing OpenCMS andmigratingdata/settingsfromanother (older) installation
Schliemann, Kai
K.Schliemann at comundus.com
Thu Oct 15 17:57:40 CEST 2009
Hi Jane,
...
Copy the opencms database from your old database directory to the new
servers database directory. (The safer way would be to do this via
mysqldump)
[SJS] In the root-directory I just typed "mysqldump --opt -p
--all-databases > datensicherung.sql". That's the right approach, right?
[KS] It would be good to just dump the OpenCms database. The syntax is
similar: mysqldump --opt db_name > backup-file.sql
[SJS] mysqldump --opt -p opencms > backup-file.sql done. Just out of
curiosity and that I know it next time: why is it better not to copy all
databases at once?
[KS2] That's because for copying the opencms database from one server to
the other, you just have to copy the opencms database. You don't need
the other ones. And if you copy all databases with one script to another
server you might accidently overwrite an existing database.
1. Change the db connection in the opencms.properties file. It is
located in the WEB-INF/config directory of your opencms webapp.
[SJS] I cannot find a "db connection" in that file, but a lot of entries
that start with "db.pool.default" Or did you mean those entries:
server.ethernet.address=...
server.name=OpenCmsServer
?
[KS] Have a look for the following lines:
# URL of the JDBC driver
db.pool.default.jdbcUrl=jdbc:mysql://SERVERNAME:3306/DB_NAME
...
...
# user name to connect to the database
db.pool.default.user=USERNAME
# password to connect to the database
db.pool.default.password=PASSWORD
[SJS] I changed username and password and left
# URL of the JDBC driver
db.pool.default.jdbcUrl=jdbc:mysql://localhost:3306/opencms
the same, because the name of the db is the same, also that it's on the
same machine as tomcat. Is that the right procedure?
Do I need to change the "server.ethernet.adress", too? That one is in
Hex there, and ifconfig tells me a hexadress only for the hardware
adress, so is this that what I need to put in there?
[KS2] You don't need to change that. AFAIK this value is used for
generation of UUIDs.
2. Change the server connection in the opencms-system.xml as well.
[SJS] Did you mean something like
<sites>
<workplace-server>http://www. ... .de</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server="http://www. ... .de" uri="/sites/default/"/>
? I cannot find any ip-adress in there, only URLs to websites, where the
current projects are.
[KS] Yes, that is correct. If you are accessing your new server via IP,
you can type an IP address in there.
[SJS] Mmh, that is a little bit tricky: the old server is the one the
websites lie on now, and that server will continue to run. The new
server is just for testing purposes, that is, I want to change websites
on that server, test if everything works out fine and deploy them to the
old web server, without changing of addresses.
[KS2] Ok, that sounds just like a second server for testing. There is no
connection between them. Right?
So for opencms-system.xml enter the Servername or IP-Address
(http://www.mytestserver.de:TOMCATPORT/ or
http://IP-ADDRESS:TOMCATPORT/) to the workplace-server and site-server
node.
I don't know what to configure in Tomcat. I guess it must be the same as
in opencms-system.xml (http://www.mytestserver.de:TOMCATPORT/ or
http://IP-ADDRESS:TOMCATPORT/).
Actually there is no difference in the configuration of Tomcat for Linux
or Windows (AFAIK).
So should I leave the opencms-system.xml as-is and copy the
/var/lib/tomcat5.5/conf/server.xml to the new server and e.g. change the
Ports in the following part to something else?:
<!-Website www. ... .de -->
<Connector port="8189" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
proxyName="www.actsystems.de" proxyPort="80"
enableLookups="true" redirectPort="8443"
acceptCount="100"
connectionTimeout="20000"
useURIValidationHack="false"
disableUploadTimeout="true" />
Or should I change the server connection to
<mailhost name="localhost" protocol="smtp" user="..."
password="..."/>
...
<sites>
<workplace-server>http://localhost:8080</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server="http://localhost:8080" uri="/sites/default/"/>
</sites>
as the websites will be on the same machine as tomcat? I'm confused,
because I'm still really new to Linux, and even newer to OpenCms and I
think I'm just missing something really obvious.
[KS2] It doesn't matter how your infrastructure looks like. The settings
in opencms-system.xml have to be exactly like how you access the OpenCms
with your browser (Especially for the workplace-server setting). For the
site server it is possible to define aliases. But as I already
mentioned, I don't know very much about Apache / Proxy configuration.
Please refer to www.opencms-wiki.org.
Regards
Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20091015/c0c257d5/attachment.htm>
More information about the opencms-dev
mailing list