How to find out the centos version from the console. CentOS and how to update it

💖 Do you like it? Share the link with your friends

OpenVZ is an implementation of virtualization technology at the operating system, which is based on the Linux kernel. OpenVZ allows you to run multiple isolated copies of the operating system on one physical server, called Virtual Private Servers (VPS) or Virtual Environments (VE).

Since OpenVZ is based on the Linux kernel, unlike virtual machines (e.g. VMware) or paravirtualization technologies (e.g. Xen), only Linux distributions. However, virtualization at the operating system level in OpenVZ gives better performance, scalability, placement density, dynamic resource management, and ease of administration than alternative solutions.

Squid is a software package that implements the function of a caching proxy server for the HTTP, FTP, Gopher and (if configured appropriately) HTTPS protocols. Developed by the community as an open source program (distributed under the GNU GPL). All requests are executed as one non-blocking I/O process.

Used in UNIX-like systems and OS Windows family N.T. Has the ability to interact with Active Directory Windows Server by authentication via LDAP, which allows you to use restrictions on access to Internet resources for users who have Accounts on Windows Server, it also allows you to organize “slicing” of Internet traffic for different users. The Squid server has been developing for many years.

Xen is a cross-platform hypervisor developed at the University of Cambridge Computer Laboratory and distributed under the GPL license. Main features: support for paravirtualization mode in addition to hardware virtualization, minimal code of the hypervisor itself due to the removal of the maximum number of components outside the hypervisor.

Virtual machine technology allows you to expand the functionality of your equipment in the following ways:

  • The virtual machine has performance comparable to the real one.
  • Possibility of running migration virtual machine between physical machines.
  • Good hardware support (most Linux device drivers supported)
  • Ability to create a sandbox, rebootable device drivers.

Samba is a program that allows you to access network drives on various operating systems via the SMB/CIFS protocol. It has client and server parts. Is free software, released under the GPL license.

Samba runs on most Unix-like systems, such as Linux, POSIX-compliant Solaris and Mac OS X Server, on various options BSD; The Samba client, which is a plugin for the virtual file system NetDrive. Samba is included in almost all Linux distributions.

Web server control panel is server software for server administration through a web interface convenient for unskilled users. Among the main functions of control panels it should be noted:

  • Creating users, ftp accounts
  • Website management
  • Setting up a DNS server
  • Mail server management

Virtual and dedicated servers are sweeping the web and becoming not only fashionable, but also affordable. The most popular operating system for hosting is CentOS. And in order not to get confused in the abundance of terms and recommendations, I have put together a short educational program from A to Z. Which will allow even a beginner to properly configure and get the most out of a CentOS-based server.

What is CentOS. Advantages and disadvantages.

Essentially CentOS Linux is RedHat Enterprise Linux, from which only commercial ones have been removed closed programs. RedHat Enterprise Linux is Linux for enterprises from RadHat. They are targeting corporate users, for whom stability and support are primarily important. Therefore, using free CentOS you get a very stable Linux distribution.
What then is the minus of CentOS? The only disadvantage of CentOS is the lack of support from RedHat. More precisely from RedHat employees. But how often do you buy a licensed operating system? Windows system Are you asking MicroSoft for help? Maximum to the activation center, and then only when problems arise, which extremely rarely happens to legal users.
Therefore, the lack of RedHat support does not in any way affect the security and stability of the CentOS operating system. Moreover, your CentOS-based server will regularly receive updates and, if necessary, security patches from official sources.

From words to deeds

And so, you have a dedicated server with a pre-installed CentOS operating system with access via SSH.

Inexpensive, but very tasty dedicated servers can be purchased from the company Adman. Those who are especially thrifty can get virtual dedicated server completely free. To do this, it is enough to have a working website.

How to find out which CentOS operating system is installed on the server

Everyone knows the standard command uname, which together with the parameter -A will display information about the installed operating system. But if in FreeBSD the answer contains the version of the installed OS, then in CentOS you will only get Linux version. But the complete data about the installed operating system, as is standard in RedHat, is stored in a file /etc/redhat-release. Therefore, to find out the version of CentOS installed on the server, you need to run the command in the console:

Cat /etc/redhat-release

To which the CentOS command interpreter will give you something like the following:

CentOS release 6.1 (Final)

How to update the CentOS operating system

Updating CentOS within a subversion, for example from 6.1 to 6.3, comes down to one command:
yum update
If the past of the CentOS operating system is unknown to you, then it is better to update as follows:

Yum clean all yum update

During the update process, you will sometimes have to answer relevant questions Yes.
You can use the parameter -y so that the system does not pester you with stupid questions, and always answers them yes.

Yum -y update

The installation process may take several hours depending on the freshness of the operating system and server performance.
After the update is complete, enjoy the result by entering the command:

Cat /etc/redhat-release

and receiving the answer:

CentOS release 6.3 (Final)

For the purity of the experiment, it is useful to restart the server.

PHP is one of the programming languages ​​and it is used to create dynamic pages. Most scripts require a certain version of PHP, and not always the latest one. Obviously, for the stable operation of your site, the hosting you choose must support the PHP version that is necessary for the correct execution of the scripts you need.

If you are interested VDS server rental, then our specialists will be happy to set up the server and install any version of PHP.

How to find out the PHP version on your hosting? This can be done different ways, and we will consider the simplest and most convenient of them below.

How to find out the PHP version of a site: method one

To find out the PHP version on your server, follow these steps:

  • open any text editor;
  • create a new file and enter the line into it: php echo phpversion();
  • save your file with the extension .php;
  • upload it to the site;
  • enter the following into the address bar of your browser: site_name/phpversion.php, where site_name is Domain name your site, and phpversion.php is the name of the saved file.

After this, a number should appear on your screen, which will indicate the version of PHP installed on this moment. If instead of a number you see source- this means that PHP is not supported on your site. This phenomenon is rare on modern hosting, but you should keep in mind that such a result is also possible.

There is another version of this method, how to find out the PHP version on the server: instead of the line php echo phpversion() you can write, the rest of the actions are the same. In this case, on your screen when accessing this file Not only the version will be displayed, but also all existing parameters of the PHP version installed on your site.

Second way. How to find out the PHP version: Centos, Debian, Windows

Unfortunately, it is not always possible to create a file and upload it to the server. In such cases you can use command line or console, and this method is also quite simple and no less effective.

How to view the PHP version (Linux, Windows):

  1. Launch the command line (for Windows) or the console (for Unix systems).
  2. Make an SSH connection to the server.
  3. Execute a request like: php -v.

The answer to this query will allow you to find out the PHP version for Debian, Centos and other Unix systems and Windows.

By the way, we now have dedicated servers on Windows and we can install any version of PHP for you.

Of course, if you are interested quick way, how to check which version of PHP is on the servers of the hoster you are interested in, then you can do the obvious thing: look on the website of the hosting provider. It may turn out that such information is not freely available - in this case, it makes sense to contact technical support and get answers to all your questions.

And if you are looking for reliable hosting with modern software, then you will definitely like RigWEB. We offer you:

We value every client, so we are ready to offer a suitable rate both for creating the first project of a novice webmaster, and for hosting dozens or hundreds of web resources for experienced developers. At the same time, we take care of the consistently beneficial ratio of hosting quality and cost for our users. We also delight our clients with regular promotions and discounts that will allow you to order our services at an even more favorable price.

  • Uptime 99.9%

We guarantee server availability around the clock and notify you in advance of scheduled maintenance. Our server equipment is located in a modern data center and is under constant supervision of qualified specialists, so you can be confident in the stability of your rented hosting.

  • Prompt and polite 24/7 technical support

Any request you have regarding working with a website or hosting will be processed within 30 minutes by our technical support specialist at any time of the day. So if you don’t know how to find out the PHP version on Centos when working with a rented server, our technical support will help you!

Use professional hosting from RigWEB and create interesting, technologically advanced and attractive web projects for users, because we will provide you with the most comfortable conditions for this at an adequate price!



tell friends