First, the first lease of a cloud server (or servers Tencent Ali cloud cloud server)
In fact, you can use VMware workstation on a windows computer to install the virtual machine to operate, after all, with low cloud server is also very expensive. However, students can use the price to rent, not only cheaper very convenient, this time using the ES Tencent cloud cloud server, the cloud server provides two addresses for students to buy, Ali cloud servers student price and Tencent cloud servers student price .
Second, prepare for work
Whether the cloud server or virtual machine, are recommended xShell and xftp as a connection tool, mainly more convenient, the specific operation on their own Google ...
Three, yum install JDK
General internal infrastructure cloud server environment that already exists, compared to the virtual machines much from download to installation and commissioning of the entire process is simple, but also to avoid some of the hidden problems, something ...
1. Check the java version can be installed:
yum -y list java*
Here installation marked in red, the Java-1.7.0-openjdk-devel.x86_64 This is jdk1.7, actually should be installed jdk1.8, because I myself have installed, so the above is no, can only jdk1.7 as a template. (Follow-up is also dominated by 1.7)
2. Install the version of jdk
yum -y install java-1.7.0-openjdk-devel.x86_64
3. Check whether the installation is successful
java -version
The above scenario is already successfully installed, (here I was installed jdk1.8)
Note: yum install directory is jdk to / var / lib / jvm down
4. Configure Environment Variables
vim /etc/profile
Copy the following configuration go, wq save and exit
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
Execute the command, to take effect
source /etc/profile
5. Verify that the configuration is successful
Helloworld write a simple program using xftp to copy into the server, run about to try
This is what I wrote helloword verification:
The next step is carried out, have a look:
javac compile, java and then executed ... I'm talking about a ** **.
Here it means jdk installation and commissioning has been completed, the next step is to install Tomcat cats.
IV. Tomcat installation
1. The first step of course is to go to the official website to download the package.
Links: Tomcat's official website , find the package they need, in my example:
Once you have downloaded using xftp (with who knows who) will be downloaded to the server package under the / usr / local / tomcat directory, the latter are also operating in this directory
2. Extract the tomcat package:
tar -zxvf apache-tomcat-8.5.43.tar.gz
3. renamed:
mv apache-tomcat-8.5.43.tar.gz tomcat
The main convenience is to look for the future, no big impact, it all depends on the mood to act themselves.
4. After extracting good,
# Into the bin directory
cd / usr / local / Tomcat / bin
# start Tomcat
./startup.sh
5. Verify that started successfully:
Enter in the browser
http: // server ip address: 8080
Description page appears on the tomcat has been launched successfully
note:
有可能会出现的问题,就是命令行中以及显示Tomcat started,但是在浏览器中还是访问不了页面,一般情况是因为你的云服务的端口没有开放,需要去云服务器安全组中设置访问规则。
腾讯云:进入控制台 → 选择左边侧栏的安全组 → 点击新建 → 如下图所示配置即可
阿里云:进入控制台 → 选择左边侧栏的安全组 → 配置规则 → 快速创建规则 → 如下图所示配置即可
到此,Tomcat就安装配置完成了,接下来将是稍微复杂点的MySQL的安装。叮!!!
五、安装MySQL