{"id":9788,"date":"2017-10-30T09:07:42","date_gmt":"2017-10-30T02:07:42","guid":{"rendered":""},"modified":"2024-06-07T16:12:17","modified_gmt":"2024-06-07T09:12:17","slug":"huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos","status":"publish","type":"post","link":"https:\/\/vnso.vn\/en\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS"},"content":{"rendered":"<p>Trong b\u00e0i vi\u1ebft n\u00e0y m\u00ecnh s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n c\u00e1ch c\u00e0i \u0111\u1eb7t b\u1ed9 webserver n\u1ed5i ti\u1ebfng LEMP bao g\u1ed3m:\u00a0<strong>Linux + Nginx + MariaDB + PHP (PHP-FPM) tr\u00ean\u00a0CentOS 7\/6.5\/6.4\/6.3\/6.2\/6.1\/6\/5.10<\/strong>.<\/p>\n<p>\u2013 Nginx (\u0111\u1ecdc l\u00e0 Engine x) l\u00e0 m\u1ed9t webserver nh\u1ecf g\u1ecdn, \u00edt t\u1ed1n RAM, m\u1ea1nh m\u1ebd v\u00e0 c\u00f3 hi\u1ec7u su\u1ea5t ho\u1ea1t \u0111\u1ed9ng cao.<\/p>\n<p>\u2013 PHP h\u1ed7 tr\u1ee3 c\u00e1c phi\u00ean b\u1ea3n 5.3, 5.4, 5.5, 5.6, 7.0<\/p>\n<p><!--more--><\/p>\n<p>\u2013 MariaDB l\u00e0 phi\u00ean b\u1ea3n m\u00e3 ngu\u1ed3n m\u1edf c\u1ee7a MySQL, ho\u1ea1t \u0111\u1ed9ng gi\u1ed1ng h\u1ec7t MySQL. B\u1eaft \u0111\u1ea7u t\u1eeb\u00a0CentOS 7 m\u1eb7c \u0111\u1ecbnh \u0111\u00e3 b\u1eaft \u0111\u1ea7u\u00a0h\u1ed7 tr\u1ee3 MariaDB, c\u00e1c b\u1ea1n n\u00ean s\u1eed d\u1ee5ng thay cho MySQL ngay t\u1eeb b\u00e2y gi\u1edd.<\/p>\n<h2>I. C\u00e0i \u0111\u1eb7t Nginx v\u00e0 PHP tr\u00ean\u00a0CentOS 7\/6.5\/5.10<\/h2>\n<p>\u0110\u1ea7u ti\u00ean b\u1ea1n c\u1ea7n chu\u1ea9n b\u1ecb m\u1ed9t server CentOS m\u1edbi tinh ch\u01b0a c\u00e0i g\u00ec c\u1ea3.\u00a0Ki\u1ec3m tra l\u1ea1i xem\u00a0hostname v\u00e0 file host\u00a0\u0111\u00e3 ch\u00ednh x\u00e1c ch\u01b0a tr\u01b0\u1edbc khi b\u1eaft \u0111\u1ea7u.<\/p>\n<p>C\u00e1c thao t\u00e1c th\u1ef1c hi\u1ec7n b\u1eb1ng d\u00f2ng l\u1ec7nh, s\u1eed d\u1ee5ng tool\u00a0ZOC Terminal\u00a0v\u00e0\u00a0nano.<\/p>\n<h3>1. Th\u00eam repo c\u1ea7n thi\u1ebft<\/h3>\n<p><strong>CentOS 7\/6.5\/5.10 EPEL\u00a0repository<\/strong><\/p>\n<pre>yum install epel-release<\/pre>\n<p><strong>CentOS 7\/6.5\/5.10 Remi\u00a0repository<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nrpm -Uvh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-7.rpm\r\n\r\n## CentOS 6 ##\r\nrpm -Uvh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm\r\n\r\n## CentOS 5 ##\r\nrpm -Uvh http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-5.rpm<\/pre>\n<p><strong>CentOS 7\/6.5\/5.10\u00a0Nginx repository<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nrpm -Uvh http:\/\/nginx.org\/packages\/centos\/7\/noarch\/RPMS\/nginx-release-centos-7-0.el7.ngx.noarch.rpm\r\n\r\n## CentOS 6 ##\r\nrpm -Uvh http:\/\/nginx.org\/packages\/centos\/6\/noarch\/RPMS\/nginx-release-centos-6-0.el6.ngx.noarch.rpm\r\n\r\n## CentOS 5 ##\r\nrpm -Uvh http:\/\/nginx.org\/packages\/centos\/5\/noarch\/RPMS\/nginx-release-centos-5-0.el5.ngx.noarch.rpm<\/pre>\n<h3>2. C\u00e0i \u0111\u1eb7t Nginx, PHP<\/h3>\n<p>CentOS 7\/6.5\/5.10<\/p>\n<pre>## PHP 5.3 ##\r\nyum install -y nginx php-fpm php-common\r\n\r\n## PHP 5.4 ##\r\nyum --enablerepo=remi install -y nginx php-fpm php-common\r\n\r\n## PHP 5.5 ##\r\nyum --enablerepo=remi,remi-php55 install -y nginx php-fpm php-common\r\n\r\n## PHP 5.6 ##\r\nyum --enablerepo=remi,remi-php56 install -y nginx php-fpm php-common\r\n\r\n## PHP 7.0 ##\r\nyum --enablerepo=remi,remi-php70 install -y nginx php-fpm php-common\r\n\r\n## PHP 7.1 ##\r\nyum --enablerepo=remi,remi-php71 install -y nginx php-fpm php-common\r\n<\/pre>\n<h3>3. C\u00e0i \u0111\u1eb7t\u00a0PHP\u00a0module<\/h3>\n<p>M\u1ed9t s\u1ed1 module PHP th\u00f4ng d\u1ee5ng:<\/p>\n<ul>\n<li><strong>OPcache (php-opcache)<\/strong>\u00a0\u2013 The Zend OPcache provides faster PHP execution through opcode caching and optimization.<\/li>\n<li><strong>APCu (php-pecl-apc)<\/strong>\u00a0\u2013 APCu userland caching<\/li>\n<li><strong>CLI (php-cli)<\/strong>\u00a0\u2013 Command-line interface for PHP<\/li>\n<li><strong>PEAR (php-pear)<\/strong>\u00a0\u2013 PHP Extension and Application Repository framework<\/li>\n<li><strong>PDO (php-pdo)<\/strong>\u00a0\u2013 A database access abstraction module for PHP applications<\/li>\n<li><strong>MySQL (php-mysqlnd)<\/strong>\u00a0\u2013 A module for PHP applications that use MySQL databases<\/li>\n<li><strong>PostgreSQL (php-pgsql)<\/strong>\u00a0\u2013 A PostgreSQL database module for PHP<\/li>\n<li><strong>MongoDB (php-pecl-mongo)<\/strong>\u00a0\u2013 PHP MongoDB database driver<\/li>\n<li><strong>SQLite (php-pecl-sqlite)<\/strong>\u00a0\u2013 Extension for the SQLite Embeddable SQL Database Engine<\/li>\n<li><strong>Memcache (php-pecl-memcache)<\/strong>\u00a0\u2013 Extension to work with the Memcached caching daemon<\/li>\n<li><strong>Memcached (php-pecl-memcached)<\/strong>\u00a0\u2013 Extension to work with the Memcached caching daemon<\/li>\n<li><strong>GD (php-gd)<\/strong>\u00a0\u2013 A module for PHP applications for using the gd graphics library<\/li>\n<li><strong>XML (php-xml)<\/strong>\u00a0\u2013 A module for PHP applications which use XML<\/li>\n<li><strong>MBString (php-mbstring)<\/strong>\u00a0\u2013 A module for PHP applications which need multi-byte string handling<\/li>\n<li><strong>MCrypt (php-mcrypt)<\/strong>\u00a0\u2013 Standard PHP module provides mcrypt library support<\/li>\n<\/ul>\n<p>\u0110\u1ec3 c\u00e0i \u0111\u1eb7t b\u1ea1n h\u00e3y s\u1eed d\u1ee5ng l\u1ec7nh\u00a0<code>yum --enablerepo=remi,remi-php56 install ten_module<\/code>. V\u00ed d\u1ee5:<\/p>\n<pre>yum --enablerepo=remi,remi-php56 install -y php-opcache php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-pecl-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml<\/pre>\n<h3>4. Stop httpd (Apache) server, Start Nginx v\u00e0\u00a0PHP-FPM<\/h3>\n<p><strong>Stop httpd (Apache)<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nsystemctl stop httpd.service\r\n\r\n## CentOS 6.5\/5.10 ##\r\nservice httpd stop<\/pre>\n<p><strong>Start Nginx<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nsystemctl start nginx.service\r\n \r\n## CentOS 6.5\/5.10 ##\r\nservice nginx start<\/pre>\n<p><strong>Start PHP-FPM<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nsystemctl start php-fpm.service\r\n\r\n## CentOS 6.5\/5.10 ##\r\nservice php-fpm start<\/pre>\n<h3>5. T\u1ef1 \u0111\u1ed9ng kh\u1edfi \u0111\u1ed9ng\u00a0Nginx, PHP-FPM v\u00e0 t\u1eaft\u00a0httpd<\/h3>\n<p><strong>T\u1eaft\u00a0httpd (Apache) khi boot<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nsystemctl disable httpd.service\r\n\u00a0\r\n## CentOS 6.5\/5.10 ##\r\nchkconfig httpd off<\/pre>\n<p><strong>Autostart Nginx<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nsystemctl enable nginx.service\r\n\u00a0\r\n## CentOS 6.5\/5.10 ##\r\nchkconfig --add nginx\r\nchkconfig --levels 235 nginx on<\/pre>\n<p><strong>Autostart PHP-FPM<\/strong><\/p>\n<pre>## CentOS 7 ##\r\nsystemctl enable php-fpm.service\r\n\u00a0\r\n## CentOS 6.5\/5.10 ##\r\nchkconfig --add php-fpm\r\nchkconfig --levels 235 php-fpm on<\/pre>\n<h3>6. C\u1ea5u h\u00ecnh Nginx v\u00e0 PHP-FPM<\/h3>\n<p><strong>C\u1ea5u h\u00ecnh Nginx<\/strong><\/p>\n<p>\u2013 Thay \u0111\u1ed5i\u00a0worker_processes<\/p>\n<pre>nano \/etc\/nginx\/nginx.conf<\/pre>\n<p>Ch\u1ec9nh\u00a0worker_processes b\u1eb1ng v\u1edbi s\u1ed1 processor VPS c\u1ee7a b\u1ea1n<\/p>\n<p>\u2013 C\u1ea5u h\u00ecnh nginx virtual hosts<\/p>\n<pre>nano \/etc\/nginx\/conf.d\/default.conf<\/pre>\n<p>B\u1ea1n thay \u0111\u1ed5i th\u00f4ng tin nh\u01b0 b\u00ean d\u01b0\u1edbi:<\/p>\n<pre>#\r\n# The default server\r\n#\r\nserver {\r\n    listen       80;\r\n    server_name example.com;\r\n\r\n    location \/ {\r\n        root   \/usr\/share\/nginx\/html;\r\n        index index.php index.html index.htm;\r\n        try_files $uri $uri\/ \/index.php?q=$uri&amp;$args;\r\n    }\r\n\r\n    error_page  404              \/404.html;\r\n    location = \/404.html {\r\n        root   \/usr\/share\/nginx\/html;\r\n    }\r\n\r\n    error_page   500 502 503 504  \/50x.html;\r\n    location = \/50x.html {\r\n        root   \/usr\/share\/nginx\/html;\r\n    }\r\n\r\n    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\r\n    #\r\n    location ~ \\.php$ {\r\n        root           \/usr\/share\/nginx\/html;\r\n        fastcgi_pass   127.0.0.1:9000;\r\n        fastcgi_index  index.php;\r\n        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;\r\n        include        fastcgi_params;\r\n    }\r\n}<\/pre>\n<p>C\u00e1c \u0111o\u1ea1n b\u00f4i \u0111\u1ecf l\u00e0 c\u1ea7n ph\u1ea3i thay \u0111\u1ed5i.<\/p>\n<p>\u2013 Restart Nginx<\/p>\n<pre>## CentOS 7 ##\r\nsystemctl restart nginx.service\r\n \r\n## CentOS 6.5\/5.10 ##\r\nservice nginx restart<\/pre>\n<p><strong>C\u1ea5u h\u00ecnh PHP-FPM<\/strong><\/p>\n<p>\u2013 Ch\u1ec9nh user v\u00e0 group<\/p>\n<pre>nano \/etc\/php-fpm.d\/www.conf<\/pre>\n<p>Thay user v\u00e0 group = apache sang nginx<\/p>\n<pre> [...]\r\n ; Unix user\/group of processes\r\n ; Note: The user is mandatory. If the group is not set, the default user's group\r\n ; will be used.\r\n ; RPM: apache Choosed to be able to access some dir as httpd\r\n user = nginx\r\n ; RPM: Keep a group allowed to write in log dir.\r\n group = nginx\r\n [...]<\/pre>\n<p>\u2013 Restart\u00a0PHP-FPM<\/p>\n<pre>## CentOS 7 ##\r\nsystemctl restart php-fpm.service\r\n\r\n## CentOS 6.5\/5.10 ##\r\nservice php-fpm restart<\/pre>\n<h3>7. Test c\u1ea5u h\u00ecnh Nginx v\u00e0 PHP-FPM<\/h3>\n<pre>nano \/usr\/share\/nginx\/html\/info.php<\/pre>\n<p>Th\u00eam \u0111o\u1ea1n sau v\u00e0o<\/p>\n<pre>&lt;?php\r\nphpinfo();\r\n?&gt;<\/pre>\n<p>Test th\u1eed b\u1eb1ng link: http:\/\/&lt;ip-address&gt;\/info.php. N\u1ebfu b\u1ea1n th\u1ea5y th\u00f4ng tin v\u1ec1 PHP hi\u1ec7n ra th\u00ec \u0111\u00e3 c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng.<\/p>\n<p><strong>L\u01b0u \u00fd<\/strong>:\u00a0n\u1ebfu b\u1ea1n truy c\u1eadp th\u1eb3ng v\u00e0o IP m\u00e0 b\u00e1o l\u1ed7i kh\u00f4ng k\u1ebft n\u1ed1i \u0111\u01b0\u1ee3c th\u00ec h\u00e3y open port http:<\/p>\n<pre>service iptables start\r\niptables -I INPUT -p tcp --dport 80 -j ACCEPT\r\nservice iptables save\r\nservice iptables restart<\/pre>\n<h2>II. C\u00e0i \u0111\u1eb7t MariaDB\u00a0tr\u00ean\u00a0CentOS 7\/6.5\/5.10<\/h2>\n<h3>\u00a01. Th\u00eam MariaDB repo<\/h3>\n<p><strong>L\u01b0u \u00fd<\/strong>: Kh\u00f4ng c\u1ea7n th\u1ef1c hi\u1ec7n tr\u00ean CentOS 7. Phi\u00ean b\u1ea3n MariaDB tr\u00ean CentOS 7 hi\u1ec7n nay l\u00e0\u00a05.5.37<\/p>\n<pre>## CentOS 6\/5 MariaDB 5.5 ##\r\nwget -O \/etc\/yum.repos.d\/MariaDB.repo http:\/\/mariadb.if-not-true-then-false.com\/centos\/$(rpm -E %centos)\/$(uname -i)\/5\r\n\r\n## CentOS 6\/5 MariaDB 10.0 ##\r\nwget -O \/etc\/yum.repos.d\/MariaDB.repo http:\/\/mariadb.if-not-true-then-false.com\/centos\/$(rpm -E %centos)\/$(uname -i)\/10<\/pre>\n<h3>2. C\u00e0i \u0111\u1eb7t ho\u1eb7c update MariaDB<\/h3>\n<pre>## CentOS 7 ##\r\nyum install -y mariadb mariadb-server\r\n\r\n## CentOS 6.5\/5.10 ##\r\nyum install -y MariaDB MariaDB-server<\/pre>\n<h3>3. Kh\u1edfi \u0111\u1ed9ng MariaDB v\u00e0 t\u1ef1 \u0111\u1ed9ng ch\u1ea1y khi boot<\/h3>\n<pre>## CentOS 7 ##\r\nsystemctl start mariadb.service\r\nsystemctl enable mariadb.service\r\n\r\n## CentOS 6.5\/5.10 ##\r\nservice mysql start\r\nchkconfig --levels 235 mysql on<\/pre>\n<h3>4. C\u1ea5u h\u00ecnh\u00a0MariaDB<\/h3>\n<ul>\n<li>Set (Change) root password<\/li>\n<li>Remove anonymous users<\/li>\n<li>Disallow root login remotely<\/li>\n<li>Remove test database and access to it<\/li>\n<li>Reload privilege tables<\/li>\n<\/ul>\n<p>\u2013 B\u1eaft \u0111\u1ea7u c\u00e0i \u0111\u1eb7t<\/p>\n<pre>\/usr\/bin\/mysql_secure_installation<\/pre>\n<p>Ngay b\u01b0\u1edbc \u0111\u1ea7u ti\u00ean b\u1ea1n s\u1ebd b\u1ecb h\u1ecfi root password, do m\u1edbi c\u00e0i \u0111\u1eb7t n\u00ean t\u1ea5t nhi\u00ean ch\u01b0a c\u00f3 password, nh\u1ea5n Enter \u0111\u1ec3 ti\u1ebfp t\u1ee5c.<\/p>\n<p>\u2013 Output t\u01b0\u01a1ng t\u1ef1 nh\u01b0 sau:<\/p>\n<pre>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB\r\nSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!\r\n\r\nIn order to log into MariaDB to secure it, we\\'ll need the current\r\npassword for the root user. If you\\'ve just installed MariaDB, and\r\nyou haven\\'t set the root password yet, the password will be blank,\r\nso you should just press enter here.\r\n\r\nEnter current password for root (enter for none):\r\nOK, successfully used password, moving on...\r\n\r\nSetting the root password ensures that nobody can log into the MariaDB\r\nroot user without the proper authorisation.\r\n\r\nSet root password? [Y\/n] y\r\nNew password:\r\nRe-enter new password:\r\nPassword updated successfully!\r\nReloading privilege tables..\r\n... Success!\r\n\r\n\r\nBy default, a MariaDB installation has an anonymous user, allowing anyone\r\nto log into MariaDB without having to have a user account created for\r\nthem. This is intended only for testing, and to make the installation\r\ngo a bit smoother. You should remove them before moving into a\r\nproduction environment.\r\n\r\nRemove anonymous users? [Y\/n] y\r\n... Success!\r\n\r\nNormally, root should only be allowed to connect from \\'localhost\\'. This\r\nensures that someone cannot guess at the root password from the network.\r\n\r\nDisallow root login remotely? [Y\/n] y\r\n... Success!\r\n\r\nBy default, MariaDB comes with a database named \\'test\\' that anyone can\r\naccess. This is also intended only for testing, and should be removed\r\nbefore moving into a production environment.\r\n\r\nRemove test database and access to it? [Y\/n] y\r\n- Dropping test database...\r\n... Success!\r\n- Removing privileges on test database...\r\n... Success!\r\n\r\nReloading the privilege tables will ensure that all changes made so far\r\nwill take effect immediately.\r\n\r\nReload privilege tables now? [Y\/n] y\r\n... Success!\r\n\r\nCleaning up...\r\n\r\nAll done! If you\\'ve completed all of the above steps, your MariaDB\r\ninstallation should now be secure.\r\n\r\nThanks for using MariaDB!<\/pre>\n<p>Nh\u01b0 v\u1eady l\u00e0 b\u1ea1n \u0111\u00e3 ho\u00e0n th\u00e0nh vi\u1ec7c c\u00e0i \u0111\u1eb7t LEMP stack tr\u00ean CentOS r\u1ed3i \u0111\u00f3.<\/p>","protected":false},"excerpt":{"rendered":"<p>Trong b\u00e0i vi\u1ebft n\u00e0y m\u00ecnh s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n c\u00e1ch c\u00e0i \u0111\u1eb7t b\u1ed9 webserver n\u1ed5i ti\u1ebfng LEMP bao g\u1ed3m:\u00a0Linux + Nginx + MariaDB + PHP (PHP-FPM) tr\u00ean\u00a0CentOS 7\/6.5\/6.4\/6.3\/6.2\/6.1\/6\/5.10. \u2013 Nginx (\u0111\u1ecdc l\u00e0 Engine x) l\u00e0 m\u1ed9t webserver nh\u1ecf g\u1ecdn, \u00edt t\u1ed1n RAM, m\u1ea1nh m\u1ebd v\u00e0 c\u00f3 hi\u1ec7u su\u1ea5t ho\u1ea1t \u0111\u1ed9ng cao. \u2013 PHP h\u1ed7 [&hellip;]<\/p>","protected":false},"author":1,"featured_media":10853,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[206,21,17],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.3 (Yoast SEO v22.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS | C\u00d4NG NGH\u1ec6 VNSO\u2122<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vnso.vn\/en\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS\" \/>\n<meta property=\"og:description\" content=\"Trong b\u00e0i vi\u1ebft n\u00e0y m\u00ecnh s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n c\u00e1ch c\u00e0i \u0111\u1eb7t b\u1ed9 webserver n\u1ed5i ti\u1ebfng LEMP bao g\u1ed3m:\u00a0Linux + Nginx + MariaDB + PHP (PHP-FPM) tr\u00ean\u00a0CentOS 7\/6.5\/6.4\/6.3\/6.2\/6.1\/6\/5.10. \u2013 Nginx (\u0111\u1ecdc l\u00e0 Engine x) l\u00e0 m\u1ed9t webserver nh\u1ecf g\u1ecdn, \u00edt t\u1ed1n RAM, m\u1ea1nh m\u1ebd v\u00e0 c\u00f3 hi\u1ec7u su\u1ea5t ho\u1ea1t \u0111\u1ed9ng cao. \u2013 PHP h\u1ed7 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vnso.vn\/en\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"C\u00d4NG NGH\u1ec6 VNSO\u2122\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/VNSO.VN\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-30T02:07:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-07T09:12:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"847\" \/>\n\t<meta property=\"og:image:height\" content=\"377\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"quocvu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"quocvu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\"},\"author\":{\"name\":\"quocvu\",\"@id\":\"https:\/\/vnso.vn\/#\/schema\/person\/d2e01da61bbe4e9cdad491a13585c000\"},\"headline\":\"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS\",\"datePublished\":\"2017-10-30T02:07:42+00:00\",\"dateModified\":\"2024-06-07T09:12:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\"},\"wordCount\":768,\"publisher\":{\"@id\":\"https:\/\/vnso.vn\/#organization\"},\"image\":{\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg\",\"articleSection\":[\"H\u01b0\u1edbng d\u1eabn Cloud VPS\",\"Server Dedicated (M\u00e1y ch\u1ee7 ri\u00eang)\",\"Th\u00f4ng tin chung\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\",\"url\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\",\"name\":\"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS | C\u00d4NG NGH\u1ec6 VNSO\u2122\",\"isPartOf\":{\"@id\":\"https:\/\/vnso.vn\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg\",\"datePublished\":\"2017-10-30T02:07:42+00:00\",\"dateModified\":\"2024-06-07T09:12:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage\",\"url\":\"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg\",\"contentUrl\":\"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg\",\"width\":847,\"height\":377,\"caption\":\"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trang ch\u1ee7\",\"item\":\"https:\/\/vnso.vn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vnso.vn\/#website\",\"url\":\"https:\/\/vnso.vn\/\",\"name\":\"C\u00d4NG NGH\u1ec6 VNSO\u2122\",\"description\":\"Private Cloud, VPS, Server v\u00e0 Gi\u1ea3i ph\u00e1p CNTT\",\"publisher\":{\"@id\":\"https:\/\/vnso.vn\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vnso.vn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/vnso.vn\/#organization\",\"name\":\"C\u00d4NG NGH\u1ec6 VNSO\u2122\",\"url\":\"https:\/\/vnso.vn\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vnso.vn\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/vnso.vn\/wp-content\/uploads\/2024\/06\/VNSO-Logo-Social-2024.png\",\"contentUrl\":\"https:\/\/vnso.vn\/wp-content\/uploads\/2024\/06\/VNSO-Logo-Social-2024.png\",\"width\":1200,\"height\":1200,\"caption\":\"C\u00d4NG NGH\u1ec6 VNSO\u2122\"},\"image\":{\"@id\":\"https:\/\/vnso.vn\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/VNSO.VN\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/vnso.vn\/#\/schema\/person\/d2e01da61bbe4e9cdad491a13585c000\",\"name\":\"quocvu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vnso.vn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/05192d775e8ae6de4f4c2fec17bf7605?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/05192d775e8ae6de4f4c2fec17bf7605?s=96&d=mm&r=g\",\"caption\":\"quocvu\"},\"url\":\"https:\/\/vnso.vn\/en\/author\/quocvu\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS | C\u00d4NG NGH\u1ec6 VNSO\u2122","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vnso.vn\/en\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/","og_locale":"en_US","og_type":"article","og_title":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS","og_description":"Trong b\u00e0i vi\u1ebft n\u00e0y m\u00ecnh s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n c\u00e1ch c\u00e0i \u0111\u1eb7t b\u1ed9 webserver n\u1ed5i ti\u1ebfng LEMP bao g\u1ed3m:\u00a0Linux + Nginx + MariaDB + PHP (PHP-FPM) tr\u00ean\u00a0CentOS 7\/6.5\/6.4\/6.3\/6.2\/6.1\/6\/5.10. \u2013 Nginx (\u0111\u1ecdc l\u00e0 Engine x) l\u00e0 m\u1ed9t webserver nh\u1ecf g\u1ecdn, \u00edt t\u1ed1n RAM, m\u1ea1nh m\u1ebd v\u00e0 c\u00f3 hi\u1ec7u su\u1ea5t ho\u1ea1t \u0111\u1ed9ng cao. \u2013 PHP h\u1ed7 [&hellip;]","og_url":"https:\/\/vnso.vn\/en\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/","og_site_name":"C\u00d4NG NGH\u1ec6 VNSO\u2122","article_publisher":"https:\/\/www.facebook.com\/VNSO.VN","article_published_time":"2017-10-30T02:07:42+00:00","article_modified_time":"2024-06-07T09:12:17+00:00","og_image":[{"width":847,"height":377,"url":"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg","type":"image\/jpeg"}],"author":"quocvu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"quocvu","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#article","isPartOf":{"@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/"},"author":{"name":"quocvu","@id":"https:\/\/vnso.vn\/#\/schema\/person\/d2e01da61bbe4e9cdad491a13585c000"},"headline":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS","datePublished":"2017-10-30T02:07:42+00:00","dateModified":"2024-06-07T09:12:17+00:00","mainEntityOfPage":{"@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/"},"wordCount":768,"publisher":{"@id":"https:\/\/vnso.vn\/#organization"},"image":{"@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage"},"thumbnailUrl":"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg","articleSection":["H\u01b0\u1edbng d\u1eabn Cloud VPS","Server Dedicated (M\u00e1y ch\u1ee7 ri\u00eang)","Th\u00f4ng tin chung"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/","url":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/","name":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS | C\u00d4NG NGH\u1ec6 VNSO\u2122","isPartOf":{"@id":"https:\/\/vnso.vn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage"},"image":{"@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage"},"thumbnailUrl":"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg","datePublished":"2017-10-30T02:07:42+00:00","dateModified":"2024-06-07T09:12:17+00:00","breadcrumb":{"@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#primaryimage","url":"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg","contentUrl":"https:\/\/vnso.vn\/wp-content\/uploads\/2017\/10\/bai-1-gioi-thieu-serie-cai-dat-lemp-tren-centos7.jpg","width":847,"height":377,"caption":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP"},{"@type":"BreadcrumbList","@id":"https:\/\/vnso.vn\/huong-dan-cai-dat-lemp-linux-nginx-mariadb-php-tren-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/vnso.vn\/"},{"@type":"ListItem","position":2,"name":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LEMP (Linux, Nginx, MariaDB, PHP) tr\u00ean CentOS"}]},{"@type":"WebSite","@id":"https:\/\/vnso.vn\/#website","url":"https:\/\/vnso.vn\/","name":"C\u00d4NG NGH\u1ec6 VNSO\u2122","description":"Private Cloud, VPS, Server v\u00e0 Gi\u1ea3i ph\u00e1p CNTT","publisher":{"@id":"https:\/\/vnso.vn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vnso.vn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/vnso.vn\/#organization","name":"C\u00d4NG NGH\u1ec6 VNSO\u2122","url":"https:\/\/vnso.vn\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vnso.vn\/#\/schema\/logo\/image\/","url":"https:\/\/vnso.vn\/wp-content\/uploads\/2024\/06\/VNSO-Logo-Social-2024.png","contentUrl":"https:\/\/vnso.vn\/wp-content\/uploads\/2024\/06\/VNSO-Logo-Social-2024.png","width":1200,"height":1200,"caption":"C\u00d4NG NGH\u1ec6 VNSO\u2122"},"image":{"@id":"https:\/\/vnso.vn\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/VNSO.VN"]},{"@type":"Person","@id":"https:\/\/vnso.vn\/#\/schema\/person\/d2e01da61bbe4e9cdad491a13585c000","name":"quocvu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vnso.vn\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/05192d775e8ae6de4f4c2fec17bf7605?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/05192d775e8ae6de4f4c2fec17bf7605?s=96&d=mm&r=g","caption":"quocvu"},"url":"https:\/\/vnso.vn\/en\/author\/quocvu\/"}]}},"_links":{"self":[{"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/posts\/9788"}],"collection":[{"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/comments?post=9788"}],"version-history":[{"count":0,"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/posts\/9788\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/media\/10853"}],"wp:attachment":[{"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/media?parent=9788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/categories?post=9788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vnso.vn\/en\/wp-json\/wp\/v2\/tags?post=9788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}