How to check the versions of Linux, Apache, MySQL and PHP

零到壹度
Release: 2023-03-23 15:36:02
Original
2512 people have browsed it


This article shares with you how to check the versions of Linux, Apache, MySQL, and PHP. It has certain reference value. If necessary Friends can refer to

Essence:

Check the Apache version under linux httpd -v

Check the PHP version under linux php -v

Check the mysql version under linux mysql -V (capital V)

1. View Linux kernel version, system information, there are three commonly used methods:

uname -a;

##more /etc/issue;

cat /proc/version;


##2. View apache The version information

If it is installed through yum or rpm, you can use rpm -qa |gerp httpd to view it;


You can also query through httpd -v;



##Of course, after installing apache, you can directly elink loopback to view apache information.


Use service httpd status to check the running status of httpdUse service httpd stop to stop httpd
Use service httpd start can start httpd

3. Check the version information of phpif It is installed through yum or rpm package. You can use rpm -qa |grep php to view;

Similarly, you can also use php -v to view php version information;



# Under normal circumstances, most of them are installed by lamp Finally, use the test page of phpinfo to check the information of the installed PHP;

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

<?
php phpinfo();
?>
Copy after login

That’s it. Then add the index.php type to the /etc/httpd/conf/httpd.conf file, and then restart httpd to get the following results.



##4. Check the version information of mysql

If it is installed through yum or rpm package, you can use rpm -qa |grep mysql to view;


You can also use mysql -V or --help|grep Distrib to view;

You can also enter mysql and then use the command select version(); to view;

or status; command to view.


The above is the detailed content of How to check the versions of Linux, Apache, MySQL and PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!