查看LINUX安装版本
[root@localhost etc]# uname
Linux
[root@localhost etc]# uname -a
Linux localhost.localdomain 2.6.32-279.11.1.el6.i686 #1 SMP Tue Oct 16 14:40:53 UTC 2012 i686 i686 i386 GNU/Linux
[root@localhost etc]# cat /proc/version
Linux version 2.6.32-279.11.1.el6.i686 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Tue Oct 16 14:40:53 UTC 2012
查看apache是否安装,路径
[root@localhost httpd-2.0.64]# rpm -qa httpd
httpd-2.2.15-15.el6.centos.1.i686
[root@localhost httpd-2.0.64]# whereis httpd
httpd: /usr/sbin/httpd.event /usr/sbin/httpd /usr/sbin/httpd.worker /etc/httpd /usr/lib/httpd /usr/share/man/man8/httpd.8.gz
[root@localhost httpd-2.0.64]# find / -name httpd -print
/date/web/httpd-2.0.64/httpd
/date/web/httpd-2.0.64/.libs/httpd
/usr/sbin/httpd
/usr/local/apache2/bin/httpd
/usr/lib/httpd
^C
[root@localhost httpd-2.0.64]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 17:27 ? 00:00:01 /sbin/init
root 2 0 0 17:27 ? 00:00:00 [kthreadd]
root 3 2 0 17:27 ? 00:00:00 [migration/0]
root 4 2 0 17:27 ? 00:00:00 [ksoftirqd/0]
root 5 2 0 17:27 ? 00:00:00 [migration/0]
root 6 2 0 17:27 ? 00:00:00 [watchdog/0]
root 7 2 0 17:27 ? 00:00:00 [migration/1]
root 8 2 0 17:27 ? 00:00:00 [migration/1]
坦率的说,这要看你是如何安装的啦!
1.rpm包形式(包括yum安装)可以
rpm -aq|grep http #查看是否安装了apache的包
rpm -qi 输入上一步获取的包名 #了解一下这个apache包的信息
rpm -ql 输入包名 #此apache包中所有文件安装的位置
2,tarball等安装
whereis httpd #http文件的位置
查看CPU型号
[root@xiaoqi etc]# cat /proc/cpuinfo |grep "name" |cut -f2 -d: |uniq -c
2 Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz
查看物理CPU个数
[root@xiaoqi etc]# cat /proc/cpuinfo |grep "physical"|sort |uniq -c
2 address sizes : 36 bits physical, 48 bits virtual
2 physical id : 0
查看CPU在多少位模式下面
[root@xiaoqi etc]# getconf LONG_BIT
32
下面的结果大于0说明支持64位
[root@xiaoqi etc]# cat /proc/cpuinfo |grep flags |grep 'lm' |wc -l
2
查看系统物理内存
[root@xiaoqi etc]# free -m
total used free shared buffers cached
Mem: 2901 901 2000 0 109 447
-/+ buffers/cache: 344 2557
Swap: 5999 0 5999
查看服务器安装的是哪个安装版本
[root@xiaoqi etc]# cat /etc/redhat-release
CentOS release 6.3 (Final)
查看OS版本是64位还是32位
[root@xiaoqi etc]# uname -a
Linux xiaoqi 2.6.32-279.14.1.el6.i686 #1 SMP Tue Nov 6 21:05:14 UTC 2012 i686 i686 i386 GNU/Linux
查看服务器硬件信息
[root@xiaoqi etc]# dmidecode |grep Vendor
Vendor: Gateway
服务器型号
[root@xiaoqi etc]# dmidecode |grep Product
Product Name: T-6331c
Product Name: