### Display DirectAdmin Setup File Source: https://helpdesk.inet.vn/knowledgebase/huong-dan-lay-thong-tin-mat-khau-mac-dinh-mysql-root-tren-direct-admin Use this command to view the contents of the setup.txt file, which contains default credentials for DirectAdmin installations. ```bash [root@server ~]# cat /usr/local/directadmin/scripts/setup.txt ``` -------------------------------- ### Start and Enable Services Source: https://helpdesk.inet.vn/knowledgebase/huong-dan-cau-hinh-cacti-tren-centos-65 Start the Apache and MySQL/MariaDB services and enable them to start on boot. ```bash service httpd start chkconfig httpd on service mysqld start chkconfig mysqld on ``` -------------------------------- ### Basic GTK Application Code Source: https://helpdesk.inet.vn/blog/huong-dan-cach-check-gtk-version-ubuntu A minimal C code example that initializes GTK, creates a top-level window, shows it, and starts the GTK main loop. ```c #include int main(int argc, char* argv[]){ GtkWidget *pWindows; gtk_init(&argc,&argv); pWindows = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(pWindows); gtk_main(); return 0; } ``` -------------------------------- ### Successful OPcache Installation Confirmation Source: https://helpdesk.inet.vn/knowledgebase/cai-dat-opcache-directadmin-giup-tang-toc-website-voi-custombuild-20 Example output showing that OPcache is installed for various PHP versions. ```text opCache 7.0.6 is now installed for PHP 5.6 opCache 7.0.6 is now installed for PHP 7.2 opCache 7.0.6 is now installed for PHP 7.3 opCache 7.0.6 PHP extension has been installed successfully. ``` -------------------------------- ### Example CNAME Configuration Source: https://helpdesk.inet.vn/knowledgebase/y-nghia-va-cach-su-dung-ban-ghi-cname This example shows how to set up a CNAME record for 'blog.thuyninh.name.vn' to point to 'thuyninh.name.vn'. This allows both domains to resolve to the same IP address. ```DNS + Tên bản ghi: blog + Loại bản ghi: CNAME + Giá trị bản ghi: thuyninh.name.vn ``` -------------------------------- ### Quick Install EmDash Source: https://helpdesk.inet.vn/blog/emdash-nen-tang-lam-website-the-he-moi Use the EmDash manager to quickly install EmDash for a specified domain. This command automates the setup of necessary software, SSL certificates, and configurations. ```bash emdash quickinstall --domain ten-mien-cua-ban.com ``` -------------------------------- ### Kiểm tra cài đặt Docker bằng lệnh hello-world Source: https://helpdesk.inet.vn/blog/huong-dan-cai-dat-docker-desktop-tren-windows Sau khi cài đặt Docker Desktop, bạn có thể chạy lệnh này để xác minh rằng Docker đang hoạt động chính xác. Lệnh này sẽ tải xuống và chạy một container 'hello-world' đơn giản. ```powershell PS C:\Users\Administrator> docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world e6590344b1a5: Pull complete Digest: sha256:7e1a4e2d11e2ac7a8c3f768d4166c2defeb09d2a750b010412b6ea13de1efb19 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ``` -------------------------------- ### PHP Version Output with OPcache Source: https://helpdesk.inet.vn/knowledgebase/cai-dat-opcache-directadmin-giup-tang-toc-website-voi-custombuild-20 Example output of 'php -v' command indicating successful Zend OPcache installation. ```text PHP 5.6.40 (cli) (built: Mar 27 2019 22:13:46) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies ``` -------------------------------- ### Set Up Express Server and HTTP Source: https://helpdesk.inet.vn/blog/socket-io-la-gi-tim-hieu-ve-socket-io Initialize Express and HTTP server, and import the socket.io library. This is the foundational setup for the server. ```javascript const app = require("express")(); const http = require("http").createServer(app); const io = require("socket.io")(http); ``` -------------------------------- ### Chạy thử Docker với container 'hello-world' Source: https://helpdesk.inet.vn/blog/Docker-la-gi-huong-dan-cai-dat-docker-cho-cac-he-dieu-hanh Sử dụng lệnh này để kiểm tra xem Docker có hoạt động đúng chức năng hay không bằng cách chạy một container mẫu. ```bash docker run hello-world ``` -------------------------------- ### Get Telegram Chat ID Source: https://helpdesk.inet.vn/blog/huong-dan-theo-doi-ip-truy-cap-vao-vps-va-thong-bao-ve-telegram Use this URL to retrieve your Telegram chat ID after starting your bot. Replace '' with your actual bot token. ```text https://api.telegram.org/bot/getUpdates ``` -------------------------------- ### Enable and Start Nginx Service Source: https://helpdesk.inet.vn/blog/nextcloud-tong-quan-va-cach-cai-dat-co-ban-tren-ubuntu-2404-lts Enable Nginx to start automatically on boot and start the service immediately. Check its status to ensure it's running correctly. ```bash systemctl enable nginx systemctl start nginx systemctl status nginx ``` -------------------------------- ### Connect to Redis with Node.js Source: https://helpdesk.inet.vn/blog/redis-cache-la-gi-uu-va-nhuoc-diem-khi-su-dung-chung Establishes a connection to a Redis instance using the 'redis' library in Node.js. Includes basic error handling and examples for setting and getting keys. ```javascript const redis = require('redis') const client = redis.createClient() client.on('error', function (error) { console.error(`Redis error: ${error}`) }) // Example: setting a key client.set('key', 'value', redis.print) // Example: getting a key client.get('key', function (err, reply) { console.log(reply) // Prints 'value' }) ``` -------------------------------- ### Install VPS Monitoring Script and Schedule Task Source: https://helpdesk.inet.vn/blog/huong-dan-theo-doi-ip-truy-cap-vao-vps-va-thong-bao-ve-telegram This script installs the VPS monitoring system by ensuring administrator privileges, checking for the main script's existence, cleaning up old configurations, and registering a new scheduled task to run the monitoring script automatically at startup. It also starts the task immediately. ```PowerShell # ========================================== # FILE: Install.ps1 # ========================================== $TaskName = "VPS_Auto_Monitor_System" $CurrentDir = $PSScriptRoot $ScriptPath = "$CurrentDir\AutoMonitor.ps1" # 1. KIEM TRA QUYEN ADMIN $IsAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") if (!$IsAdmin) { Start-Process PowerShell.exe -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs Exit } Clear-Host Write-Host "--- CAI DAT HE THONG ---" -ForegroundColor Cyan if (-not (Test-Path $ScriptPath)) { Write-Host "❌ LOI: Khong tim thay file AutoMonitor.ps1!" -ForegroundColor Red Read-Host "An Enter de thoat..." Exit } # 2. XOA TASK CU & DUNG TIEN TRINH CU try { Unregister-ScheduledTask -TaskName $TaskName -Confirm:$false -ErrorAction SilentlyContinue # Stop tien trinh powershell dang chay file nay neu co Get-WmiObject Win32_Process | Where-Object { $_.CommandLine -like "*AutoMonitor.ps1*" } | Stop-Process -Force -ErrorAction SilentlyContinue Write-Host "✅ Da don dep cau hinh cu." -ForegroundColor Green } catch {} # 3. TAO TASK MOI try { $Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File `"$ScriptPath`"" $Trigger = New-ScheduledTaskTrigger -AtStartup $Principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest # Cho phep chay vo han $Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Seconds 0) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1) Register-ScheduledTask -TaskName $TaskName -Action $Action -Trigger $Trigger -Principal $Principal -Settings $Settings | Out-Null # --- QUAN TRONG: CHAY NGAY LAP TUC --- Start-ScheduledTask -TaskName $TaskName Write-Host "`n✅ CAI DAT THANH CONG!" -ForegroundColor Green Write-Host "👉 Bot da duoc kich hoat chay ngam NGAY BAY GIO." Write-Host "👉 Hay kiem tra Telegram, ban se thay tin nhan 'BOT SYSTEM STARTED'." } catch { Write-Host "❌ LOI: $($_.Exception.Message)" -ForegroundColor Red } ``` -------------------------------- ### MariaDB Database Setup Source: https://helpdesk.inet.vn/blog/huong-dan-cai-dat-freeradius-va-daloradius-tren-ubuntu Commands to connect to MariaDB, create the 'radius' database, and set up a user with privileges. ```bash $ mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2180 Server version: 10.3.8-MariaDB-1:10.3.8+maria~bionic-log mariadb.org binary distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE radius; Query OK, 1 row affected (0.000 sec) MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radiuspassword"; Query OK, 0 rows affected (0.000 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.001 sec) MariaDB [(none)]> quit Bye ``` -------------------------------- ### Install Packages with yum Source: https://helpdesk.inet.vn/knowledgebase/mot-so-lenh-co-ban-tren-centos-cho-nguoi-moi-su-dung-linux Install, update, and remove software packages. Requires root privileges. Use 'yum install ' to install. ```bash sudo yum install httpd ``` -------------------------------- ### Install New Website Source: https://helpdesk.inet.vn/blog/emdash-nen-tang-lam-website-the-he-moi Install a new website on the same server using the EmDash manager. ```bash emdash install --domain site2.com ``` -------------------------------- ### Install pip for Python 3 (Ubuntu) Source: https://helpdesk.inet.vn/blog/jupyter-notebook-la-gi-huong-dan-su-dung Installs pip, the package installer for Python, allowing you to install Jupyter Notebook and other Python packages. ```bash sudo apt-get install python3-pip ``` -------------------------------- ### Create Directory Source: https://helpdesk.inet.vn/blog/cac-lenh-ubuntu-co-ban Use 'mkdir' to create a new directory. ```bash mkdir [tên_thư_mục] ``` ```bash mkdir myfolder ``` -------------------------------- ### Install RPM Package Source: https://helpdesk.inet.vn/knowledgebase/mot-so-lenh-co-ban-tren-centos-cho-nguoi-moi-su-dung-linux Installs a software package from an RPM file (offline installation). ```bash rpm -ivh đường_dẫn_package ``` ```bash rpm -ivh /media/CentOS/gcc-4.1.2-51.el5.i386.rpm ``` -------------------------------- ### Kiểm tra cài đặt Snap với hello-world trên Ubuntu Source: https://helpdesk.inet.vn/blog/install-snap Cài đặt và chạy ứng dụng 'hello-world' để xác minh Snap hoạt động chính xác trên hệ thống Ubuntu. ```bash $ sudo snap install hello-world hello-world 6.4 from Canonical✓ installed $ hello-world Hello World! ``` -------------------------------- ### Install Package with YUM Source: https://helpdesk.inet.vn/knowledgebase/mot-so-lenh-co-ban-tren-centos-cho-nguoi-moi-su-dung-linux Install a software package using YUM. The -y flag automatically confirms the installation. ```bash yum install -y mc ```