CentOS搭建java web运行环境(jdk + tomcat)
2016-09-02 00:00
501 查看
摘要: centos web环境
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
yum update
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
启动SSH:
设置开机运行:
###修改163源
参考http://mirrors.163.com/.help/centos.html
###命令行和桌面方式启动
vi /etc/inittab
修改
图形界面 id: 5
命令行 id: 3
切换回图形界面
###环境变量
执行
立即生效
/home/xxuser/.bash_profile # 用户目录下.bash_profile文件
###系统编码
source /etc/profile 后生效
查看当前系统编码
启动tomcat前 查看8080端口占用情况时
[root@localhost conf]# lsof -i:8080
-bash: lsof: command not found
安装lsof工具
####CentOS ssh超时设置
修改/etc/ssh/sshd_config文件
将ClientAliveInterval对应的0改成60 服务器端向客户端请求消息的时间间隔, 默认是0, 不发送
表示每分钟发送一次, 然后客户端响应, 这样就保持长连接了.
ClientAliveCountMax, 使用默认值3即可. 表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开. 正常情况下, 客户端不会不响应
重新启动 sshd:
/etc/rc.d/init.d/sshd restart
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
yum update
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
###修改163源
参考http://mirrors.163.com/.help/centos.html
###命令行和桌面方式启动
vi /etc/inittab
id:3:initdefault:
修改
图形界面 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文件
###系统编码
修改 /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超时设置
修改/etc/ssh/sshd_config文件
将ClientAliveInterval对应的0改成60 服务器端向客户端请求消息的时间间隔, 默认是0, 不发送
表示每分钟发送一次, 然后客户端响应, 这样就保持长连接了.
ClientAliveCountMax, 使用默认值3即可. 表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开. 正常情况下, 客户端不会不响应
重新启动 sshd:
/etc/rc.d/init.d/sshd restart
相关文章推荐
- centos搭建J2EE_CMS运行环境(jdk +tomcat +mysql配置)
- centos下使用yum安装jdk java环境安装 activeMQ运行环境 tomcat安装
- 【CentOS】 Nginx+jdk+tomcat 环境搭建
- CentOS 7 nginx php7 jdk1.8 tomcat8环境搭建
- CentOS下安装和配置MySQL-JDK-Tomcat-Nginx(个人官网环境搭建手册)
- Centos下Jdk、Tomcat环境搭建记录
- 【CentOS】 Nginx+jdk+tomcat 环境搭建
- CentOS+JDK+Tomcat+MySql&JDBCDriver 开发环境搭建实录
- 购买阿里云服务器到服务器环境搭建(CentOS7.0:jdk+mysql+tomcat)
- 1、单机运行环境搭建之 --CentOS-6.5安装配置JDK-8
- CentOS下安装和配置MySQL-JDK-Tomcat-Nginx(个人官网环境搭建手册)
- CentOS+JDK+Tomcat+MySql&JDBCDriver 开发环境搭建实录
- CentOS下安装和配置MySQL-JDK-Tomcat-Nginx(个人官网环境搭建手册)
- 1、单机运行环境搭建之 --CentOS-6.5安装配置JDK-7
- 【CentOS】 Nginx+jdk+tomcat 环境搭建
- 4、单机运行环境搭建之 --CentOS-6.5优化Tomcat8
- 5、单机运行环境搭建之 --CentOS-6.4拷贝Tomcat7形成集群
- CentOS下搭建java web运行环境
- centos安装jdk、tomcat、maven搭建java环境
- CentOS下安装和配置MySQL-JDK-Tomcat-Nginx(个人官网环境搭建手册)