Configure the Linux open-source Map Server (jdk, Apache, tomcat, and GeoServer) and jdkgeoserver

Source: Internet
Author: User
Tags postgis

Configure the Linux open-source Map Server (jdk, Apache, tomcat, and GeoServer) and jdkgeoserver

Purpose:Setting up a Geoserver environment in Ubuntu involves the installation and configuration of jdk, tomcat, PostGIS, python, and Geoserver in Linux.

Tools:
  1. Jdk-6u18-linux-i586.bin
  2. Apache-tomcat-8.tar.gz
  3. Httpd-2.2.8.tar.bz2
  4. Geoserver-2.6.war.zip
  5. Python-2.5.tar.bz2
  6. Mod_python-3.3.1.tgz
The above are required tools. You can download them on your own. They are all open-source tools available on the Internet. Please download them on Sun and other official websites for free.
Installation:Create a folder named mapserver in the root directory and put all our tools in it.
PS:
  • Jdkdownload the coreversion under binary. please use the Ubuntu system to download jdk-8u40-linux-i586.tar.gz. This is because the rpm version is easy to install on linux systems such as RedHat. ubuntu has to use alien to convert rpm to deb for installation, which is troublesome. Directly download tar.gz and unzip it.
  • The good thing about open-source is that most of the files can be decompressed, and you only need to configure the environment.

Install JDK
1. decompress the file
$ sudo tar zxvf jdk-7u21-linux-i586.tar.gz
2. Add the environment variable $ sudo vim ~ /. Bashrc (or use NotePad to open: gedit ~ /. Bashrc) Add the following content:

export JAVA_HOME=/usr/lib/jvm/java export JRE_HOME=${JAVA_HOME}/jre  export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  export PATH=${JAVA_HOME}/bin:$PATH  

Change java_home to your own folder. 3. configure the default JDK version sudo update-alternatives -- install/usr/bin/java/home/wangxy/mapserver/jdk1.8.0 _ 40/bin/java 300 sudo update-alternatives -- install/usr /bin/javac/usr/lib/jvm/java/bin/javac 300 sudo update-alternatives -- install/usr/bin/jar/home/wangxy/mapserver/jdk1.8.0 _ 40/bin/jar 300 sudo update-alternatives -- install/usr/bin/javah/home/wangxy/mapserver/jdk1.8.0 _ 40/bin/javah 300 sudo update-alternatives -- install /usr/bin/javap/home/wangxy/mapserver/jdk1.8.0 _ 40/bin/javap 300 4. then execute 

sudo update-alternatives --config java

If JDK is installed for the first time, a prompt is displayed.

There is only one alternative in link group java (providing/usr/bin/java):/usr/lib/jvm/java/bin/java requires no configuration.

5. Test
$ java -versionjava version "1.8.0_40"


Install Tomcat 8

1. Extract

Sudo tar-zxvf apache-tomcat-8.tar.gz
Decompress the installation package to the apache-tomcat-8 directory.

This time

Go to the bin directory under the Directory and execute the following:

[Root @ hunting bin] # vim catalina. sh

2. Add the following content:

Cat alina_home =/usr/local/apache-tomcat-8.0.20/

[Root @ hunting local] # chmod + x *. sh

3. Start the tomcat server

[Root @ hunting bin] # sudo./startup. sh

4. Enter

Http: // localhost: 8080/(if not the local machine, enter the corresponding IP address)

If the tomcat page is displayed, the test is successful:



Install Geoserver
1. Copy geoserver. war to the/server/tomcat8/webapps directory.
2. Restart Tomcat and access: http: // 127.0.0.1: 8080/geoserver Default User name: admin Password: geoserver
Install ApacheSame as above. decompress the package and apache2 is located in/usr/local/apache. Enter cd/usr/local/apache2/bin on the terminal, and then enter./apachectl start to start Apache:
Enter http: // 127.0.0.1 in the browser to access the service (the default port number is 80 ):

PS: 1) the Apache configuration file is in:/usr/local/apache2/conf/httpd. conf. 2 ). /apachectl start Apache 3 ). /apachectl restart to restart Apache 4 ). /apachectl stop Apache. The remaining postGIS, python, and mod_python are well-installed and will not be repeated. The above is the process of setting up the Geoserver environment in Ubuntu. You only need to follow the corresponding steps to build the environment successfully. Then, Geoserver combined with postgis to publish geographic information data and maps.
If you have any questions, please contact me, Xu Ming: 507153809@qq.com.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.