Finally, I want to set up your own site! ! !

First of all, I have purchased a foreign own server (spent a large sum of money ...) but the time to buy a hand slip, the election became 32, I have all the software in a virtual machine before 64 jj are the: )

Therefore, the following

1. Download tomcat

https://tomcat.apache.org/download-80.cgi

As shown below, I do not know what the official line engaged, how not clearly stated which linux version which is 32 of 64, regardless of you do, I try to download a second

 

 

2. copies itself to the local tomcat server

I use the tool winscp

3. Extract tomcat

tar -zxvf apache-tomcat-8.5.30.tar.gz

tar 
-c: establish compressed file 
-x: unzip 
-t: view the contents 
-r: append to the archive file 
-u: update compressed files in the original 
five independent command, to be used in compression decompression one of them, 
can be used in conjunction with other commands, but can only use one of them. 

The following parameters are required when optional file compression or decompression. 
-z: gzip attribute has 
-j: There bz2 attribute 
-Z: There compress attribute 
-v: show all processes 
-O: standard output file to unlock the 

following parameters are necessary -f: 
-f: Use file name, remember, this parameter is the last parameter, behind only access the file name.
Perfect interpretation of the tar command

4. The same configuration is generally mounted and extract the java usr / java under (their new directory)

tar -zxvf jdk-8u5-linux-i586.tar.gz

5. Set Environment Variables

vi / etc / profile

Add the following two lines at the end of the file, which is a modified jdk JAVA_HOME path currently installed on ok


export JAVA_HOME=/usr/java/jdk1.8.0_05
export PATH=$PATH:$JAVA_HOME/bin

6.记得要使修改的全局环境变量生效运行

source /etc/profile

7.测试java是否配置ok

任意目录下运行java,java -version看是否有正确的输出内容下面是在tomcat的bin下

 

 


8.启动tomcat

在tomcat的bin目录下运行

 

 sh startup.sh

9.访问tomcat测试

 

 可以在万维网上看到这个就算是基本环境搭建ok了,然后明天晚上我再把自己的域名绑定,换一个稍微low一点的主页

10.问题

1.jdk的下载,开始我是再oracle官网下载的,但是这个居然不行,所有都配置好,提示一个什么./java: cannot execute binary file 无法执行,所以后来我在网上下了一个32位的jdk,就是上面测试可以的官网上也不知道在搞什么鬼,谁知道可以留言告诉我下

linux 32位 jdk

链接:https://pan.baidu.com/s/1sn65exqxgCntnym0kgaSoA
提取码:1jqb

 

 

 

Guess you like

Origin www.cnblogs.com/liuyongbo/p/12014257.html