昨日在VPS上测试Laravel在PHP7下的性能,重新搭建了环境,温习基本运维知识。

查看内核版本

  • cat /proc/version
  • uname -a
  • uname -r
1
2
3
4
5
6
[root@DaveX ~]# cat /proc/version
Linux version 2.6.32-504.12.2.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Mar 11 22:03:14 UTC 2015
[root@DaveX ~]# uname -a
Linux DaveX 2.6.32-504.12.2.el6.x86_64 #1 SMP Wed Mar 11 22:03:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@DaveX ~]# uname -r
2.6.32-504.12.2.el6.x86_64

查看系统版本

  • cat /etc/issue
  • cat /etc/redhat-release
1
2
3
4
5
6
[root@DaveX ~]# cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m

[root@DaveX ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)

查看64位还是32位

  • getconf LONG_BIT
1
2
[root@DaveX ~]# getconf LONG_BIT
64

使用 file /bin/ls

  • file /bin/ls
1
2
[root@DaveX ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped