官术网_书友最值得收藏!

Installing JRE on your server

We will install Oracle JRE 8 on Windows. Although you may find some packages to install OpenJDK on Windows, they are not official distributions and this may lead you to some issues. We will see how to install OpenJDK and Oracle JRE on Linux Mint:

  1. Open your browser and go to this URL: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html. The following screenshot shows the window for installing the environment:
  2. The page lists all the available packages for different operating systems and technologies. Select the radio button to accept the license agreement, and then choose the package for your machine. For instance, if you are running a 64-bit Linux Mint machine, select the jre-8u121-linux-x64.tar.gz file.
Oracle releases frequent updates for Java, mainly to fix security issues. The minor release number, 121 in the previous example, may be different at the moment you visit the page. Keep in mind that you have to select Java 8 and go with the latest minor update.
  1. If you are on a Windows machine, open the location of the downloaded file and run it as an administrator and click on the Yes button when asked for the User Account control. Go with the default settings and press the Install button. After the wizard completes the installation process, you will see a window like the following one:
  1. If you are running a Linux Mint machine, download the jre-8u121-linux-x64.tar.gz or jre-8u121-linux-i586.tar.gz file, according to the architecture of your computer.

 

  1. In your terminal, run the command that creates a new subfolder in the directory opt as follows:
      ~ $ sudo mkdir -p -v /opt/java
      mkdir: created directory '/opt/java' 
  1. Extract the archive and move it to the new folder you just created:
      ~ $ tar xvfz jre-8u121-linux-i586.tar.gz
      ~ $ sudo mv jre1.8.0_121 /opt/java/
  1. Now configure the JRE on your system and make it the default choice:
      ~ $ sudo update-alternatives --install "/usr/bin/java" "java" 
"/opt/java/jre1.8.0_121/bin/java" 1
~ $ sudo update-alternatives --set java /opt/java/
jre1.8.0_121/bin/java
  1. Let's check the installation:
      ~ $ java -version
      java version "1.8.0_121"
      Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
      Java HotSpot(TM) Server VM (build 25.121-b13, mixed mode)
  1. The previous instructions were for Oracle JRE. In case you prefer using OpenJDK JRE its installation is easy, we are now going to install it, of course, you have to choose among installing one of the two JRE flavors. Open your terminal and execute this command:
      ~ $ sudo apt-get install openjdk-8-jre  
  1. Now check if your installation is working properly using the following commands:
       ~ $ java -version
       openjdk version "1.8.0_121"
       OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-
0ubuntu1.16.04.2-b13)
OpenJDK Server VM (build 25.121-b13, mixed mode)

We installed JRE on your computer. This is the core requirement for using GeoServer. It lets you run an instance of a Java virtual machine where you can host the servlet container and GeoServer. In fact, in the next step, you will install and configure the servlet container.

主站蜘蛛池模板: 金湖县| 资溪县| 康保县| 莫力| 巴青县| 武宣县| 尉氏县| 阿荣旗| 班戈县| 吉林市| 临沧市| 赤壁市| 龙江县| 汉源县| 东阳市| 青铜峡市| 韶山市| 钟山县| 定兴县| 铜川市| 巴林右旗| 丹棱县| 竹北市| 岱山县| 泰安市| 谢通门县| 金湖县| 宁波市| 延庆县| 商都县| 荃湾区| 淳安县| 墨脱县| 怀来县| 萨嘎县| 临猗县| 新乐市| 瓦房店市| 厦门市| 盐城市| 绿春县|