各種環境確認

OS

system-release

$ cat /etc/system-release
Amazon Linux AMI release 2017.03

Linux Kernelのバージョン

$ uname -r
4.9.32-15.41.amzn1.x86_64

$ uname -a
Linux ip-172-31-0-1 4.9.62-10.57.amzn2.x86_64

MacOS

$ sw_vers

CPU

$ cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 63
model name  : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
stepping    : 2
microcode   : 0x25
cpu MHz     : 2394.500
cache size  : 30720 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 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs        :
bogomips    : 4789.00
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

メモリ

cat /proc/meminfo
MemTotal:        2049564 kB
MemFree:          466560 kB
MemAvailable:    1207500 kB
Buffers:          156492 kB
Cached:           685840 kB
SwapCached:            0 kB
Active:          1004176 kB
Inactive:         481820 kB
Active(anon):     643664 kB
Inactive(anon):      336 kB
Active(file):     360512 kB
Inactive(file):   481484 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                80 kB
Writeback:             0 kB
AnonPages:        643680 kB
Mapped:            31200 kB
Shmem:               344 kB
Slab:              73596 kB
SReclaimable:      61400 kB
SUnreclaim:        12196 kB
KernelStack:        4508 kB
PageTables:         6196 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1024780 kB
Committed_AS:    1914348 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       12288 kB
DirectMap2M:     2084864 kB

カーネル

$ cat /proc/version
Linux version 4.9.20-11.31.amzn1.x86_64 (mockbuild@gobi-build-64012) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Apr 13 01:53:57 UTC 2017

yum

$ yum version
Loaded plugins: priorities, update-motd, upgrade-helper
Installed: 2017.03/x86_64                                422:4171da904604225a8027284a2d61d2c128d56970
Group-Installed: yum                                       8:1a12bb5ccbfe54e3c1207ecf33c288ba8b7545fe
version

EPEL

$ rpm -qa | grep epel
epel-release-6-8.9.amzn1.noarch

Apache

$ httpd -v
Server version: Apache/2.2.32 (Unix)
Server built:   Jun 21 2017 19:11:57

# 詳細確認
$ httpd -V
Server version: Apache/2.2.32 (Unix)
Server built:   Jun 21 2017 19:11:57
Server's Module Magic Number: 20051115:42
Server loaded:  APR 1.5.1, APR-Util 1.4.1
Compiled using: APR 1.5.1, APR-Util 1.4.1
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Tomcat

AWS ElasticBeanstalk

$ /usr/sbin/tomcat7 version
Server version: Apache Tomcat/7.0.77
Server built:   Apr 19 2017 22:36:10 UTC
Server number:  7.0.77.0
OS Name:        Linux
OS Version:     4.9.20-11.31.amzn1.x86_64
Architecture:   amd64
JVM Version:    1.7.0_131-mockbuild_2017_02_15_02_03-b00
JVM Vendor:     Oracle Corporation

Amazon Linux

$ /opt/tomcat/bin/version.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID:    /var/run/tomcat.pid
Server version: Apache Tomcat/8.0.44
Server built:   May 10 2017 17:21:09 UTC
Server number:  8.0.44.0
OS Name:        Linux
OS Version:     4.9.27-14.31.amzn1.x86_64
Architecture:   amd64
JVM Version:    1.8.0_131-b11
JVM Vendor:     Oracle Corporation

Maven

$ mvn --version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T04:39:06+09:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
Default locale: ja_JP, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"

MySQL

mysql> select version();
+------------+
| version()  |
+------------+
| 5.5.46-log |
+------------+
1 row in set (0.01 sec)

Postfix

$ /usr/sbin/postconf | grep mail_version

Java

$ java -version
java version "1.7.0_141"
OpenJDK Runtime Environment (amzn-2.6.10.1.73.amzn1-x86_64 u141-b02)
OpenJDK 64-Bit Server VM (build 24.141-b02, mixed mode)

PHP

$ php -v
PHP 5.3.29 (cli) (built: May 12 2015 22:42:19)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies

Python

$ python -V
Python 2.7.12

Shell

現在のShell

$ echo $SHELL
/bin/zsh

利用可能なShell

$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

Mac 環境

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.6
BuildVersion:   16G1212