CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了CentOS搭建java web运行环境(jdk + tomcat)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

Virtualbox install additionaltools in centos6.8 When i checked the log file mention in the above screen, i see below error. CreaTing udev rule for the Guest Additions kernel module. /tmp/vbox.0/Makefi

VirtualBox install additionaltools in centos6.8 When i checked the log file mention in the above screen,i see below error.

CreaTing udev rule for the Guest Additions kernel module. /tmp/vBox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop. CreaTing user for the Guest Additions.

To overcome this error update gcc using

1.yum update gcc

  1. yum update

  2. yum install kernel-uek-devel

*Please note that to execute “yum” your guest vmBox should havE internet connection

Now after doing all the above I again executed ./VMBoxLinuxAdditions.run

基于 CentOS-6.8-x86_64-minimal

安装SSH:

yum install ssh

启动SSH:

service sshd start

设置开机运行:

chkconfig sshd on

###@L_675_6@163源 参http://mirrors.163.com/.help/centos.html

###命令行和桌面方式启动 vi /etc/inittab

id:3:initdefault:

@L_675_6@ 图形界面 id: 5 命令行 id: 3 切换回图形界面

startx

###环境变量

- 方法一(所有用户的sHell都有权使用这些环境变量)

/etc/profile 文件后面加上以下代码

export JAVA_HOME=/opt/jdk1.7.0_80
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib

执行

source /etc/profile

立即生效

- 方法

把上面的代码附加到 /home/xxuser/.bash_profile # 用户目录下.bash_profile文件

###系统编码

@L_675_6@ /etc/profile

export LANG=en_US.UTF-8
#export LANG=zh_CN.GBK

source /etc/profile 后生效 查看当前系统编码

#env |grep LANG

启动tomcat前 查看8080端口占用情况时 [root@localhost conf]# lsof -i:8080 -bash: lsof: command not found 安装lsof工具

yum install lsof

其他

zip工具认也是没有的 安装

yum install -y unzip zip

####CentOS ssh超时设置 @L_675_6@/etc/ssh/sshd_config文件 将ClientAliveInterval对应的0改成60 服务器端向客户端请求消息的时间间隔,认是0,不发送 表示每分钟发送一次,然后客户端响应,这样就保持长连接了. ClientAliveCountMax,使用认值3即可. 表示服务器发出请求后客户端没有响应的次数达到一定值,就自动断开. 正常情况下,客户端不会不响应

重新启动 sshd: /etc/rc.d/init.d/sshd restart

大佬总结

以上是大佬教程为你收集整理的CentOS搭建java web运行环境(jdk + tomcat)全部内容,希望文章能够帮你解决CentOS搭建java web运行环境(jdk + tomcat)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。