linux,apache,php,mysql常用的查看版本資訊的方法

來源:互聯網
上載者:User

標籤:version   linux   mysql   建立   資訊   

 1. 查看linux的核心版本,系統資訊,常用的有三種辦法:

    uname -a;   more /etc/issue;    cat /proc/version;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/174938626.jpg" alt="174938626.jpg" border="0" width="650" />

2. 查看apache的版本資訊,如果是通過yum,或者是rpm安裝的,可以使用rpm -qa |gerp httpd 來查看;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/175235836.jpg" alt="175235836.jpg" border="0" />

還可以通過httpd -v來查詢;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/175320562.jpg" alt="175320562.jpg" border="0" />

當然,安裝好apache後,可以直接elink迴環查看apache的資訊。

3.查看php的版本資訊,如果是通過yum,或者是rpm包安裝的,可以使用rpm -qa |grep php來查看;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/192631491.jpg" alt="192631491.jpg" border="0" />

同樣,也可以使用php -v來查看php的版本資訊;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/192734840.jpg" alt="192734840.jpg" border="0" />

一般情況下,大多是通過安裝lamp後,使用phpinfo的測試頁來查看安裝的php的資訊;

具體辦法為在/var/www/下建立index.php檔案,具體內容即

<?

php phpinfo();

?>

即可。然後在/etc/httpd/conf/httpd.conf檔案中添加index.php類型,然後重啟httpd,即可得到如下結果。

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/192853766.jpg" alt="192853766.jpg" border="0" width="650" />

4. 查看mysql的版本資訊,如果是通過yum安裝的,或者是rpm包安裝的,可以使用rpm -qa |grep mysql 來查看;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/193055437.jpg" alt="193055437.jpg" border="0" />

也可以使用mysql -v 或者是--help|grep Distrib來查看;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/193215375.jpg" alt="193215375.jpg" border="0" width="650" />

也可以進入mysql,然後通過命令select version();來查看;

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/193316165.jpg" alt="193316165.jpg" border="0" />

或者是status;命令查看。

650) this.width=650;" src="http://img1.51cto.com/attachment/201107/193336570.jpg" alt="193336570.jpg" border="0" width="650" />

個人覺得這些是比較常用的方法,當然肯定會有更加有效,更加便捷的辦法和途徑。


本文出自 “WEBLOFT” 部落格,請務必保留此出處http://webloft.blog.51cto.com/9067902/1662426

linux,apache,php,mysql常用的查看版本資訊的方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.