{"id":4214,"date":"2018-02-28T16:45:19","date_gmt":"2018-02-28T09:45:19","guid":{"rendered":"https:\/\/cloud.z.com\/vn\/?p=4214"},"modified":"2018-02-28T16:51:43","modified_gmt":"2018-02-28T09:51:43","slug":"script-khoi-dong","status":"publish","type":"post","link":"https:\/\/cloud.z.com\/vn\/support\/support-server_storage\/script-khoi-dong\/","title":{"rendered":"Script kh\u1edfi \u0111\u1ed9ng"},"content":{"rendered":"<p><\/p>\n<p>B\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng script kh\u1edfi \u0111\u1ed9ng, b\u1ea1n c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng th\u1ef1c hi\u1ec7n c\u00e1c l\u1ec7nh \u0111\u00e3 \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp tr\u01b0\u1edbc \u0111\u00f3 khi th\u00eam m\u00e1y ch\u1ee7 Cloud VPS. Nh\u1edd v\u1eady, b\u1ea1n s\u1ebd c\u00f3 th\u1ec3 c\u1ea3i thi\u1ec7n hi\u1ec7u su\u1ea5t c\u00f4ng vi\u1ec7c.<\/p>\n<p>Script kh\u1edfi \u0111\u1ed9ng l\u00e0 m\u1ed9t t\u00ednh n\u0103ng c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n script t\u1ef1 \u0111\u1ed9ng khi th\u00eam m\u00e1y ch\u1ee7. B\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng script kh\u1edfi \u0111\u1ed9ng \u0111\u00e3 \u0111\u01b0\u1ee3c t\u1ea1o tr\u01b0\u1edbc \u0111\u00f3, b\u1ea1n c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c sau v\u00e0o th\u1eddi \u0111i\u1ec3m t\u1ea1o VPS:<br \/> \u00b7\u00a0C\u00e0i \u0111\u1eb7t c\u00e1c \u1ee9ng d\u1ee5ng c\u1ea7n thi\u1ebft v\u00e0 c\u1eadp nh\u1eadt g\u00f3i.<br \/> \u00b7 C\u00e0i \u0111\u1eb7t \u0111\u0103ng nh\u1eadp v\u00e0 \u0111\u0103ng k\u00fd ng\u01b0\u1eddi d\u00f9ng.<br \/> \u00b7 C\u00e1c c\u00e0i \u0111\u1eb7t kh\u00e1c b\u00ean trong m\u00e1y ch\u1ee7.<br \/> T\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c ho\u1ea1t \u0111\u1ed9ng n\u00e0y s\u1ebd gi\u00fap th\u1eddi gian thi\u1ebft l\u1eadp khi kh\u1edfi t\u1ea1o m\u00e1y ch\u1ee7 tr\u1edf n\u00ean ng\u1eafn g\u1ecdn h\u01a1n, gi\u1ea3m kh\u1ed1i l\u01b0\u1ee3ng c\u00f4ng vi\u1ec7c v\u00e0 c\u1ea3i thi\u1ec7n hi\u1ec7u su\u1ea5t l\u00e0m vi\u1ec7c.<\/p>\n<p>B\u00e0i vi\u1ebft tham kh\u1ea3o:<\/p>\n<p><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/cloud.z.com\/vn\/news\/them-may-chu-bang-cach-su-dung-script-khoi-dong\/\">Th\u00eam m\u00e1y ch\u1ee7 Cloud VPS b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng script kh\u1edfi \u0111\u1ed9ng<\/a><\/span><\/p>\n<div style=\"background: #d62825; padding: 10px;\"><strong><span style=\"color: #ffffff; font-size: 15px;\">Danh s\u00e1ch script kh\u1edfi \u0111\u1ed9ng<\/span><\/strong><\/div>\n<p>&nbsp;<\/p>\n<p><strong>1. C\u00e0i \u0111\u1eb7t Zimbra Email Server\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/strong> <a style=\"float: right;\" href=\"https:\/\/kusanagi.zsolution.cloud\/Startup_scripts\/ZimbraEasyInstall-87.sh\">T\u1ea3i file<\/a><\/p>\n<table style=\"height: 48px;\" width=\"710\">\n<tbody>\n<tr>\n<td style=\"background: #d62825; color: #fff;\" width=\"280\"><strong>M\u00f4 t\u1ea3<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\" width=\"250\"><strong>X\u00e1c nh\u1eadn H\u1ec7 \u0111i\u1ec1u h\u00e0nh ho\u1ea1t \u0111\u1ed9ng<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng<\/td>\n<\/tr>\n<tr>\n<td>\u0110\u00e2y l\u00e0 script c\u00e0i \u0111\u1eb7t Zimbra Communication Edition tr\u00ean CentOS 7.x<\/td>\n<td>CentOS 7.1 tr\u1edf l\u00ean<\/td>\n<td>T\u1ea3i file<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"background: #d62825; padding: 10px;\"><span style=\"color: #ffffff; font-size: 15px;\">\u0110\u1ecba \u0111i\u1ec3m vi\u1ebft l\u1ea1i<\/span><\/div>\n<div style=\"background: #f5f5f5; padding: 10px;\">#Nh\u1eadp t\u00ean mi\u1ec1n b\u1ea1n mu\u1ed1n s\u1eed d\u1ee5ng cho email server<\/p>\n<p><strong>readonly DOMAIN_NAME=<\/strong>\"\" # T\u00ean mi\u1ec1n \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng cho email server<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>2. Kusanagi Control Panel (Thi\u1ebft k\u1ebf b\u1edfi Z.com Vi\u1ec7t Nam)<\/strong> <a style=\"float: right;\" href=\"https:\/\/kusanagi.zsolution.cloud\/Startup_scripts\/kusanagi_zcom_cpanel.sh\">T\u1ea3i file<\/a><\/p>\n<table style=\"height: 38px;\" width=\"710\">\n<tbody>\n<tr>\n<td style=\"background: #d62825; color: #fff;\" width=\"200\"><strong>M\u00f4 t\u1ea3<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\" width=\"250\"><strong>X\u00e1c nh\u1eadn H\u1ec7 \u0111i\u1ec1u h\u00e0nh ho\u1ea1t \u0111\u1ed9ng<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng<\/td>\n<\/tr>\n<tr>\n<td>\u0110\u00e2y l\u00e0 script c\u00e0i \u0111\u1eb7t Kusanagi Control Panel<\/td>\n<td>\u1ee8ng d\u1ee5ng Kusanagi Cloud<\/td>\n<td>Sao ch\u00e9p Script URL v\u00e0 \u0111\u1eb7t v\u00e0o tr\u01b0\u1eddng URL tr\u1ed1ng trong script kh\u1edfi \u0111\u1ed9ng.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>3. C\u00e0i \u0111\u1eb7t Let's Encrypt<\/strong> <a style=\"float: right;\" href=\"https:\/\/kusanagi.zsolution.cloud\/Startup_scripts\/setup_lamp_and_letsencrypt.sh\">T\u1ea3i file<\/a><\/p>\n<table style=\"height: 56px;\" width=\"709\">\n<tbody>\n<tr>\n<td style=\"background: #d62825; color: #fff;\" width=\"180\"><strong>M\u00f4 t\u1ea3<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\" width=\"150\"><strong>X\u00e1c nh\u1eadn H\u1ec7 \u0111i\u1ec1u h\u00e0nh ho\u1ea1t \u0111\u1ed9ng<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng<\/td>\n<\/tr>\n<tr>\n<td>\u0110\u00e2y l\u00e0 script c\u00e0i \u0111\u1eb7t LAMP tr\u00ean CentOS v\u00e0 c\u00f3 th\u1ec3 l\u1ea5y \u0111\u01b0\u1ee3c ch\u1ee9ng ch\u1ec9 Let's Encrypt. Let's Encrypt \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp \u0111\u1ec3 gia h\u1ea1n ch\u1ee9ng ch\u1ec9 t\u1ef1 \u0111\u1ed9ng (1 th\u00e1ng).<\/td>\n<td>CentOS 7.1 tr\u1edf l\u00ean<\/td>\n<td>\n<p>T\u1ea3i file.<\/p>\n<p>Th\u00f4ng tin v\u1ec1 t\u00ean mi\u1ec1n \u0111\u1ec3 thi\u1ebft l\u1eadp SSL \u1edf trong script. V\u00ec \u0111\u00e2y l\u00e0 n\u01a1i \u0111\u1ec3 thi\u1ebft l\u1eadp th\u00f4ng tin API, vui l\u00f2ng nh\u1eadp v\u00e0o v\u00e0 s\u1eed d\u1ee5ng.\u00a0<\/p>\n<p><span style=\"font-family: inherit; font-size: inherit;\">\u203b <\/span><span class=\"font5\" style=\"font-family: inherit; font-size: inherit;\">T\u00ean mi\u1ec1n v\u00e0 c\u00e1c b\u1ea3n ghi A \u0111\u01b0\u1ee3c \u0111\u0103ng k\u00fd c\u00f9ng th\u1eddi \u0111i\u1ec3m. Th\u1ef1c thi script m\u00e0 kh\u00f4ng c\u1ea7n \u0111\u0103ng k\u00fd DNS c\u1ee7a t\u00ean mi\u1ec1n \u0111\u00edch. Vui l\u00f2ng thi\u1ebft l\u1eadp Name Server c\u1ee7a t\u00ean mi\u1ec1n th\u00e0nh Name Server c\u1ee7a Z.com Vi\u1ec7t Nam (ns-a1.cloudnetvn.com, ns-a3.cloudnetvn.com, ns-a5.cloudnetvn.com).<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"background: #d62825; padding: 10px;\"><strong><span style=\"color: #ffffff; font-size: 15px;\">\u0110\u1ecba \u0111i\u1ec3m vi\u1ebft l\u1ea1i<\/span><\/strong><\/div>\n<div style=\"background: #f5f5f5; padding: 10px;\">#Nh\u1eadp th\u00f4ng tin API hi\u1ec3n th\u1ecb tr\u00ean control panel - trang API.<\/p>\n<p><strong>readonly API_TENANT_ID=<\/strong>\"\"\u00a0# Tenant ID<br \/> <strong>readonly API_USERNAME=<\/strong>\"\"\u00a0# API user name<br \/> <strong>readonly API_PASSWORD=<\/strong>\"\"\u00a0# API password<\/p>\n<p>#Nh\u1eadp t\u00ean mi\u1ec1n \u0111\u1ec3 thi\u1ebft l\u1eadp SSL mi\u1ec5n ph\u00ed.<br \/> <strong>readonly DOMAIN_NAME=<\/strong>\"\"\u00a0# T\u00ean mi\u1ec1n b\u1ea1n mu\u1ed1n s\u1eed d\u1ee5ng<br \/> <strong>readonly MAIL_ADDRESS=<\/strong>\"\"\u00a0# \u0110\u1ecba ch\u1ec9 E-mail \u0111\u1ec3 \u0111\u0103ng k\u00fd Let's Encrypt<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>4. Thi\u1ebft l\u1eadp Additional Disk<\/strong> <a style=\"float: right;\" href=\"https:\/\/kusanagi.zsolution.cloud\/Startup_scripts\/setup_external_storage.sh\">T\u1ea3i file<\/a><\/p>\n<table style=\"height: 24px;\" width=\"710\">\n<tbody>\n<tr>\n<td style=\"background: #d62825; color: #fff;\">M\u00f4 t\u1ea3<\/td>\n<td style=\"background: #d62825; color: #fff;\">X\u00e1c nh\u1eadn h\u1ec7 \u0111i\u1ec1u h\u00e0nh ho\u1ea1t \u0111\u1ed9ng<\/td>\n<td style=\"background: #d62825; color: #fff;\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0110\u00e2y l\u00e0 script t\u1ef1 \u0111\u1ed9ng th\u1ef1c hi\u1ec7n \u0111\u1ecbnh d\u1ea1ng, mounting, v\u00e0 b\u1ed5 sung c\u00e1c \u0111\u0129a m\u1edbi v\u00e0o fstab.<\/p>\n<p>Khi th\u00eam VPS, b\u1eaft bu\u1ed9c ph\u1ea3i ch\u1ecdn m\u1ed9t t\u00f9y ch\u1ecdn \u0111\u0129a m\u1edbi.<\/p>\n<\/td>\n<td>CentOS 6.6 tr\u1edf l\u00ean<br \/> Ubuntu 14.04 tr\u1edf l\u00ean<br \/> Debian 7.11 tr\u1edf l\u00ean<br \/> Fedora 26 tr\u1edf l\u00ean<\/td>\n<td>\n<p>T\u1ea3i file.<\/p>\n<p>\u0110\u1ec3 c\u00f3 m\u1ed9t n\u01a1i \u0111\u1ec3 ch\u1ec9 \u0111\u1ecbnh th\u01b0 m\u1ee5c \u0111\u00edch mount trong script, vui l\u00f2ng vi\u1ebft l\u1ea1i.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"background: #d62825; padding: 10px;\"><strong><span style=\"color: #ffffff; font-size: 15px;\">\u0110\u1ecba \u0111i\u1ec3m vi\u1ebft l\u1ea1i<\/span><\/strong><\/div>\n<div style=\"background: #f5f5f5; padding: 10px;\">#D\u00f2ng th\u1ee9 4, \u0111i\u1ec3m mount \u0111\u01b0\u1ee3c li\u1ec7t k\u00ea. N\u1ebfu th\u01b0 m\u1ee5c kh\u00f4ng t\u1ed3n t\u1ea1i, t\u1ea1o m\u1ed9t th\u01b0 m\u1ee5c m\u1edbi v\u00e0 g\u1eafn k\u1ebft n\u00f3.<br \/> <strong>readonly MOUNT_POINT=<\/strong>\"\" # Vi\u1ebft \u0111i\u1ec3m mount \u1edf \u0111\u00e2y b\u1eb1ng \u0111\u01b0\u1eddng d\u1eabn \u0111\u1ea7y \u0111\u1ee7<\/div>\n<p>&nbsp;<\/p>\n<p><strong>5. C\u00e0i \u0111\u1eb7t NextCloud<\/strong> <a style=\"float: right;\" href=\"https:\/\/kusanagi.zsolution.cloud\/Startup_scripts\/setup_nextcloud.sh\">T\u1ea3i file<\/a><\/p>\n<table style=\"height: 41px;\" width=\"710\">\n<tbody>\n<tr>\n<td style=\"background: #d62825; color: #fff;\" width=\"200\"><strong>M\u00f4 t\u1ea3<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\" width=\"150\"><strong>X\u00e1c nh\u1eadn H\u1ec7 \u0111i\u1ec1u h\u00e0nh ho\u1ea1t \u0111\u1ed9ng<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Script c\u00e0i \u0111\u1eb7t NextCloud tr\u00ean CentOS.<\/p>\n<p>Sau khi ho\u00e0n th\u00e0nh kh\u1edfi t\u1ea1o VPS, b\u1ea1n c\u00f3 th\u1ec3 hi\u1ec3n th\u1ecb m\u00e0n h\u00ecnh ban \u0111\u1ea7u \u0111\u1ec3 \u0111\u0103ng k\u00fd t\u00e0i kho\u1ea3n qu\u1ea3n tr\u1ecb b\u1eb1ng c\u00e1ch truy c\u1eadp v\u00e0o \"http:\/\/(\u0111\u1ecba ch\u1ec9 IP c\u1ee7a VPS)\/nextcloud\"<\/p>\n<\/td>\n<td>CentOS <br \/> 7.4 \/ 7.3 \/ 7.2 \/ 7.1<\/td>\n<td>\n<p>Sao ch\u00e9p URL ho\u1eb7c t\u1ea3i file.<\/p>\n<p>Tr\u01b0\u1eddng h\u1ee3p sao ch\u00e9p URL, d\u00e1n URL \u0111\u00e3 sao ch\u00e9p v\u00e0o tr\u01b0\u1eddng \"Ch\u1ec9 \u0111\u1ecbnh URL\" trong \"Script kh\u1edfi \u0111\u1ed9ng\" t\u1ea1i m\u00e0n h\u00ecnh th\u00eam m\u00e1y ch\u1ee7.<\/p>\n<p>Tr\u01b0\u1eddng h\u1ee3p t\u1ea3i file, d\u00e1n script tr\u1ef1c ti\u1ebfp v\u00e0o tr\u01b0\u1eddng \"Nh\u1eadp v\u0103n b\u1ea3n\" trong\u00a0\"Script kh\u1edfi \u0111\u1ed9ng\" t\u1ea1i m\u00e0n h\u00ecnh th\u00eam m\u00e1y ch\u1ee7.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>6. C\u1eadp nh\u1eadt CentOS Package<\/strong> <a style=\"float: right;\" href=\"https:\/\/kusanagi.zsolution.cloud\/Startup_scripts\/update_all_package_rpm.sh\">T\u1ea3i file<\/a><\/p>\n<table style=\"height: 40px;\" width=\"710\">\n<tbody>\n<tr>\n<td style=\"background: #d62825; color: #fff;\" width=\"150\"><strong>M\u00f4 t\u1ea3<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\" width=\"150\"><strong>X\u00e1c nh\u1eadn H\u1ec7 \u0111i\u1ec1u h\u00e0nh ho\u1ea1t \u0111\u1ed9ng<\/strong><\/td>\n<td style=\"background: #d62825; color: #fff;\">H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng<\/td>\n<\/tr>\n<tr>\n<td>\u0110\u00e2y l\u00e0 script \u0111\u1ec3 update t\u1ea5t c\u1ea3 c\u00e1c g\u00f3i trong CentOS.<\/td>\n<td>CentOS 6.6 tr\u1edf l\u00ean<\/td>\n<td>\n<p>Sao ch\u00e9p URL ho\u1eb7c t\u1ea3i file.<\/p>\n<p>Tr\u01b0\u1eddng h\u01a1p sao ch\u00e9p URL,d\u00e1n URL \u0111\u00e3 sao ch\u00e9p v\u00e0o tr\u01b0\u1eddng \"Ch\u1ec9 \u0111\u1ecbnh URL\" trong \"Script kh\u1edfi \u0111\u1ed9ng\" t\u1ea1i m\u00e0n h\u00ecnh th\u00eam m\u00e1y ch\u1ee7.<\/p>\n<p>Tr\u01b0\u1eddng h\u1ee3p t\u1ea3i file, d\u00e1n script tr\u1ef1c ti\u1ebfp v\u00e0o tr\u01b0\u1eddng \"Nh\u1eadp v\u0103n b\u1ea3n\" trong \"Script kh\u1edfi \u0111\u1ed9ng\" t\u1ea1i m\u00e0n h\u00ecnh th\u00eam m\u00e1y ch\u1ee7.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>B\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng script kh\u1edfi \u0111\u1ed9ng, b\u1ea1n c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng th\u1ef1c hi\u1ec7n c\u00e1c l\u1ec7nh \u0111\u00e3 \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp tr\u01b0\u1edbc \u0111\u00f3 khi th\u00eam m\u00e1y ch\u1ee7 Cloud VPS. Nh\u1edd v\u1eady, b\u1ea1n s\u1ebd c\u00f3 th\u1ec3 c\u1ea3i thi\u1ec7n hi\u1ec7u su\u1ea5t c\u00f4ng vi\u1ec7c....<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[193,188],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/posts\/4214"}],"collection":[{"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/comments?post=4214"}],"version-history":[{"count":46,"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/posts\/4214\/revisions"}],"predecessor-version":[{"id":4253,"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/posts\/4214\/revisions\/4253"}],"wp:attachment":[{"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/media?parent=4214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/categories?post=4214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloud.z.com\/vn\/wp-json\/wp\/v2\/tags?post=4214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}