본문 바로가기
Development/리눅스

리눅스 OS, Apache, Tomcat, Java, Mysql, Postgres, PPAS, Oracle 버전 확인 방법

by 버들도령 2022. 1. 24.
728x90

리눅스 OS, Apache, Tomcat, Java, Mysql, Postgres, PPAS, Oracle
버전 확인 방법

 

리눅스 OS의 버전 확인 방법
[root@L3-CLAIRWAS01 bin]#
[root@L3-CLAIRWAS01 bin]# uname -a
Linux L3-CLAIRWAS01 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@L3-CLAIRWAS01 bin]#
[root@L3-CLAIRWAS01 bin]# cat /etc/issue
CentOS release 6.10 (Final)
Kernel \r on an \m

[root@L3-CLAIRWAS01 bin]#

 

※ cat 명령을 통한 OS version 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[root@localhost ~]# cat /etc/lsb-release   
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[root@localhost ~]
[root@localhost ~]# cat /etc/issue.net     
CentOS release 6.5 (Final)
Kernel \r on an \m
[root@localhost ~]
[root@localhost ~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
 
[root@localhost ~]
[root@localhost ~]# cat /etc/*release*
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
cat: /etc/lsb-release.d: 디렉터리입니다
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
cpe:/o:centos:linux:6:GA
[root@localhost ~]
 
cs

 

 

 

Apache HTTP Server의 버전 확인 방법
[root@L3-CLAIRAP01 ~]# 
[root@L3-CLAIRAP01 ~]# ps -ef|grep httpd
root      2047     1  0  2021 ?        00:03:07 /usr/local/apache2/bin/httpd -k start
daemon    2052  2047  0  2021 ?        00:16:24 /usr/local/apache2/bin/httpd -k start
daemon    2053  2047  0  2021 ?        00:16:11 /usr/local/apache2/bin/httpd -k start
daemon    2054  2047  0  2021 ?        00:16:13 /usr/local/apache2/bin/httpd -k start
root      8468  8262  0 22:09 pts/0    00:00:00 grep httpd
[root@L3-CLAIRAP01 ~]# 
[root@L3-CLAIRAP01 ~]# cd /usr/local/apache2/bin/
[root@L3-CLAIRAP01 bin]# ls -ltra
합계 2352
-rwxr-xr-x.  1 root root   23515 2015-03-31 22:04 apxs
-rwxr-xr-x.  1 root root    3437 2015-03-31 22:04 apachectl
-rwxr-xr-x.  1 root root    8925 2015-03-31 22:04 dbmmanage
-rw-r--r--.  1 root root    1073 2015-03-31 22:04 envvars-std
-rw-r--r--.  1 root root    1073 2015-03-31 22:04 envvars
-rwxr-xr-x.  1 root root   41266 2015-03-31 22:13 htpasswd
-rwxr-xr-x.  1 root root   22167 2015-03-31 22:13 htdigest
-rwxr-xr-x.  1 root root   40594 2015-03-31 22:13 htdbm
-rwxr-xr-x.  1 root root   80751 2015-03-31 22:13 ab
-rwxr-xr-x.  1 root root   21852 2015-03-31 22:13 logresolve
-rwxr-xr-x.  1 root root   19392 2015-03-31 22:13 httxt2dbm
-rwxr-xr-x.  1 root root   66554 2015-03-31 22:13 htcacheclean
-rwxr-xr-x.  1 root root   34553 2015-03-31 22:13 rotatelogs
-rwxr-xr-x.  1 root root   12221 2015-03-31 22:13 checkgid
-rwxr-xr-x.  1 root root   20128 2015-03-31 22:13 fcgistarter
-rwxr-xr-x.  1 root root 1972653 2015-03-31 22:13 httpd
drwxr-xr-x.  2 root root    4096 2015-03-31 22:13 .
drwxr-xr-x. 21 root root    4096 2015-07-22 16:22 ..
[root@L3-CLAIRAP01 bin]# 
[root@L3-CLAIRAP01 bin]# ./httpd -v
Server version: Apache/2.4.12 (Unix)
Server built:   Mar 31 2015 06:13:07
[root@L3-CLAIRAP01 bin]#

 

Apache Tomcat의 버전 확인 방법
[root@L3-CLAIRAP01 ~]# ps -ef|grep tomcat
root      8300  8262  0 18:50 pts/0    00:00:00 grep tomcat
root     19033     1  0 Jan06 ?        00:17:22 /usr/java/jdk1.7.0_75/bin/java -Djava.util.logging.config.file=/usr/local/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms2048M -Xmx2048M -XX:PermSize=128M -XX:MaxPermSize=256M -Xnoclassgc -XX:NewSize=512M -XX:MaxNewSize=1024M -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=50 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+AggressiveOpts -Xloggc:/usr/local/tomcat8/logs/gc.log -Djava.net.preferIPV4Stack=true -Djava.awt.headless=true -Dserver.mode=dev -DCLAIR.host=AP01 -Djava.endorsed.dirs=/usr/local/tomcat8/endorsed -classpath /usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat8 -Dcatalina.home=/usr/local/tomcat8 -Djava.io.tmpdir=/usr/local/tomcat8/temp org.apache.catalina.startup.Bootstrap start
[root@L3-CLAIRAP01 ~]# 
[root@L3-CLAIRAP01 ~]# cd /usr/local/tomcat8/lib/
[root@L3-CLAIRAP01 lib]# java -cp catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/8.0.20
Server built:   Feb 15 2015 18:10:42 UTC
Server number:  8.0.20.0
OS Name:        Linux
OS Version:     2.6.32-358.el6.x86_64
Architecture:   amd64
JVM Version:    1.7.0_75-b13
JVM Vendor:     Oracle Corporation
[root@L3-CLAIRAP01 lib]#

 

Java의 버전 확인 방법
[root@L3-CLAIRWAS01 lib]# java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
[root@L3-CLAIRWAS01 lib]#

 

PostgreSQL의 버전 확인 방법 (PPAS 버전 확인)
[root@MOCA-DB ~]# ps -ef|grep pgsql
postgres  1695     1  0  2021 ?        00:01:34 /usr/pgsql-9.4/bin/postmaster -D /var/lib/pgsql/9.4/data
root      2865  2806  0 22:18 pts/0    00:00:00 grep pgsql
[root@MOCA-DB ~]# cd /usr/pgsql-
pgsql-10beta1/ pgsql-9.4/     
[root@MOCA-DB ~]# cd /usr/pgsql-9.4/bin
[root@MOCA-DB bin]# ls -ltra
total 7520
-rwxr-xr-x. 1 root root   57136 Feb  4  2015 vacuumdb
-rwxr-xr-x. 1 root root   27488 Feb  4  2015 pg_config
-rwxr-xr-x. 1 root root   43952 Feb  4  2015 pg_receivexlog
-rwxr-xr-x. 1 root root   68208 Feb  4  2015 pg_basebackup
-rwxr-xr-x. 1 root root   53232 Feb  4  2015 clusterdb
-rwxr-xr-x. 1 root root   35808 Feb  4  2015 pg_resetxlog
-rwxr-xr-x. 1 root root  339064 Feb  4  2015 pg_dump
-rwxr-xr-x. 1 root root   57432 Feb  4  2015 createuser
-rwxr-xr-x. 1 root root   53744 Feb  4  2015 createdb
-rwxr-xr-x. 1 root root   17616 Feb  4  2015 pg_test_fsync
-rwxr-xr-x. 1 root root   49552 Feb  4  2015 dropuser
-rwxr-xr-x. 1 root root 5683440 Feb  4  2015 postgres
-rwxr-xr-x. 1 root root   60928 Feb  4  2015 createlang
-rwxr-xr-x. 1 root root  138968 Feb  4  2015 pg_restore
-rwxr-xr-x. 1 root root   99136 Feb  4  2015 initdb
-rwxr-xr-x. 1 root root   27528 Feb  4  2015 pg_controldata
-rwxr-xr-x. 1 root root   49616 Feb  4  2015 dropdb
-rwxr-xr-x. 1 root root   54544 Feb  4  2015 reindexdb
-rwxr-xr-x. 1 root root  463976 Feb  4  2015 psql
-rwxr-xr-x. 1 root root   27952 Feb  4  2015 pg_isready
-rwxr-xr-x. 1 root root   39976 Feb  4  2015 pg_ctl
-rwxr-xr-x. 1 root root   76248 Feb  4  2015 pg_dumpall
-rwxr-xr-x. 1 root root   60928 Feb  4  2015 droplang
drwxr-xr-x. 5 root root    4096 Mar 31  2015 ..
lrwxrwxrwx. 1 root root       8 Mar 31  2015 postmaster -> postgres
drwxr-xr-x. 2 root root    4096 May  8  2015 .
-rw-r--r--. 1 root root   62856 May  8  2015 moca.sql
[root@MOCA-DB bin]# 
[root@MOCA-DB bin]# ./postgres --help
postgres is the PostgreSQL server.

Usage:
  postgres [OPTION]...

Options:
  -B NBUFFERS        number of shared buffers
  -c NAME=VALUE      set run-time parameter
  -C NAME            print value of run-time parameter, then exit
  -d 1-5             debugging level
  -D DATADIR         database directory
  -e                 use European date input format (DMY)
  -F                 turn fsync off
  -h HOSTNAME        host name or IP address to listen on
  -i                 enable TCP/IP connections
  -k DIRECTORY       Unix-domain socket location
  -l                 enable SSL connections
  -N MAX-CONNECT     maximum number of allowed connections
  -o OPTIONS         pass "OPTIONS" to each server process (obsolete)
  -p PORT            port number to listen on
  -s                 show statistics after each query
  -S WORK-MEM        set amount of memory for sorts (in kB)
  -V, --version      output version information, then exit
  --NAME=VALUE       set run-time parameter
  --describe-config  describe configuration parameters, then exit
  -?, --help         show this help, then exit

Developer options:
  -f s|i|n|m|h       forbid use of some plan types
  -n                 do not reinitialize shared memory after abnormal exit
  -O                 allow system table structure changes
  -P                 disable system indexes
  -t pa|pl|ex        show timings after each query
  -T                 send SIGSTOP to all backend processes if one dies
  -W NUM             wait NUM seconds to allow attach from a debugger

Options for single-user mode:
  --single           selects single-user mode (must be first argument)
  DBNAME             database name (defaults to user name)
  -d 0-5             override debugging level
  -E                 echo statement before execution
  -j                 do not use newline as interactive query delimiter
  -r FILENAME        send stdout and stderr to given file

Options for bootstrapping mode:
  --boot             selects bootstrapping mode (must be first argument)
  DBNAME             database name (mandatory argument in bootstrapping mode)
  -r FILENAME        send stdout and stderr to given file
  -x NUM             internal use

Please read the documentation for the complete list of run-time
configuration settings and how to set them on the command line or in
the configuration file.

Report bugs to <pgsql-bugs@postgresql.org>.
[root@MOCA-DB bin]# 
[root@MOCA-DB bin]# 
[root@MOCA-DB bin]# ./postgres --version
postgres (PostgreSQL) 9.4.1
[root@MOCA-DB bin]# 
[root@MOCA-DB bin]# 
[root@MOCA-DB bin]# ./pg_ctl --version
pg_ctl (PostgreSQL) 9.4.1
[root@MOCA-DB bin]#

 

PPAS의 버전 확인을 위한 SQL문
select version();
"PostgreSQL 9.4.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit"

 

MySQL의 버전 확인 방법
[root@TBCLAIRAPP01|/root]# ps -ef|grep mysql
root      2526     1  0  2021 ?        00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/TBCLAIRAPP01.pid
mysql     2609  2526  0  2021 ?        00:25:36 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/TBCLAIRAPP01.pid --socket=/var/lib/mysql/mysql.sock
root      3390  3370  2 07:28 pts/0    00:00:00 grep mysql
[root@TBCLAIRAPP01|/root]# cd /usr/local/mysql/bin/
[root@TBCLAIRAPP01|/usr/local/mysql/bin]# ls -ltra
합계 61256
-rwxrwxrwx. 1 mysql mysql   31715 2012-05-30 20:51 mysqlhotcopy
-rwxrwxrwx. 1 mysql mysql    6602 2012-05-30 20:51 mysqldumpslow
-rwxrwxrwx. 1 mysql mysql   16782 2012-05-30 20:51 mysqld_safe
-rwxrwxrwx. 1 mysql mysql   23408 2012-05-30 20:51 mysqld_multi
-rwxrwxrwx. 1 mysql mysql   10990 2012-05-30 20:51 mysqlbug
-rwxrwxrwx. 1 mysql mysql  110848 2012-05-30 20:51 mysqlaccess
-rwxrwxrwx. 1 mysql mysql    3818 2012-05-30 20:51 mysql_zap
-rwxrwxrwx. 1 mysql mysql   16689 2012-05-30 20:51 mysql_setpermission
-rwxrwxrwx. 1 mysql mysql    7694 2012-05-30 20:51 mysql_secure_installation
-rwxrwxrwx. 1 mysql mysql   14362 2012-05-30 20:51 mysql_install_db
-rwxrwxrwx. 1 mysql mysql    5894 2012-05-30 20:51 mysql_fix_privilege_tables
-rwxrwxrwx. 1 mysql mysql     483 2012-05-30 20:51 mysql_fix_extensions
-rwxrwxrwx. 1 mysql mysql    3245 2012-05-30 20:51 mysql_find_rows
-rwxrwxrwx. 1 mysql mysql    4169 2012-05-30 20:51 mysql_convert_table_format
-rwxrwxrwx. 1 mysql mysql    6133 2012-05-30 20:51 mysql_config
-rwxrwxrwx. 1 mysql mysql    1424 2012-05-30 20:51 msql2mysql
-rwxrwxrwx. 1 mysql mysql 2034189 2012-05-30 20:51 resolveip
-rwxrwxrwx. 1 mysql mysql 2050217 2012-05-30 20:51 resolve_stack_dump
-rwxrwxrwx. 1 mysql mysql 2062341 2012-05-30 20:51 replace
-rwxrwxrwx. 1 mysql mysql 2065092 2012-05-30 20:51 perror
-rwxrwxrwx. 1 mysql mysql  389996 2012-05-30 20:51 mysql_waitpid
-rwxrwxrwx. 1 mysql mysql 2096404 2012-05-30 20:51 my_print_defaults
-rwxrwxrwx. 1 mysql mysql 3108274 2012-05-30 20:51 mysqlshow
-rwxrwxrwx. 1 mysql mysql 3129980 2012-05-30 20:51 mysqlimport
-rwxrwxrwx. 1 mysql mysql 3270725 2012-05-30 20:51 mysqldump
-rwxrwxrwx. 1 mysql mysql 3109648 2012-05-30 20:51 mysqlcheck
-rwxrwxrwx. 1 mysql mysql 3361612 2012-05-30 20:51 mysqlbinlog
-rwxrwxrwx. 1 mysql mysql 3084760 2012-05-30 20:51 mysqladmin
-rwxrwxrwx. 1 mysql mysql 3792137 2012-05-30 20:51 mysql
-rwxrwxrwx. 1 mysql mysql   26680 2012-05-30 20:51 innochecksum
-rwxrwxrwx. 1 mysql mysql 3445829 2012-05-30 20:51 mysqltest
-rwxrwxrwx. 1 mysql mysql 3168112 2012-05-30 20:51 mysqlslap
-rwxrwxrwx. 1 mysql mysql 2155408 2012-05-30 20:51 mysql_upgrade
-rwxrwxrwx. 1 mysql mysql 3523694 2012-05-30 20:51 myisampack
-rwxrwxrwx. 1 mysql mysql 3463410 2012-05-30 20:51 myisamlog
-rwxrwxrwx. 1 mysql mysql 3780068 2012-05-30 20:51 myisamchk
-rwxrwxrwx. 1 mysql mysql 3434339 2012-05-30 20:51 myisam_ftdump
-rwxrwxrwx. 1 mysql mysql 1990732 2012-05-30 20:51 mysql_tzinfo_to_sql
-rwxrwxrwx. 1 mysql mysql 3824213 2012-05-30 20:51 mysql_client_test
drwxrwxrwx. 2 mysql mysql    4096 2012-05-30 20:51 .
drwxr-xr-x. 9 root  mysql    4096 2013-02-13 10:25 ..
[root@TBCLAIRAPP01|/usr/local/mysql/bin]# ./mysql --help
./mysql  Ver 14.14 Distrib 5.1.49, for unknown-linux-gnu (x86_64) using readline 5.1
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Usage: ./mysql [OPTIONS] [database]
  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
  -A, --no-auto-rehash 
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.
  -B, --batch         Don't use history file. Disable interactive behavior.
                      (Enables --silent.)
  --character-sets-dir=name 
                      Directory for character set files.
  --column-type-info  Display column type information.
  -c, --comments      Preserve comments. Send comments to the server. The
                      default is --skip-comments (discard comments), enable
                      with --comments.
  -C, --compress      Use compression in server/client protocol.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.
  --debug-check       Check memory and open file usage at exit.
  -T, --debug-info    Print some debug info at exit.
  -D, --database=name Database to use.
  --default-character-set=name 
                      Set the default character set.
  --delimiter=name    Delimiter to be used.
  -e, --execute=name  Execute command and quit. (Disables --force and history
                      file.)
  -E, --vertical      Print the output of a query (rows) vertically.
  -f, --force         Continue even if we get an SQL error.
  -G, --named-commands 
                      Enable named commands. Named commands mean this program's
                      internal commands; see mysql> help . When enabled, the
                      named commands can be used from any line of the query,
                      otherwise only from the first line, before an enter.
                      Disable with --disable-named-commands. This option is
                      disabled by default.
  -g, --no-named-commands 
                      Named commands are disabled. Use \* form only, or use
                      named commands only in the beginning of a line ending
                      with a semicolon (;). Since version 10.9, the client now
                      starts with this option ENABLED by default. Disable with
                      '-G'. Long format commands still work from the first
                      line. WARNING: option deprecated; use
                      --disable-named-commands instead.
  -i, --ignore-spaces Ignore space after function names.
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
  -b, --no-beep       Turn off beep on error.
  -h, --host=name     Connect to host.
  -H, --html          Produce HTML output.
  -X, --xml           Produce XML output.
  --line-numbers      Write line numbers for errors.
  -L, --skip-line-numbers 
                      Don't write line number for errors.
  -n, --unbuffered    Flush buffer after each query.
  --column-names      Write column names in results.
  -N, --skip-column-names 
                      Don't write column names in results.
  -O, --set-variable=name 
                      Change the value of a variable. Please note that this
                      option is deprecated; you can set variables directly with
                      --variable-name=value.
  --sigint-ignore     Ignore SIGINT (CTRL-C).
  -o, --one-database  Only update the default database. This is useful for
                      skipping updates to other database in the update log.
  --pager[=name]      Pager to use to display results. If you don't supply an
                      option, the default pager is taken from your ENV variable
                      PAGER. Valid pagers are less, more, cat [> filename],
                      etc. See interactive help (\h) also. This option does not
                      work in batch mode. Disable with --disable-pager. This
                      option is disabled by default.
  --no-pager          Disable pager and print to stdout. See interactive help
                      (\h) also. WARNING: option deprecated; use
                      --disable-pager instead.
  -p, --password[=name] 
                      Password to use when connecting to server. If password is
                      not given it's asked from the tty.
  -P, --port=#        Port number to use for connection or 0 for default to, in
                      order of preference, my.cnf, $MYSQL_TCP_PORT,
                      /etc/services, built-in default (3306).
  --prompt=name       Set the mysql prompt to this value.
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,
                      memory).
  -q, --quick         Don't cache result, print it row by row. This may slow
                      down the server if the output is suspended. Doesn't use
                      history file.
  -r, --raw           Write fields without conversion. Used with --batch.
  --reconnect         Reconnect if the connection is lost. Disable with
                      --disable-reconnect. This option is enabled by default.
  -s, --silent        Be more silent. Print results with a tab as separator,
                      each row on new line.
  -S, --socket=name   The socket file to use for connection.
  --ssl               Enable SSL for connection (automatically enabled with
                      other flags).Disable with --skip-ssl.
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
                      --ssl).
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).
  --ssl-cipher=name   SSL cipher to use (implies --ssl).
  --ssl-key=name      X509 key in PEM format (implies --ssl).
  --ssl-verify-server-cert 
                      Verify server's "Common Name" in its cert against
                      hostname used when connecting. This option is disabled by
                      default.
  -t, --table         Output in table format.
  --tee=name          Append everything into outfile. See interactive help (\h)
                      also. Does not work in batch mode. Disable with
                      --disable-tee. This option is disabled by default.
  --no-tee            Disable outfile. See interactive help (\h) also. WARNING:
                      Option deprecated; use --disable-tee instead.
  -u, --user=name     User for login if not current user.
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
  -v, --verbose       Write more. (-v -v -v gives the table output format).
  -V, --version       Output version information and exit.
  -w, --wait          Wait and retry if connection is down.
  --connect_timeout=# Number of seconds before connection timeout.
  --max_allowed_packet=# 
                      The maximum packet length to send to or receive from
                      server.
  --net_buffer_length=# 
                      The buffer size for TCP/IP and socket communication.
  --select_limit=#    Automatic limit for SELECT when using --safe-updates.
  --max_join_size=#   Automatic limit for rows in a join when using
                      --safe-updates.
  --secure-auth       Refuse client connecting to server if it uses old
                      (pre-4.1.1) protocol.
  --server-arg=name   Send embedded server this as a parameter.
  --show-warnings     Show warnings after every statement.

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- -----------------------------
auto-rehash                       TRUE
character-sets-dir                (No default value)
column-type-info                  FALSE
comments                          FALSE
compress                          FALSE
debug-check                       FALSE
debug-info                        FALSE
database                          (No default value)
default-character-set             utf8
delimiter                         ;
vertical                          FALSE
force                             FALSE
named-commands                    FALSE
ignore-spaces                     FALSE
local-infile                      FALSE
no-beep                           FALSE
host                              (No default value)
html                              FALSE
xml                               FALSE
line-numbers                      TRUE
unbuffered                        FALSE
column-names                      TRUE
sigint-ignore                     FALSE
port                              0
prompt                            mysql> 
quick                             FALSE
raw                               FALSE
reconnect                         TRUE
socket                            (No default value)
ssl                               FALSE
ssl-ca                            (No default value)
ssl-capath                        (No default value)
ssl-cert                          (No default value)
ssl-cipher                        (No default value)
ssl-key                           (No default value)
ssl-verify-server-cert            FALSE
table                             FALSE
user                              (No default value)
safe-updates                      FALSE
i-am-a-dummy                      FALSE
connect_timeout                   0
max_allowed_packet                16777216
net_buffer_length                 16384
select_limit                      1000
max_join_size                     1000000
secure-auth                       FALSE
show-warnings                     FALSE
[root@TBCLAIRAPP01|/usr/local/mysql/bin]# 
[root@TBCLAIRAPP01|/usr/local/mysql/bin]# ./mysql --version
./mysql  Ver 14.14 Distrib 5.1.49, for unknown-linux-gnu (x86_64) using readline 5.1
[root@TBCLAIRAPP01|/usr/local/mysql/bin]#

 

Oracle의 버전 확인 방법
oracle@CLAIR:/oracle> sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 토 6월 8 20:13:09 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name:

 

Oracle의 버전 확인을 위한 SQL문

SELECT * FROM v$version WHERE banner LIKE 'Oracle%';
# Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

SELECT * FROM v$version;

SELECT * FROM PRODUCT_COMPONENT_VERSION;

CentOS

리눅스 OS 버전, bit 확인하기 (OS & version, cpu, bit check)

현재 접속한 리눅스 서버에 대한 OS, 버전 정보를 확인하고자 하는 경우가 있죠?

이런 경우에 아래의 명령들중에서 적당한 것을 사용하시면 되겠습니다.

※ 일반적으로 자주 사용하는 명령

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]
[root@localhost ~]# uname --help
Usage: uname [OPTION]...
Print certain system information.  With no OPTION, same as -s.
 
  -a, --all                print all information, in the following order,
                             except omit -p and -if unknown:
  -s, --kernel-name        print the kernel name
  -n, --nodename           print the network node hostname
  -r, --kernel-release     print the kernel release
  -v, --kernel-version     print the kernel version
  -m, --machine            print the machine hardware name
  -p, --processor          print the processor type or "unknown"
  -i, --hardware-platform  print the hardware platform or "unknown"
  -o, --operating-system   print the operating system
      --help     이 도움말을 표시하고 끝냅니다
      --version  버전 정보를 출력하고 끝냅니다
 
Report uname bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report uname translation bugs to <http://translationproject.org/team/>
For complete documentation, run: info coreutils 'uname invocation'
cs

 

※ 리눅스 배포판 버전(LSB (Linux Standard Base) and Distribution infomation) 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[root@localhost ~]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.5 (Final)
Release:        6.5
Codename:       Final
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]# lsb_release --help
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.
 
Usage: lsb_release [OPTION]...
With no OPTION specified defaults to -v.
 
Options:
  -v, --version
    Display the version of the LSB specification against which the distribution is compliant.
  -i, --id
    Display the string id of the distributor.
  -d, --description
    Display the single line text description of the distribution.
  -r, --release
    Display the release number of the distribution.
  -c, --codename
    Display the codename according to the distribution release.
  -a, --all
    Display all of the above information.
  -s, --short
    Use short output format for information requested by other options (or version if none).
  -h, --help
    Display this message.
[root@localhost ~]
cs

 

※ cat 명령을 통한 OS version 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[root@localhost ~]# cat /etc/lsb-release   
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[root@localhost ~]
[root@localhost ~]# cat /etc/issue.net     
CentOS release 6.5 (Final)
Kernel \r on an \m
[root@localhost ~]
[root@localhost ~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
 
[root@localhost ~]
[root@localhost ~]# cat /etc/*release*
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
cat: /etc/lsb-release.d: 디렉터리입니다
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
cpe:/o:centos:linux:6:GA
[root@localhost ~]
 
cs

 

※ CPU 정보 확인 - lscpu 명령

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[root@localhost ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            23
Model:                 113
Stepping:              0
CPU MHz:               3593.248
BogoMIPS:              7186.49
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              512K
L3 cache:              32768K
NUMA node0 CPU(s):     0-3
cs

 

※ CPU 정보 확인 - cat 명령 이용

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@localhost ~]# cat /proc/cpuinfo | more
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 113
model name      : AMD Ryzen 7 3700X 8-Core Processor             
stepping        : 0
cpu MHz         : 3593.248
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 16
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 mmxext fxsr_opt rdtscp lm constant_tsc rep_good nonstop_tsc extd_apicid unfair_spinlock pni pclmulqdq ssse3 
cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dn
owprefetch npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold fsgsbase 
avx2
--More--
cs

 

※ My linux is 32-bit or 64-bit??

1
2
[root@localhost ~]# getconf LONG_BIT
64
cs
linux
728x90

댓글