LoginSignup
5
6

More than 5 years have passed since last update.

色んなパッケージのバージョン確認コマンドメモ PHP, Perl, Apache, Git, Subversion, Fluentd, MongoDB

Last updated at Posted at 2014-01-17

だいたいが、目的のパッケージのコマンドに --version, -v, -hなどをつけたらみれる感じですね。
怖かったら -h でヘルプを呼ぶと説明が見れるので安心。

PHP

[hoge@hoge ~]$ php -v
----
PHP 5.1.1 (cli) (built: Feb 20 2011 00:00:00)
Copyright (c) 1997-2012 The PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

    with Xdebug v1.1.3, Copyright (c) 2002-2012, by Derick Rethans

Perl

[hoge@hoge ~]$ perl -v
----
This is perl, v5.1.1 built for x86_64-linux-thread-multi


Copyright 1987-2006, Larry Wall


Perl may be copied only under the terms of either the Artistic License or the

GNU General Public License, which may be found in the Perl 5 source kit.


Complete documentation for Perl, including FAQ lists, should be found on

this system using "man perl" or "perldoc perl".  If you have access to the

Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Apache

[hoge@hoge ~]$ /usr/local/apache2/bin/httpd -v

Server version: Apache/2.1.1 (Unix)

Server built:   Nov 10 2009 10:10:10

apache2 のところはダウンロードした際の名前に置き換えて使用。

MySQL

select version();
---
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.1.69    |
+-----------+
1 row in set (0.00 sec)

↓こっちの方が便利かな。(ご指摘頂きました)

www9467ui satomi% mysql -e '\s'                                                           [~]
--------------
mysql  Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1

Connection id:      51
Current database:   
Current user:       hoge@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server version:     5.1.69 Source distribution
Protocol version:   10
Connection:     Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:        /var/lib/mysql/mysql.sock
Uptime:         65 days 22 hours 58 min 38 sec

Threads: 1  Questions: 120  Slow queries: 0  Opens: 22  Flush tables: 1  Open tables: 10  Queries per second avg: 0.0
--------------

Git

[hoge@hoge ~]$ git --version
----
git version 1.2.0.1

Subversion

[hoge@hoge ~]$ svn --version
---
svn, バージョン 1.1.5 (r38866)

   コンパイル日時: Nov 10 2008, 10:10:10


Copyright (C) 2000-2009 CollabNet.

Subversion is open source software, see http://subversion.tigris.org/

This product includes software developed by CollabNet (http://www.Collab.Net/).


以下のリポジトリアクセス (RA) モジュールが利用できます:


* ra_neon : Neon を利用して WebDAV (DeltaV) プロトコルでリポジトリにアクセスするモジュール。

  - 'http' スキームを操作します

  - 'https' スキームを操作します

* ra_svn : svn ネットワークプロトコルを使ってリポジトリにアクセスするモジュール。

  - 'svn' スキームを操作します

* ra_local : ローカルディスク上のリポジトリにアクセスするモジュール。

  - 'file' スキームを操作します

* ra_serf : serf を利用して WebDAV (DeltaV) プロトコルでリポジトリにアクセスするモジュール。

  - 'http' スキームを操作します

  - 'https' スキームを操作します

もしくは

[hoge@hoge hoge]$ svn --version --quiet
---
1.6.5

Fluentd

[hoge@hoge ~]$ /usr/lib64/fluent/ruby/bin/fluentd --version
---
fluentd 0.9.1

こちらもlib64やfluentの部分などそれぞれのパスに合うように変更して使用。

MongoDB

[hoge@hoge ~]$ /usr/local/mongodb-2.4.8/bin/mongod --version             [~ 11:21]
---
db version v1.1.1
Fri Jan 20 10:10:10.333 git version: sfhoauhf0398fgghosuhg983275982flkasjpisa2237b904eafc14
5
6
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6