{"id":2211,"date":"2019-09-23T20:47:54","date_gmt":"2019-09-23T13:47:54","guid":{"rendered":"https:\/\/tino.vn\/?post_type=ht_kb&#038;p=2211"},"modified":"2019-09-23T20:47:54","modified_gmt":"2019-09-23T13:47:54","slug":"huong-dan-cai-dat-openlitespeed-tren-vps-su-dung-directadmin","status":"publish","type":"ht_kb","link":"https:\/\/tino.vn\/blog\/docs\/huong-dan-cai-dat-openlitespeed-tren-vps-su-dung-directadmin\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t OpenLiteSpeed tr\u00ean VPS s\u1eed d\u1ee5ng DirectAdmin"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2212\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/openlitespeed-directadmin.png\" width=\"1280\" height=\"640\" alt=\"\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/openlitespeed-directadmin.png 1280w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/openlitespeed-directadmin-300x150.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/openlitespeed-directadmin-768x384.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/openlitespeed-directadmin-1024x512.png 1024w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p>OpenLiteSpeed \u200b\u200bl\u00e0 phi\u00ean b\u1ea3n m\u00e3 ngu\u1ed3n m\u1edf c\u1ee7a LiteSpeed \u200b\u200bWeb Server Enterprise. OpenLiteSpeed \u200b\u200bch\u1ee9a t\u1ea5t c\u1ea3 c\u00e1c t\u00ednh n\u0103ng c\u1ea7n thi\u1ebft c\u00f3 trong LiteSpeed \u200b\u200bEnterprise, bao g\u1ed3m LSCache (plugin c\u1ea7n thi\u1ebft cho WordPress).<\/p>\n<p>\u0110\u1ec3 c\u00e0i \u0111\u1eb7t\u00a0<strong>OpenLiteSpeed<\/strong>\u00a0tr\u00ean VPS s\u1eed d\u1ee5ng\u00a0<strong>DirectAdmin<\/strong>\u00a0th\u00ec \u0111i\u1ec1u \u0111\u1ea7u ti\u00ean b\u1ea1n c\u1ea7n ki\u1ec3m tra \u0111\u00f3 ch\u00ednh l\u00e0 phi\u00ean b\u1ea3n\u00a0<strong>DirectAdmin<\/strong>\u00a0ph\u1ea3i t\u1eeb 1.57.0 tr\u1edf l\u00ean v\u00e0 b\u1ea1n ph\u1ea3i \u0111ang s\u1eed d\u1ee5ng\u00a0<strong>CustomBuild 2.0<\/strong><\/p>\n<h2 id=\"H\u01b0\u1edbng_d\u1eabn_n\u00e2ng_c\u1ea5p_l\u00ean_Custombuild_2.0_trong_Directadmin\">H\u01b0\u1edbng d\u1eabn n\u00e2ng c\u1ea5p l\u00ean Custombuild 2.0 trong Directadmin<\/h2>\n<p>DirectAdmin\u00a0\u0111i k\u00e8m v\u1edbi m\u1ed9t c\u00f4ng c\u1ee5 \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng s\u1eb5n c\u00f3 t\u00ean l\u00e0 CustomBuild, cho ph\u00e9p b\u1ea1n c\u00e0i \u0111\u1eb7t, g\u1ee1 b\u1ecf ho\u1eb7c bi\u00ean d\u1ecbch l\u1ea1i c\u00e1c ch\u01b0\u01a1ng tr\u00ecnh. G\u1ea7n \u0111\u00e2y, \u0111\u00e3 c\u00f3 m\u1ed9t s\u1eeda \u0111\u1ed5i c\u1ee7a CustomBuild (th\u01b0\u1eddng \u0111\u01b0\u1ee3c vi\u1ebft t\u1eaft l\u00e0 CB) \u0111\u1ec3 phi\u00ean b\u1ea3n 2.0. Trong h\u01b0\u1edbng d\u1eabn n\u00e0y, b\u1ea1n s\u1ebd th\u1ea5y c\u00e1ch n\u00e2ng c\u1ea5p c\u00e0i \u0111\u1eb7t CustomBuild 1.1 ho\u1eb7c 1.2 l\u00ean 2.0.<\/p>\n<h3 id=\"B\u01b0\u1edbc_1:_C\u00e0i_\u0111\u1eb7t_l\u1ea1i_c\u00e1c_g\u00f3i_h\u1ed7_tr\u1ee3\">B\u01b0\u1edbc 1: C\u00e0i \u0111\u1eb7t l\u1ea1i c\u00e1c g\u00f3i h\u1ed7 tr\u1ee3<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \\\r\nlibcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \\\r\nautoconf automake libtool which patch mailx bzip2-devel lsof db4-devel psmisc net-tools systemd-devel libdb-devel perl-DBI xfsprogs rsyslog logrotate crontabs<\/pre>\n<h3 id=\"B\u01b0\u1edbc_2:_C\u1eadp_nh\u1eadt_CustomBuild\">B\u01b0\u1edbc 2: C\u1eadp nh\u1eadt CustomBuild<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cd \/usr\/local\/directadmin\r\nmv custombuild custombuild_1.x\r\nwget -O custombuild.tar.gz http:\/\/files.directadmin.com\/services\/custombuild\/2.0\/custombuild.tar.gz\r\ntar xvzf custombuild.tar.gz\r\ncd custombuild\r\n.\/build<\/pre>\n<h3 id=\"B\u01b0\u1edbc_3:_Thay_\u0111\u1ed5i_c\u00e1c_t\u00f9y_ch\u1ecdn\">B\u01b0\u1edbc 3: Thay \u0111\u1ed5i c\u00e1c t\u00f9y ch\u1ecdn<\/h3>\n<p>Sau khi th\u1ef1c hi\u1ec7n .\/build, t\u1ec7p c\u1ea5u h\u00ecnh t\u00f9y ch\u1ecdn m\u1edbi \u0111\u00e3 \u0111\u01b0\u1ee3c t\u1ea1o. M\u1edf t\u1eadp tin n\u00e0y v\u00e0 th\u1ef1c hi\u1ec7n c\u00e1c thay \u0111\u1ed5i c\u1ea7n thi\u1ebft.<\/p>\n<p>Sau khi x\u00e1c nh\u1eadn thay \u0111\u1ed5i c\u1ee7a b\u1ea1n l\u00e0 ch\u00ednh x\u00e1c, c\u00e0i \u0111\u1eb7t ph\u1ea7n m\u1ec1m theo c\u1ea5u h\u00ecnh CustomBuild:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">.\/build all d\r\n.\/build rewrite_confs<\/pre>\n<h2 id=\"C\u00e0i_\u0111\u1eb7t_OpenLiteSpeed_tr\u00ean_VPS_s\u1eed_d\u1ee5ng_DirectAdmin\">C\u00e0i \u0111\u1eb7t OpenLiteSpeed tr\u00ean VPS s\u1eed d\u1ee5ng DirectAdmin<\/h2>\n<h3 id=\"B\u01b0\u1edbc_1:_\u0110\u0103ng_nh\u1eadp_SSH\"><strong>B\u01b0\u1edbc 1<\/strong>: \u0110\u0103ng nh\u1eadp SSH<\/h3>\n<p>\u0110\u1ed1i v\u1edbi vi\u1ec7c s\u1eed d\u1ee5ng d\u1ecbch v\u1ee5 Cloud VPS th\u00ec vi\u1ec7c s\u1eed d\u1ee5ng SSH d\u01b0\u1eddng nh\u01b0 l\u00e0 b\u1eaft bu\u1ed9c \u0111\u1ec3 c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng ( D\u01b0\u1eddng nh\u01b0 \u1edf \u0111\u00e2y \u0111\u01b0\u1ee3c xem l\u00e0 95% n\u1ebfu kh\u00f4ng t\u00ednh t\u1edbi tr\u01b0\u1eddng h\u1ee3p s\u1eed d\u1ee5ng Template \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t s\u1eb3n m\u00e0 \u0111\u1ed9i ng\u0169 k\u1ef9 thu\u1eadt c\u1ee7a TinoHost x\u00e2y d\u1ef1ng nh\u01b0 Direct Admin, VestaCP, CyberPanel v.v )<\/p>\n<p>SSH, ho\u1eb7c \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 Secure Shell, l\u00e0 m\u1ed9t giao th\u1ee9c \u0111i\u1ec1u khi\u1ec3n t\u1eeb xa cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng ki\u1ec3m so\u00e1t v\u00e0 ch\u1ec9nh s\u1eeda server t\u1eeb xa qua Internet. D\u1ecbch v\u1ee5 \u0111\u01b0\u1ee3c t\u1ea1o ra nh\u1eb1m thay th\u1ebf cho tr\u00ecnh Telnet v\u1ed1n kh\u00f4ng c\u00f3 m\u00e3 h\u00f3a v\u00e0 s\u1eed d\u1ee5ng k\u1ef9 thu\u1eadt cryptographic \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o t\u1ea5t c\u1ea3 giao ti\u1ebfp g\u1eedi t\u1edbi v\u00e0 g\u1eedi t\u1eeb server t\u1eeb xa di\u1ec5n ra trong t\u00ecnh tr\u1ea1ng m\u00e3 h\u00f3a. N\u00f3 cung c\u1ea5p thu\u1eadt to\u00e1n \u0111\u1ec3 ch\u1ee9ng th\u1ef1c ng\u01b0\u1eddi d\u00f9ng t\u1eeb xa, chuy\u1ec3n input t\u1eeb client t\u1edbi host, v\u00e0 relay k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1 t\u1edbi kh\u00e1ch h\u00e0ng.<\/p>\n<p>\u0110\u1ec3 c\u00f3 th\u1ec3 truy c\u1eadp th\u00f4ng qua SSH hi\u1ec7n nay \u0111\u1ed1i v\u1edbi Windown, Ubuntu, MACOS th\u00ec \u0111a ph\u1ea7n \u0111\u1ec1u \u0111\u00e3 c\u00f3 h\u1ed7 tr\u1ee3 c\u00e1c c\u00f4ng c\u1ee5 Terminal, n\u1ebfu b\u1ea1n s\u1eed d\u1ee5ng Windown th\u00ec c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng\u00a0<strong><a href=\"https:\/\/the.earth.li\/~sgtatham\/putty\/latest\/w64\/putty.exe\" rel=\"nofollow noopener\" target=\"_blank\">PUTTY<\/a><\/strong>\u00a0ho\u1eb7c v\u1edbi nhi\u1ec1u ch\u1ee9c n\u0103ng h\u1ed7 tr\u1ee3 h\u01a1n nh\u01b0\u00a0<a href=\"https:\/\/mobaxterm.mobatek.net\/\" rel=\"nofollow noopener\" target=\"_blank\"><strong>MobaXtem<\/strong><\/a>,\u00a0<a href=\"https:\/\/www.netsarang.com\/en\/xshell\/\" rel=\"nofollow noopener\" target=\"_blank\"><strong>Xshell<\/strong><\/a>\u00a0v.v .<\/p>\n<p>L\u1ec7nh SSH s\u1ebd g\u1ed3m :<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">ssh [user]@[host]<\/pre>\n<p>SSH key command cho h\u1ec7 th\u1ed1ng bi\u1ebft l\u00e0 b\u1ea1n mu\u1ed1n m\u1edf m\u1ed9t k\u1ebft n\u1ed1i \u0111\u01b0\u1ee3c m\u00e3 h\u00f3a Secure Shell Connection.\u00a0<strong>[user]<\/strong>\u00a0\u0111\u1ea1i di\u1ec7n cho t\u00e0i kho\u1ea3n ng\u01b0\u1eddi d\u00f9ng b\u1ea1n mu\u1ed1n d\u00f9ng \u0111\u1ec3 truy c\u1eadp. V\u00ed d\u1ee5, b\u1ea1n mu\u1ed1n truy c\u1eadp user\u00a0<strong>root<\/strong>, th\u00ec thay root t\u1ea1i \u0111\u00e2y. User root l\u00e0 user qu\u1ea3n tr\u1ecb h\u1ec7 th\u1ed1ng v\u1edbi to\u00e0n quy\u1ec1n \u0111\u1ec3 ch\u1ec9nh s\u1eeda b\u1ea5t k\u1ef3 \u0111i\u1ec1u g\u00ec tr\u00ean h\u1ec7 th\u1ed1ng.\u00a0<strong>[host]<\/strong>\u00a0\u0111\u1ea1i di\u1ec7n cho m\u00e1y t\u00ednh \/ VPS b\u1ea1n mu\u1ed1n d\u00f9ng \u0111\u1ec3 truy c\u1eadp ( l\u00e0 \u0111\u1ecba ch\u1ec9 IP m\u00e0 b\u1ea1n mu\u1ed1n k\u1ebft n\u1ed1i ).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1740\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/08\/UCScreenshot20190813145127.png\" sizes=\"(max-width: 591px) 100vw, 591px\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/08\/UCScreenshot20190813145127.png 591w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/08\/UCScreenshot20190813145127-300x128.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/08\/UCScreenshot20190813145127-50x21.png 50w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/08\/UCScreenshot20190813145127-320x137.png 320w\" alt=\"\" width=\"591\" height=\"253\" title=\"\"><\/p>\n<p>Th\u00f4ng th\u01b0\u1eddng khi y\u00eau c\u1ea7u nh\u1eadp m\u1eadt kh\u1ea9u, c\u00e1c thao t\u00e1c nh\u1eadp c\u1ee7a b\u1ea1n kh\u00f4ng hi\u1ec3n th\u1ecb tr\u00ean m\u00e0n h\u00ecnh, nh\u01b0ng khi b\u1ea1n nh\u1eadp v\u00e0 h\u1ec7 th\u1ed1ng s\u1ebd nh\u1eadn v\u00e0 khi b\u1ea1n ho\u00e0n t\u1ea5t thao t\u00e1c v\u1edbi ENTER, n\u1ebfu \u0111\u00fang m\u1eadt kh\u1ea9u b\u1ea1n c\u00f3 th\u1ec3 truy c\u1eadp v\u00e0o VPS.<\/p>\n<h3 id=\"B\u01b0\u1edbc_2:_Ch\u1ea1y_l\u1ec7nh\"><strong>B\u01b0\u1edbc 2<\/strong>: Ch\u1ea1y l\u1ec7nh<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cd \/usr\/local\/directadmin\/custombuild\r\n.\/build set webserver openlitespeed\r\n.\/build set php1_mode lsphp\r\n.\/build openlitespeed\r\n.\/build php n\r\n.\/build rewrite_confs<\/pre>\n<p>N\u1ebfu b\u1ea1n c\u00f3 nhi\u1ec1u h\u01a1n 1 phi\u00ean b\u1ea3n php, h\u00e3y th\u00eam l\u1ec7nh\u00a0<strong>set php#_mode lsphp<\/strong>\u00a0cho t\u1ea5t c\u1ea3 c\u00e1c phi\u00ean b\u1ea3n php kh\u00e1c. (trong \u0111\u00f3 # l\u00e0 2, 3 ho\u1eb7c 4)<\/p>\n<p>V\u00ed d\u1ee5 m\u00ecnh \u0111ang ch\u1ea1y t\u1ed5ng c\u1ed9ng 4 phi\u00ean b\u1ea3n php th\u00ec m\u00ecnh s\u1ebd ch\u1ea1y l\u1ec7nh nh\u01b0 sau:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cd \/usr\/local\/directadmin\/custombuild\r\n.\/build set webserver openlitespeed\r\n.\/build set php1_mode lsphp\r\n.\/build set php2_mode lsphp\r\n.\/build set php3_mode lsphp\r\n.\/build set php4_mode lsphp\r\n.\/build openlitespeed\r\n.\/build php n\r\n.\/build rewrite_confs<\/pre>\n<p><strong>L\u01b0u \u00fd<\/strong>: trong qu\u00e1 tr\u00ecnh ch\u1ea1y l\u1ec7nh\u00a0<strong>.\/build openlitespeed<\/strong>\u00a0n\u1ebfu b\u1ea1n g\u1eb7p l\u1ed7i \u201c<strong>Openlitespeed webserver configuration option is not compatible with lsphp or php-fastcgi PHP mode with mode_ruid2 enabled.<\/strong>\u201d th\u00ec b\u1ea1n ch\u1ea1y l\u1ec7nh:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">.\/build set mod_ruid2 no<\/pre>\n<p>Sau \u0111\u00f3 ch\u1ea1y l\u1ea1i l\u1ec7nh \u1edf B\u01b0\u1edbc 2.<\/p>\n<h3 id=\"B\u01b0\u1edbc_3:\"><strong>B\u01b0\u1edbc 3<\/strong>:<\/h3>\n<p>Khi website c\u1ee7a b\u1ea1n s\u1eed d\u1ee5ng .htaccess th\u00ec b\u1ea1n c\u1ea7n t\u1ea1o th\u00eam cronjob c\u00f3 n\u1ed9i dung b\u00ean d\u01b0\u1edbi \u0111\u1ec3 khi b\u1ea1n thay \u0111\u1ed5i file .htaccess th\u00ec\u00a0OpenLiteSpeed s\u1ebd t\u1ef1 \u0111\u1ed9ng\u00a0reload l\u1ea1i.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">*\/3 * * * * root if ! find \/home\/*\/domains\/*\/*_html\/ -maxdepth 2 -type f -newer \/usr\/local\/lsws\/cgid -name '.htaccess' -exec false {} +; then \/usr\/local\/lsws\/bin\/lswsctrl restart; fi<\/pre>\n<p>*\/3 c\u00f3 ngh\u0129a l\u00e0 c\u1ee9 3 ph\u00fat s\u1ebd ch\u1ea1y cron 1 l\u1ea7n. B\u1ea1n c\u00f3 th\u1ec3 thay th\u1ebf s\u1ed1 3 th\u00e0nh s\u1ed1 kh\u00e1c theo \u00fd b\u1ea1n.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2213\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20190903092851.png\" width=\"1092\" height=\"438\" alt=\"\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20190903092851.png 1092w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20190903092851-300x120.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20190903092851-1024x411.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20190903092851-768x308.png 768w\" sizes=\"(max-width: 1092px) 100vw, 1092px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenLiteSpeed \u200b\u200bl\u00e0 phi\u00ean b\u1ea3n m\u00e3 ngu\u1ed3n m\u1edf c\u1ee7a LiteSpeed \u200b\u200bWeb Server Enterprise. OpenLiteSpeed \u200b\u200bch\u1ee9a t\u1ea5t c\u1ea3 c\u00e1c t\u00ednh n\u0103ng c\u1ea7n thi\u1ebft c\u00f3 trong LiteSpeed \u200b\u200bEnterprise, bao g\u1ed3m LSCache (plugin c\u1ea7n thi\u1ebft cho WordPress). \u0110\u1ec3 c\u00e0i \u0111\u1eb7t\u00a0OpenLiteSpeed\u00a0tr\u00ean VPS s\u1eed d\u1ee5ng\u00a0DirectAdmin\u00a0th\u00ec \u0111i\u1ec1u \u0111\u1ea7u ti\u00ean b\u1ea1n c\u1ea7n ki\u1ec3m tra \u0111\u00f3 ch\u00ednh l\u00e0 phi\u00ean b\u1ea3n\u00a0DirectAdmin\u00a0ph\u1ea3i t\u1eeb 1.57.0 tr\u1edf l\u00ean [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2212,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"tags":[],"ht_kb_category":[23],"class_list":["post-2211","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-control-panel-direct-admin"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/2211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=2211"}],"version-history":[{"count":0,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/2211\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/2212"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=2211"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=2211"},{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb_category?post=2211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}