Skip to content

linux下jdk安装 #1

@huangthink

Description

@huangthink

root用户

cd /tmp  
wget -N http://192.168.0.159:8080/samba/files/jdk-6u35-linux-x64.bin  
chmod +x jdk-6u35-linux-x64.bin  
./jdk-6u35-linux-x64.bin 
mv ./jdk1.6.0_35 /opt/jdk 
source /etc/profile

环境变量

echo 'export JAVA_HOME=/opt/jdk' >> /etc/profile  
echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile

开机启动

echo 'export JAVA_HOME=/opt/jdk' >> /etc/rc.d/rc.local   
source /etc/profile

普通用户

source /etc/profile
java -version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions