{"id":180,"date":"2011-07-21T17:58:07","date_gmt":"2011-07-21T10:58:07","guid":{"rendered":"http:\/\/www.cpanel.vn\/?p=180"},"modified":"2011-07-21T17:58:07","modified_gmt":"2011-07-21T10:58:07","slug":"huong-dan-cai-dat-lnmp","status":"publish","type":"post","link":"https:\/\/cpanel.vn\/?p=180","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t LNMP"},"content":{"rendered":"<p><strong>I. LNMP l\u00e0 g\u00ec??<\/strong><\/p>\n<p>LNMP (Linux &#8211; Nginx &#8211; MySQL &#8211; PHP) l\u00e0 m\u1ed9t g\u00f3i ph\u1ea7n m\u1ec1m \u0111\u00f3ng g\u00f3i. Ch\u1ec9 v\u1edbi m\u1ed9t click b\u1ea1n s\u1ebd trang b\u1ecb cho VPS\/Server c\u1ee7a m\u00ecnh \u0111\u1ea7y \u0111\u1ee7 c\u00e1c d\u1ecbch v\u1ee5 c\u1ea7n thi\u1ebft nh\u01b0 Nginx Weserver, PHP, mySQL, phpMyAdmin, eAccelerator, Pure-ftp. LNMP t\u01b0\u01a1ng th\u00edch v\u1edbi \u0111\u1ea1i \u0111a s\u1ed1 c\u00e1c distro Linux hi\u1ec7n t\u1ea1i nh\u01b0 CentOS, Ubuntu, RedHat, Debian, &#8230;<!--more--><\/p>\n<p><strong>II. T\u1ea1i sao ch\u00fang ta l\u1ea1i c\u1ea7n LNMP?<\/strong><\/p>\n<p>\u0110\u01a1n gi\u1ea3n th\u00f4i, thay v\u00ec vi\u1ec7c ng\u1ed3i g\u00f5 h\u00e0ng tr\u0103m c\u00e2u l\u1ec7nh \u0111\u1ec3 c\u00e0i c\u00e1c \u1ee9ng d\u1ee5ng tr\u00ean, b\u1ea1n ch\u1ec9 c\u1ea7n g\u00f5 3 l\u1ec7nh. Sau v\u00e0i ph\u00fat b\u1ea1n s\u1ebd c\u00f3 m\u1ed9t m\u00e1y ch\u1ee7 ho\u00e0n h\u1ea3o v\u1edbi \u0111\u1ea7y \u0111\u1ee7 c\u00e1c d\u1ecbch v\u1ee5. V\u00e0 b\u1ea1n s\u1eb5n s\u00e0ng \u0111\u1ec3 \u0111\u01b0a nh\u1eefng website c\u1ee7a b\u1ea1n h\u00f2a v\u00e0o m\u1ea1ng Internet to\u00e0n c\u1ea7u.<\/p>\n<p><strong>III. Chi ph\u00ed cho LNMP?<\/strong><\/p>\n<p>Tin vui cho ch\u00fang ta, LNMP ho\u00e0n to\u00e0n mi\u1ec5n ph\u00ed. B\u1ea1n c\u00f3 th\u1ec3 t\u1ea3i LNMP v\u1ec1 v\u00e0 c\u00e0i \u0111\u1eb7t m\u1ed9t c\u00e1ch t\u1ef1 \u0111\u1ed9ng, ho\u00e0n to\u00e0n nhanh ch\u00f3ng. N\u00f3 \u0111\u01b0\u1ee3c t\u1ed1i \u01b0u \u0111\u1ec3 b\u1ea1n ch\u1ea1y tr\u00ean c\u00e1c n\u1ec1n t\u1ea3ng VPS, \u0111\u1eb7c bi\u1ec7t l\u00e0 n\u1ec1n t\u1ea3ng VPS Lowend.<\/p>\n<p><strong>IV. Nh\u1eefng ph\u1ea7n m\u1ec1m n\u00e0o \u0111\u01b0\u1ee3c c\u00e0i tr\u00ean LNMP?<\/strong><\/p>\n<p>Nginx<br \/>\nMySQL<br \/>\nPHP<br \/>\nPHPMyAdmin<br \/>\nApache<br \/>\nZend Optimizer<br \/>\neAccelerator<br \/>\nionCube<br \/>\nPureFTPd<br \/>\nVsFTPd<\/p>\n<p><strong>V. LNMP y\u00eau c\u1ea7u c\u1ea5u h\u00ecnh h\u1ec7 th\u1ed1ng nh\u01b0 th\u1ebf n\u00e0o?<\/strong><\/p>\n<p>R\u1ea5t \u0111\u01a1n gi\u1ea3n, LNMP ch\u1ec9 c\u1ea7n b\u1ea1n c\u00f3 t\u1ed1i thi\u1ec3u 128MB RAM (v\u1edbi n\u1ec1n t\u1ea3ng OpenVZ b\u1ea1n c\u1ea7n nhi\u1ec1u h\u01a1n 192MB RAM) v\u00e0 2G \u1ed5 c\u1ee9ng. H\u1ea7u nh\u01b0 c\u00e1c VPS hi\u1ec7n nay \u0111\u1ec1u c\u00f3 t\u1ed1i thi\u1ec3u 256MB RAM tr\u1edf l\u00ean. cPanel.vn s\u1ebd gi\u1edbi thi\u1ec7u cho c\u00e1c b\u1ea1n m\u1ed9t v\u00e0i VPS ch\u1ea5t l\u01b0\u1ee3ng t\u1ed1t, gi\u00e1 h\u1ee3p l\u00fd (n\u1ebfu kh\u00f4ng mu\u1ed1n n\u00f3i l\u00e0 r\u1ebb trong m\u1ed9t b\u00e0i ti\u1ebfp \u0111\u00e2y).<\/p>\n<p><strong>VI. L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 c\u00e0i LNMP tr\u00ean m\u00e1y ch\u1ee7 VPS c\u1ee7a m\u00ecnh?<\/strong><\/p>\n<p>cPanel.vn s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n t\u1eebng b\u01b0\u1edbc c\u00e1ch c\u00e0i \u0111\u1eb7t LNMP.<\/p>\n<p style=\\\"padding-left: 30px;\\\"><span style=\\\"color: #993300;\\\"><em>1. Download LNMP<\/em><\/span><\/p>\n<p>Phi\u00ean b\u1ea3n hi\u1ec7n t\u1ea1i c\u1ee7a LNMP l\u00e0 0.7. B\u1ea1n v\u00e0o console v\u00e0 g\u00f5:<\/p>\n<blockquote><p>#wget -c http:\/\/soft.vpser.net\/lnmp\/lnmp0.7-full.tar.gz<\/p><\/blockquote>\n<p style=\\\"padding-left: 30px;\\\"><span style=\\\"color: #993300;\\\"><em>2. Gi\u1ea3i n\u00e9n LNMP<\/em><\/span><\/p>\n<blockquote><p>#tar -xvf lnmp0.7-full.tar.gz<\/p><\/blockquote>\n<p style=\\\"padding-left: 30px;\\\"><em><span style=\\\"color: #993300;\\\">3. Ti\u1ebfn h\u00e0nh c\u00e0i LNMP<\/span><\/em><\/p>\n<p>T\u1ea1i b\u01b0\u1edbc n\u00e0y, ph\u1ee5 thu\u1ed9c v\u00e0o vi\u1ec7c b\u1ea1n s\u1eed d\u1ee5ng distro Linux n\u00e0o m\u00e0 b\u1ea1n s\u1ebd ch\u1ea1y ch\u01b0\u01a1ng tr\u00ecnh c\u00e0i kh\u00e1c nhau. cPanel.vn s\u1eed d\u1ee5ng CentOS n\u00ean s\u1ebd ch\u1ea1y l\u1ec7nh:<\/p>\n<blockquote><p>#.\/centos.sh<\/p><\/blockquote>\n<p>B\u1ea1n s\u1ebd c\u1ea7n ph\u1ea3i nh\u1eadp m\u1ed9t v\u00e0i th\u00f4ng tin nh\u01b0 domain default, m\u1eadt kh\u1ea9u root c\u1ee7a mySQL. Th\u01b0 m\u1ee5c m\u1eb7c \u0111\u1ecbnh c\u1ee7a domain default l\u00e0 \/home\/wwwroot. Ti\u1ebfp \u0111\u00f3 b\u1ea1n ch\u1ec9 c\u1ea7n g\u00f5 ph\u00edm Enter v\u00e0i l\u1ea7n \u0111\u1ec3 ch\u01b0\u01a1ng tr\u00ecnh b\u1eaft \u0111\u1ea7u c\u00e0i \u0111\u1eb7t.<br \/>\nT\u1ef1 th\u01b0\u1edfng cho m\u00ecnh ly cafe khi ch\u1edd \u0111\u1ee3i nh\u00e9.<\/p>\n<p style=\\\"padding-left: 30px;\\\"><span style=\\\"color: #993300;\\\"><em>4. C\u00e1c \u1ee9ng d\u1ee5ng \u0111i k\u00e8m, t\u00f4i c\u00e0i nh\u01b0 th\u1ebf n\u00e0o?<\/em><\/span><\/p>\n<p>Sau b\u01b0\u1edbc tr\u00ean, b\u1ea1n \u0111\u00e3 c\u00f3 trong tay Nginx, PHP, mySQL, phpMyAdmin, Zend. N\u1ebfu b\u1ea1n c\u1ea7n th\u00eam eAccelerator hay PureFTP th\u00ec b\u1ea1n c\u1ea7n th\u00eam v\u00e0i ph\u00fat n\u1eefa.<br \/>\n&#8211; C\u00e0i eAccelerator, g\u00f5:<\/p>\n<blockquote><p>#.\/eaccelerator.sh<\/p><\/blockquote>\n<p>Ch\u01b0\u01a1ng tr\u00ecnh s\u1ebd t\u1ef1 \u0111\u1ed9ng c\u00e0i v\u00e0 kh\u1edfi \u0111\u1ed9ng l\u1ea1i c\u00e1c \u1ee9ng d\u1ee5ng \u0111\u1ec3 h\u1ec7 th\u1ed1ng nh\u1eadn d\u1ecbch v\u1ee5 m\u1edbi.<br \/>\n&#8211; C\u00e0i PureFTP, g\u00f5:<\/p>\n<blockquote><p>#.\/pureftpd.sh<\/p><\/blockquote>\n<p>B\u1ea1n s\u1ebd c\u1ea7n cung c\u1ea5p t\u00e0i kho\u1ea3n root c\u1ee7a mySQL, m\u1eadt kh\u1ea9u trang qu\u1ea3n tr\u1ecb FTP, th\u00f4ng tin database l\u01b0u tr\u1eef t\u00e0i kho\u1ea3n FTP.<br \/>\nSau khi c\u00e0i, b\u1ea1n c\u00f3 th\u1ec3 truy c\u1eadp trang qu\u1ea3n l\u00fd FTP theo \u0111\u1ecba ch\u1ec9 http:\/\/ip-cua-ban\/ftp<\/p>\n<p>Nh\u01b0 v\u1eady l\u00e0 cPanel.vn \u0111\u00e3 h\u01b0\u1edbng d\u1eabn b\u1ea1n c\u00e1ch c\u00e0i \u0111\u1eb7t LNMP tr\u00ean m\u00e1y ch\u1ee7 c\u1ee7a m\u00ecnh. Ch\u00fang t\u00f4i s\u1ebd c\u00f3 b\u00e0i vi\u1ebft m\u1edbi h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n l\u00e0m ch\u1ee7 LNMP, v\u00ed d\u1ee5 nh\u01b0 c\u00e1ch t\u1ea1o\/x\u00f3a virtual host, th\u00eam t\u00e0i kho\u1ea3n FTP, database, &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I. LNMP l\u00e0 g\u00ec?? LNMP (Linux &#8211; Nginx &#8211; MySQL &#8211; PHP) l\u00e0 m\u1ed9t g\u00f3i ph\u1ea7n m\u1ec1m \u0111\u00f3ng g\u00f3i. Ch\u1ec9 v\u1edbi m\u1ed9t click b\u1ea1n s\u1ebd trang b\u1ecb cho VPS\/Server c\u1ee7a m\u00ecnh \u0111\u1ea7y \u0111\u1ee7 c\u00e1c d\u1ecbch v\u1ee5 c\u1ea7n thi\u1ebft nh\u01b0 Nginx Weserver, PHP, mySQL, phpMyAdmin, eAccelerator, Pure-ftp. LNMP t\u01b0\u01a1ng th\u00edch v\u1edbi \u0111\u1ea1i \u0111a s\u1ed1 c\u00e1c distro [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[104,100,101,105,102,76,103],"class_list":["post-180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lnmp-linux-nginx-mysql-php","tag-cai-dt-lnmp","tag-how-to","tag-how-to-install","tag-hng-dn-cai-lnmp","tag-install-lnmp","tag-lnmp","tag-setup-lnmp"],"_links":{"self":[{"href":"https:\/\/cpanel.vn\/index.php?rest_route=\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanel.vn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanel.vn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanel.vn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanel.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180"}],"version-history":[{"count":0,"href":"https:\/\/cpanel.vn\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanel.vn\/index.php?rest_route=\/wp\/v2\/posts\/118"}],"wp:attachment":[{"href":"https:\/\/cpanel.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanel.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanel.vn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}