Installation Steps

<p><strong>Step 1: Set up ECS Security Groups Rule</strong></p> <p>1.Log in to the ECS Console.</p> <p>2.In the left navigation pane, click <strong>Networks </strong>&gt; <strong>Security Group</strong> to enter the <strong>Security Group</strong> page.</p> <p>3.Select the target region and click the name of the target Security Group.</p> <p>4.Enter the <strong>Security Group Information</strong> page, and switch to the <strong>Security Group Rules</strong> tab.</p> <p>5.Click <strong>Create </strong>in the upper-right corner to enter the <strong>Create Security Group Rules</strong> page.</p> <p>a.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Add inbound ICMP Security Group Rules</p> <p>b.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Add access rules for web project allocation ports, using port 8080 as an example.</p> <p><strong>Step 2: Install jdk</strong></p> <p>1.Create a new directory and execute the following command:</p> <p>mkdir /usr/loca</p> <p>2.Unzip jdk-12.0.1_linux-x64_bin.tar.gz to / usr / local.</p> <p>chmod +x jdk-12.0.1_linux-x64_bin.tar.gz</p> <p>tar xzf jdk-12.0.1_linux-x64_bin.tar.gz &ndash;C /usr/local</p> <p>3.Configure environment variables.</p> <p>a.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Open /etc/profile:vi /etc/profile.</p> <p>b.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Enter edit mode: press the i key.</p> <p>c.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Add the following information in the / etc / profile file:</p> <p># set java environment</p> <p>export JAVA_HOME=/usr/local /jdk12.0.1</p> <p>export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib</p> <p>export PATH=$JAVA_HOME/bin:$PATH</p> <p>d.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Press Esc to exit edit mode.</p> <p>e.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Execute the following command to save and close the file:</p> <p>:wq</p> <p>4.Execute the following command to make the configuration in / etc / profile take effect:</p> <p><strong>source /etc/profile</strong></p> <p>5.Running the java -version command will display the JDK version information, indicating that the JDK has been successfully installed.</p> <p><strong>Step 3: Install tomcat</strong></p> <p>1.Double-click to open Putty and connect to the ECS Instance.</p> <p>2.Unzip the installation package to any directory you want.</p> <p>tar -xvf apache-tomcat-8.5.41.tar.gz -C /usr/ local/tomcat/</p> <p><strong>Note:</strong> You can replace apache-tomcat-8.5.41.tar.gz with the version of tomcat you actually downloaded, otherwise the decompression cannot be executed.</p> <p>3.Enter tomcat&#39;s bin directory and execute the following command to install tomcat.</p> <p>cd&nbsp;/usr/local/tomcat/apache-tomcat-8.5.41/</p> <p>cd bin/</p> <p>4.Configure jdk in tomcat, execute the following command to edit setclasspath.sh script.</p> <p>vi setclasspath.sh</p> <p>a.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Add the following content in the setclasspath.sh script.</p> <p>export JAVA_HOME=/usr/local/ jdk-12.0.1</p> <p>export JRE_HOME=/usr/local/ jdk-12.0.1/jre</p> <p>b.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Press<code> Esc </code>to exit edit mode, enter <code>: wq </code>to save and exit edit.</p> <p>5.Execute the following command to start the tomcat.</p> <p><strong>./startup.sh</strong></p>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products