
Bài viết này sẽ nói về lệnh cơ bản để check phiên bản Nginx và Php, giúp chúng ta biết được VPS của mình đã được cập nhật lên phiên bản mới nhất chưa.
Mục Lục Nội Dung
Lệnh kiểm tra phiên bản PHP Trên VPS
Lệnh kiểm tra Php version
php -v
Kết quả:
[root@server1 ~]# php -v PHP 5.6.3 (cli) (built: Nov 16 2014 08:44:10) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
Nếu bạn không sử dụng Zend Opache thì sẽ không có dòng
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
Lệnh kiểm tra các module PHP được cài đặt trên VPS
php -m
Với VPS sử dụng VPSSIM để cài đặt và quản lý, ta sẽ được kết quả
[root@server1 ~]# php -m [PHP Modules] bcmath bz2 calendar Core ctype curl date dom enchant ereg exif fileinfo filter ftp gd gettext gmp hash iconv igbinary imap intl json libxml mbstring mcrypt memcache memcached mhash msgpack mysql mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix pspell readline Reflection session shmop SimpleXML snmp soap sockets SPL sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache
Cách Update PHP trong VPSSIM
- Để thay đổi phiên bản PHP ta sử dụng chức năng : Upgrade / Downgrade PHP
- Để update PHP ta làm như sau: VPSSIM menu ==> Tiện ích & Addons ==> Update System & Service ==> Update System ==> Điền Y và enter.
Lệnh kiểm tra phiên bản Nginx đang sử dụng trên VPS
Lệnh kiểm tra Nginx version
Để kiểm tra phiên bản Nginx đang sử dụng trên VPS ta sử dụng lệnh sau:
nginx -v
Nếu sử dụng VPSSIM cài đặt mặc định, ta sẽ được kết quả:
[root@server1 ~]# nginx -v nginx version: nginx/1.7.6
Nếu bạn update Nginx lên phiên bản 1.7.7 bằng chức năng update Nginx có sẵn trong VPSSIM, ta sẽ được kết quả:
[root@server1 ~]# nginx -v nginx version: nginx/1.7.7
Hiện tại Nginx đã có phiên bản 1.7.8, mình sẽ test xem tính tương thích ra sao, nếu okie các VPS đang sử dụng VPSSIM có thể update lên phiên bản mới nhất trong thời gian tới.
Lệnh kiểm tra các module nginx đã cài đặt trên VPS
nginx -V
ta sẽ được kết quả tương tự:
[root@server1 ~]# nginx -V nginx version: nginx/1.7.7 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) TLS SNI support enabled configure arguments: --group=nginx --user=nginx --pid-path=/var/run/nginx.pid --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --with-http_spdy_module --with-http_ssl_module --with-ipv6 --with-http_flv_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module --with-http_xslt_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_image_filter_module --with-http_perl_module --with-mail --add-module=/usr/local/vpssim/ngx_cache_purge-2.1 --add-module=/usr/local/vpssim/nginx-accesskey-2.0.3 --with-mail_ssl_module --with-http_gunzip_module --with-file-aio --with-pcre --with-google_perftools_module --with-debug --with-openssl-opt=enable-tlsext --conf-path=/etc/nginx/nginx.conf --with-http_gzip_static_module --with-http_realip_module --with-http_stub_status_module --add-module=/usr/local/vpssim/ngx_pagespeed-release-1.8.31.4-beta
Cách Update NGINX trong VPSSIM
Để update Nginx ta làm như sau: VPSSIM menu ==> Tiện ích & Addons ==> Update System & Service ==> Update System ==> Update Nginx ==>ĐiềnY và nhấn Enter.
Chờ một chút để VPSSIM update lên Nginx lên phiên bản mới nhất mà VPSSIM hỗ trợ. Nếu bạn đã update Nginx thì VPSSIM sẽ thông báo :
Xem thêm:
Chúc bạn thành công.