linux下怎么搭建tomcat,Linux下搭建Tomcat的步骤

你知道在Linux下如何搭建Tomcat吗?

其实我们在搭建tomcat之前先要安装对应的jdk并配置Java环境,

那么接下来的内容中我们就一起去看看Linux下搭建Tomcat的步骤吧。

1.下载apache及jdk安装文件

jdk-6u10-linux-i586-rpm.bin

apache-tomcat-5.5.12.tar.gz

JDK和TOMCAT都是免费的,可以在其主页上下载需要的版本以及API文档。

JDK        下载地址:http://java.sun.com/

TOMCAT下载地址:http://tomcat.apache.org/

2.安装JDK及apache

jdk-6u10-linux-i586-rpm.bin 放在 /usr目录下

chmod 777 jdk-6u10-linux-i586-rpm.bin 将其转换为可执行文件

sh jdk-6u10-linux-i586-rpm.bin 执行此文件,先会出来一段协议,按空格看完

后选择yes会自动释放出JDK的RPM包,并进行安装

安装完成后/usr/java/jdk1.6.0_10这个即为JDK的安装目录

测试java安装成功 java -version

apache-tomcat-5.5.12.tar.gz 放在/usr/local下面

tar -zxvf apache-tomcat-5.5.12.tar.gz 解包apache

/usr/local下面将解出的目录重命名

mv apache-tomcat-5.5.12 tomcat5.5

3.配置 /etc/profile (环境变量)

vi /etc/profile

文件最后面把下面一段加上去

JDK_HOME=/usr/java/jdk1.6.0_10

JAVA_HOME=/usr/java/jdk1.6.0_10

CATALINA_HOME=/usr/local/tomcat5.5

JRE_HOME=/usr/java/jdk1.6.0_10

source /etc/profile  载入配置

4.启动tomcat

sh /usr/local/tomcat5.5/bin/startup.sh

Using CATALINA_BASE:   /usr/local/tomcat5.5

Using CATALINA_HOME:   /usr/local/tomcat5.5

Using CATALINA_TMPDIR: /usr/local/tomcat5.5/temp

Using JRE_HOME:       /usr/java/jdk1.6.0_10

ps -elf | grep tomcat 有类似下面的提示出现证明tomcat 启动成功

0 S root     25099     1  1  81   0 - 57074 322562 14:54 pts/0

00:00:02 /usr/java/jdk1.6.0_10/bin/java -

Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -

Djava.util.logging.config.file=/usr/local/tomcat5.5/conf/logging.propert

ies -Djava.endorsed.dirs=/usr/local/tomcat5.5/common/endorsed -classpath

:/usr/local/tomcat5.5/bin/bootstrap.jar:/usr/local/tomcat5.5/bin/commons

-logging-api.jar -Dcatalina.base=/usr/local/tomcat5.5 -

Dcatalina.home=/usr/local/tomcat5.5 -

Djava.io.tmpdir=/usr/local/tomcat5.5/temp

org.apache.catalina.startup.Bootstrap start

0 S root     25149  2807  0  77   0 -   971 pipe_w 14:57 pts/0

00:00:00 grep tomcat

5.测试tomcat

http://192.168.3.30:8080  192.168.3.30(tomcat服务器地址) 8080 默认端口号,也可以在配置文件中改掉

会出现tomcat的示例页面

安装完成

188681025_1_20200422095911526.jpg

上文内容主要就是Linux下搭建Tomcat的步骤,当然您认为写得不好或者有错的地方,希望得到您的建议和指正,谢谢。

我司美国精美ip:

104.233.144.9

104.233.144.10

104.233.144.11

104.233.144.12

104.233.144.13

104.233.144.14

104.233.144.15

104.233.144.16

104.233.144.17

104.233.144.18

104.233.144.19

104.233.144.20

104.233.144.21

104.233.144.22

104.233.144.23

104.233.144.24

104.233.144.25

104.233.144.26

104.233.144.27

104.233.144.28

104.233.144.29

104.233.144.30

104.233.144.31

104.233.144.32

104.233.144.33

104.233.144.34

104.233.144.35

104.233.144.36

104.233.144.37

104.233.144.38

104.233.144.39

104.233.144.40

104.233.144.41

104.233.144.42

104.233.144.43

104.233.144.44

104.233.144.45

104.233.144.46

104.233.144.47

104.233.144.48

104.233.144.49

104.233.144.50

104.233.144.51

104.233.144.52

104.233.144.53

104.233.144.54

104.233.144.55

104.233.144.56

104.233.144.57

104.233.144.58

104.233.144.59

104.233.144.60

104.233.144.61

104.233.144.62

104.233.144.63

104.233.144.64

104.233.144.65

104.233.144.66

104.233.144.67

104.233.144.68

104.233.144.69

104.233.144.70

104.233.144.71

104.233.144.72

104.233.144.73

104.233.144.74

104.233.144.75

104.233.144.76

104.233.144.77

104.233.144.78

104.233.144.79

104.233.144.80

104.233.144.81

104.233.144.82

104.233.144.83

104.233.144.84

104.233.144.85

104.233.144.86

104.233.144.87

104.233.144.88

104.233.144.89

104.233.144.90

104.233.144.91

104.233.144.92

104.233.144.93

104.233.144.94

104.233.144.95

104.233.144.96

104.233.144.97

104.233.144.98

104.233.144.99

104.233.144.100

104.233.144.101

104.233.144.102

104.233.144.103

104.233.144.104

104.233.144.105

104.233.144.106

104.233.144.107

104.233.144.108

104.233.144.109

104.233.144.110

104.233.144.111

104.233.144.112

104.233.144.113

104.233.144.114

104.233.144.115

104.233.144.116

104.233.144.117

104.233.144.118

104.233.144.119

104.233.144.120

104.233.144.121

104.233.144.122

104.233.144.123

104.233.144.124

104.233.144.125

104.233.144.126

104.233.144.127

104.233.144.128

104.233.144.129

104.233.144.130

104.233.144.131

104.233.144.132

104.233.144.133

104.233.144.134

104.233.144.135

104.233.144.136

104.233.144.137

104.233.144.138

104.233.144.139

104.233.144.140

104.233.144.141

104.233.144.142

104.233.144.143

104.233.144.144

104.233.144.145

104.233.144.146

104.233.144.147

104.233.144.148

104.233.144.149

104.233.144.150

104.233.144.151

104.233.144.152

104.233.144.153

104.233.144.154

104.233.144.155

104.233.144.156

104.233.144.157

104.233.144.158

104.233.144.159

104.233.144.160

104.233.144.161

104.233.144.162

104.233.144.163

104.233.144.164

104.233.144.165

104.233.144.166

104.233.144.167

104.233.144.168

104.233.144.169

104.233.144.170

104.233.144.171

104.233.144.172

104.233.144.173

104.233.144.174

104.233.144.175

104.233.144.176

104.233.144.177

104.233.144.178

104.233.144.179

104.233.144.180

104.233.144.181

104.233.144.182

104.233.144.183

104.233.144.184

104.233.144.185

104.233.144.186

104.233.144.187

104.233.144.188

104.233.144.189

104.233.144.190

104.233.144.191

104.233.144.192

104.233.144.193

104.233.144.194

104.233.144.195

104.233.144.196

104.233.144.197

104.233.144.198

104.233.144.199

104.233.144.200

104.233.144.201

104.233.144.202

104.233.144.203

104.233.144.204

104.233.144.205

104.233.144.206

104.233.144.207

104.233.144.208

104.233.144.209

104.233.144.210

104.233.144.211

104.233.144.212

104.233.144.213

104.233.144.214

104.233.144.215

104.233.144.216

104.233.144.217

104.233.144.218

104.233.144.219

104.233.144.220

104.233.144.221

104.233.144.222

104.233.144.223

104.233.144.224

104.233.144.225

104.233.144.226

104.233.144.227

104.233.144.228

104.233.144.229

104.233.144.230

104.233.144.231

104.233.144.232

104.233.144.233

104.233.144.234

104.233.144.235

104.233.144.236

104.233.144.237

104.233.144.238

104.233.144.239

104.233.144.240

104.233.144.241

104.233.144.242

104.233.144.243

104.233.144.244

104.233.144.245

104.233.144.246

104.233.144.247

104.233.144.248

104.233.144.249

104.233.144.250

104.233.144.251

104.233.144.252

104.233.144.253

104.233.144.254

104.233.144.255

来源:https://www.icode9.com/content-3-680901.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值