How to view Linux, Apache, MySQL, PHP versions

Source: Internet
Author: User

This article to share the content is how to view Linux, Apache, MySQL, PHP version, has a certain reference value, the need for friends can refer to

Essentials:

View Apache version httpd-v under Linux

View PHP version php-v under Linux

View MySQL version mysql-v (uppercase V) under Linux

1. View Linux kernel version, System Information, commonly used in three ways:

Uname-a;

More/etc/issue;

Cat/proc/version;


2. View the Apache version information

If it is installed through Yum, or RPM, it can be viewed using Rpm-qa |gerp httpd;


Can also be queried through httpd-v;


Of course, after installing Apache, you can directly elink the loopback to view Apache information.

Use service httpd status to view the running status of HTTPD
Use service httpd stop to stop httpd
Use service httpd start to launch httpd

3. View the PHP version information

If it is installed through Yum, or RPM package, you can use Rpm-qa |grep php to view;

Similarly, you can use Php-v to view PHP version information;



In general, mostly by installing lamp, use Phpinfo's test page to view the installed PHP information;

The specific method for the/var/www/under the new index.php file, the specific content is

<?php phpinfo ();? >

Can. Then add the index.php type in the/etc/httpd/conf/httpd.conf file and restart the httpd to get the following results.



4. View the MySQL version information

If it is installed through Yum, or the RPM package is installed, you can use Rpm-qa |grep mysql to view;


You can also use Mysql-v or--help|grep distrib to view;

You can also go to MySQL and then use the command Select version () to view;

or status; Command view.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.