linux 非root用户安装 jdk 和 tomcat
来源:互联网 发布:java就业信息管理系统 编辑:程序博客网 时间:2024/05/16 16:55
创建一个用户 sgmm,并在其用户目录里面安装 jdk和tomcat。安装过程如下。
一、增加 sgmm 用户和 sgmm 组
- [root@lnx_test ~]# groupadd sgmm
- [root@lnx_test ~]# useradd -d /home/sgmm -g sgmm -m sgmm
- [root@lnx_test ~]# passwd sgmm
三、部署jdk (切换至sgmm用户下)
1、将jdk-6u13-linux-i586.bin上传到sgmm目录并赋可执行权限。
- [sgmm@lnx_test ~]$ chmod 744 jdk-6u13-linux-i586.bin
- [sgmm@lnx_test ~]$ ./jdk-6u13-linux-i586.bin
- [sgmm@lnx_test ~]$ vi .bash_profile
改为以下内容
- # .bash_profile
- # Get the aliases and functions
- if [ -f ~/.bashrc ]; then
- . ~/.bashrc
- fi
- # User specific environment and startup programs
- JAVA_HOME=/home/sgmm/jdk1.6.0_13
- CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
- PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
- export PATH CLASSPATH JAVA_HOME
四、部署 tomcat
1、将apache-tomcat-6.0.20.tar.gz上传到服务器上
2、解压文件,出现目录 apache-tomcat-6.0.20
- [sgmm@lnx_test ~]$ tar zxvf apache-tomcat-6.0.20.tar.gz
- [sgmm@lnx_test ~]$ vi .bash_profile
- export CATALINA_BASE=/home/sgmm/apache-tomcat-6.0.20
- export CATALINA_HOME=/home/sgmm/apache-tomcat-6.0.20
- # .bash_profile
- # Get the aliases and functions
- if [ -f ~/.bashrc ]; then
- . ~/.bashrc
- fi
- # User specific environment and startup programs
- JAVA_HOME=/home/sgmm/jdk1.6.0_13
- CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
- PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
- export PATH CLASSPATH JAVA_HOME
- export CATALINA_BASE=/home/sgmm/apache-tomcat-6.0.20
- export CATALINA_HOME=/home/sgmm/apache-tomcat-6.0.20
- [sgmm@lnx_test ~]$ source ~/.bash_profile
- [sgmm@lnx_test bin]$ ./startup.sh
- Using CATALINA_BASE: /home/sgmm/apache-tomcat-6.0.20
- Using CATALINA_HOME: /home/sgmm/apache-tomcat-6.0.20
- Using CATALINA_TMPDIR: /home/sgmm/apache-tomcat-6.0.20/temp
- Using JRE_HOME: /home/sgmm/jdk1.6.0_13
6、使用 ps -ef|grep tomcat 可以查看tomcat进程,并使用 kill -9 进程号杀掉进程
0 0
- linux 非root用户安装 jdk 和 tomcat
- linux 非root用户安装 jdk 和 tomcat
- linux 非root用户安装 jdk 和 tomcat
- linux 非root用户安装 jdk 和 tomcat
- Linux下安装tar.gz包的JAVA JDK(非Root用户)
- Linux非root用户安装MySQL
- Linux非ROOT用户安装Mysql
- linux 安装 jdk 和 tomcat 可以使所有用户使用
- 非 root 用户安装和配置 NodeJS
- 非root用户启动tomcat
- 非root用户启动tomcat
- 非root用户启动tomcat
- Linux 下Tomcat非root用户不能使用80端口
- Linux下,非root用户启动Tomcat配置过程
- linux 安装jdk和tomcat
- linux安装jdk和tomcat
- linux jdk 和tomcat安装
- linux安装jdk和tomcat
- HTTP Basic Authentication
- JDBC的4种驱动类型
- Adroid Studio 提示Error:(2) Error retrieving parent for item: No resource found that matches
- 设计模式(20)——策略者模式(Stragety Pattern)
- Redis的5种数据类型
- linux 非root用户安装 jdk 和 tomcat
- 数据库连接学习(一)——JNDI数据源的配置
- myeclipse maven模块无法自动部署到tomcat下的解决办法
- [FAQ12564]【Phone Call】双拨号键对应SIM卡拨打电话的实现
- iOS-lazyLoading懒加载
- Android 隐藏ViewPager之后,控件点击事件无法响应的问题
- height:100%;元素撑满整个浏览器
- HTML5课堂作业1
- [Android 性能优化系列]内存之基础篇--Android如何管理内存