首页 > 代码库 > linux常用命令

linux常用命令

jdk下载: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

1. 安装rpm软件

rpm -ivh --prefix= /usr/local  /home/PAS/xxx.rpm

2. 复制粘贴:yy, p

3. 删除:dd

4. 查找 /向后?向前, n继续查找

5. 查看linux 32位还是64位: getconf WORD_BIT

  uname -a    x86_64表示64位机器

6. 查看java版本: java -version

7. 配置jdk

export JAVA_HOME=/usr/local/jdk1.7.0_79export PATH=$JAVA_HOME/bin:$PATHexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

生效: source /etc/profile

配置tomcat的jdk

/usr/local/tomcat/bin/setclasspath.sh

export JAVA_HOME=/usr/local/jdk1.7.0_79
export JRE_HOME=/usr/local/jdk1.7.0_79/jre

/usr/local/tomcat/bin/setclasspath.bat
set JAVA_HOME=/usr/local/jdk1.7.0_79
set JRE_HOME=/usr/local/jdk1.7.0_79/jre




/usr/local/tomcat/bin/catalina.sh
JAVA_HOME=/usr/local/jdk1.7.0_79
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar



执行需进入到/usr/local/tomcat/bin/目录,然后sudo ./startup.sh

source /etc/profile //立即生效

8. 更改权限:chmod +x jdk-6u21-linux-x64.bin

linux常用命令