is it possible to export layer configurations from geoserver and import them into geoserver on another computer? It takes a long time to keep setting up the layers everytime i switch computers.
Apparently you cant..The only way is to copy the data_dir directory and replace the new installations data_dir. Then when you start up geoserver the layer configs you setup should load automatically.
You could use the Geoserver Manager1 (a wrapper around the Geoserver rest-api), to configure your layers, and store the procedure. Then you could just point the Manager to the new Geoserver.
For the migration of Geoserver 2.x to Geoserver 2.y (using Tomcat):
Make a backup of your directory "data" of Geoserver 2.x.
Stop Geoserver 2.x in Tomcat and then, stop Tomcat (sudo /etc/init.d/tomcatx stop).
Remove (a backup is best) your directory "geoserver" of "webapps". (generally is tomcatx/webapps).
Install the new version of Geoserver (in this case Geoserver 2.y). If you are using Tomcat, you could use the war file.
Edit the file "web.xml" (tomcatx/webapps/geoserver/WEB-INF/web.xml) whit the new path. For example:
<context-param>
<param-name>GEOSERVER_DATA_DIR</param-name>
<param-value>/var/lib/tomcatx/webapps/geoserver/data</param-value>
</context-param>
to
<context-param>
<param-name>GEOSERVER_DATA_DIR</param-name>
<param-value>new-path-of-data</param-value>
</context-param>
Move your new directory "security" to other place (usually is tomcatx/webapps/geoserver/data/security).
Change permissions of your data directory to tomcatx. (chgrp, chown)
Restart Tomcat.
Regards.
Geoserver 2.x is old version.
Geoserver 2.y is new version.
tomcatx is your version of Tomcat.
1.copy folder "data" in geoserver to on another computer and replace it to .war and geoserver folder
2-dump database old to new computer
3-restart tomcat
/etc/init.d/tomacat7 restrat
4-change owner "data" on geoserver to tomcat user
-cd to /var/lib/tomcat7/webapps/geoserver
sudo chown -R tomcat7 data
sudo chown -R :tomcat7 data
5-reload store on geoserver
Related
I have an infrastructure with Openshift (containers) Jenkins (build and deploy jobs) Nexus (here I store WAR and JAR files) and GIT (groovy/yaml files).
Imaging I create an image with Tomcat APP server, a WAR file and some JAR files.
What would be the way to do configuration changes (for example in a file inside /whatever/webapps/app/config/properties.conf or even /etc/tomcat/conf/some.conf) withouth having to rebuild the image?
Extra info:
What I want to achieve is configuration management withouth having to rebuild the war and therefore rebuild/redeploy the image. Is the ConfigMap for this use?
According to given info i understand that you don't want to rebuild the image if only config change requires for the server, But you need to redeploy the service if any config change happens. for such kind of requirements the config should be configured as ENV for DeploymentConfig and trigger ConfigChange should be configured for same deployment.
Then if you change the configuration of deployment and apply the changes it will trigger the deployment for the service.
I'm new to both Openshift (next gen) and WildFly
I'm currently writing an application that allows the user to upload images and let other view the images. In order for the images to survive server restart, I should put the images on persistence volume, which is outside the exploded WAR.
I have mounted persistent volume to /data.
My question is: how can I serve the images stored in /data?
I know I can write a servlet to stream the files -- but I'd like to
avoid this if possible
I know that I can specify below code in jboss' standalone.xml - but I think standalone.xml will be wiped by Openshift once I deploy a new WAR file
<handlers>
<file name="ImagesDirHandler" follow-symlink="true" directory-listing="true" cache-buffers="1024" cache-buffer-size="1024" path="/data/images"/>
</handlers>
Since installing Service Fabric SDK 2.2.207 I'm not able to change the cluster data and log paths (with previous SDKs I could).
I tried:
Editing the registry keys in HKLM\Software\Microsoft\Service Fabric - they just revert back to C:\SfDevCluster\data and C:\SfDevCluster\log when the cluster is created.
Running poweshell: & "C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1" -PathToClusterDataRoot d:\SfDevCluster\data -PathToClusterLogRoot d:\SfDevCluster\log - this works successfully but upon changing the cluster mode to 1-node (newly available configuration with this SDK), the cluster moves to the C drive.
Any help is appreciated!
Any time you switch cluster mode on local dev box, existing cluster is removed and a new one is created. You can pass use \DevClusterSetup.ps1 to switch mode from 5->1 node, by passing -CreateOneNodeCluster to create one node cluster and pass Data and Log root paths to it as well.
Please help me how to deploy war on openshift app.I have put our war file in webapps folder and push code but my war is not deployed.
after this default page will be open on app url.Please help me.
If you would like to deploy pre compiled java applications to your OpenShift gear, but you don't want to waste space by storing them in your git repository, then these directions are for you!
Create an application on OpenShift and select either the Tomcat 6 (JBoss EWS 1.0) or Tomcat 7 (JBoss EWS 2.0) cartridges.
Use the git clone command to download the source code for your application to your computer.
Remove the src directory and the pom.xml file from your application that you cloned to your computer.
DO NOT place your WAR files into the webapps directory.
Next, you need to do a git commit -am "some message here" to make sure that your changes are committed. Lastly, you need to do a git push to deploy your changes to your OpenShift gear.
Now comes the fun part, you need to use SCP or SFTP (with public key authentication of course) to upload your files to the correct location on your gear.
You need to place your WAR files into this folder: app-root/dependencies/jbossews/webapps on your gear.
If you run rhc tail $appname, shortly after the transfer is done you will see entries appear in the logs showing that your WAR file has been deployed and at what context.
The WAR files that you add into the webapps directory will be deployed at a context that matches the name of the WAR file.
For Example:
If you add a file called mywebsite.war, it will be available at app-domain.rhcloud.com/mywebsite. If there is an application that you would like to be available at app-domain.rhcloud.com/ (also known as the root context) then you should name that file ROOT.war.
If you need to replace them, just upload a new copy, or if you want to remove them, just ssh into your server and delete the file you uploaded and it will be un-deployed.
Is it possible to configure JBoss to have a fixed directory name for the exploded war present inside tmp directory? On every restart, the exploded war directories name changes with a random string is appended to them.
In JBoss 6, we have the following structure for our war file my-project.war:
JBOSS_HOME\server\default\tmp\vfs\automount8sc4d112587f64c\my-project.war-98eea116d17f4a53
What I want is: Can we have the above path name fixed for all restarts and deployments?
We could not bookmark the jsp/html/js/css files in our text editors due to this.
In WebLogic server, there is a fixed directory structure for all restarts and deployments. It is very convenient for quick HTML/CSS/JavaScript coding. Can we have something like that in JBoss.
You are trying to reference the temp directory of jboss where the application server unzips war-files, etc.
Try to unzip your war file, name the folder <your-project>.war and move it to the deploy folder. Unless jboss does not need to unpack it, the files (HTML/CSS/JavaScript) should be delivered from this place.