Google Cloud 安装java

1. 确定系统是32位还是64位
1)
[echo0282@instance-1 ~]$ uname -a
Linux instance-1 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[echo0282@instance-1 ~]$
[echo0282@instance-1 ~]$ uname -m
x86_64
[echo0282@instance-1 ~]$
2)
[echo0282@instance-1 ~]$ getconf LONG_BIT
64
[echo0282@instance-1 ~]$ getconf WORD_BIT
32
[echo0282@instance-1 ~]$
3)
[echo0282@instance-1 ~]$ file /sbin/init
/sbin/init: symbolic link to `../lib/systemd/systemd'
[echo0282@instance-1 ~]$
[echo0282@instance-1 ~]$ file ../lib/systemd/systemd
../lib/systemd/systemd: cannot open (No such file or directory)
[echo0282@instance-1 ~]$
[echo0282@instance-1 ~]$ file /lib/systemd/systemd
/lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=4903faf530c8f0c91650a6642d2cb5c535631e3c, stripped
[echo0282@instance-1 ~]$
4)
[echo0282@instance-1 ~]$ echo $HOSTTYPE
x86_64
[echo0282@instance-1 ~]$
5)
[echo0282@instance-1 ~]$ file /bin/cat
/bin/cat: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=b97cc8358edb123e8a9e21390f30924fe66a5e55, stripped
[echo0282@instance-1 ~]$
6)
[echo0282@instance-1 ~]$ more /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) CPU @ 2.00GHz
stepping : 3
microcode : 0x1
cpu MHz : 2000.182
cache size : 39424 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2
ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma
cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_
single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed
adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp arc
h_capabilities
bogomips : 4000.36
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
 
[echo0282@instance-1 ~]$
7)
 
以上说明系统是64位的,因此选择64位的安装包
 
 
yum install
java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64


posted @ 2021-02-25 22:07  Orchidelle  阅读(173)  评论(0编辑  收藏  举报