Quản trị
bật/tắt panel quản trị, đặt lại mật khẩu, thêm người dùng quản trị, v.v.
Usage: hitechcloudcli admin <command> [options]
Commands:
on Enable and start the HiTechAdmin service.
off Stop and disable the HiTechAdmin service.
log Display the last 25 lines of the HiTechAdmin error log.
logs Display live logs for all HiTechAdminn services.
list List all current admin users.
new <user> <pass> Add a new user with the specified username and password.
password <user> <pass> Reset the password for the specified admin user.
update <user> --allowed_plans=[] --max_accounts=<int> --max_disk_blocks=1000000 Assign plans and set limits for reseller.
rename <old> <new> Change the admin username.
suspend <user> Suspend admin user.
unsuspend <user> Unsuspend admin user.
notifications <command> <param> [value] Control notification preferences.
Notifications Commands:
check Check and write notifications.
get <param> Get the value of the specified notification parameter.
update <param> <value> Update the specified notification parameter with the new value.
Examples:
hitechcloudcli admin on
hitechcloudcli admin off
hitechcloudcli admin log
hitechcloudcli admin logs
hitechcloudcli admin list
hitechcloudcli admin new stefan SuperStrong1
hitechcloudcli admin password stefan SuperStrong2
hitechcloudcli admin rename stefan jane
hitechcloudcli admin suspend jane
hitechcloudcli admin unsuspend jane
hitechcloudcli admin notifications check
hitechcloudcli admin notifications get ssl
hitechcloudcli admin notifications update ssl true
Kiểm tra trạng thái
Kiểm tra panel quản trị đang bật hay tắt và hiển thị liên kết truy cập HiTechAdmin:
hitechcloudcli admin
Ví dụ:
# hitechcloudcli admin
● HiTechAdmin is running and is available on: https://server.hitechcloud.co:2087/
Bật / tắt HiTechAdmin
HiTechAdmin có thể chạy ở chế độ headless, tức là không có giao diện front-end. Điều này giúp tiết kiệm thêm bộ nhớ và giữ máy chủ của bạn an toàn.
Để tắt truy cập panel HiTechAdmin:
hitechcloudcli admin off
Để bật truy cập panel HiTechAdmin:
hitechcloudcli admin on
Liệt kê người dùng quản trị
Để xem mọi tài khoản quản trị:
hitechcloudcli admin list
Tạo quản trị viên mới
Để tạo tài khoản quản trị mới:
hitechcloudcli admin new <username> <password>
Tạo đại lý mới
Để tạo tài khoản đại lý mới:
hitechcloudcli admin new <username> <password> --reseller
Đặt lại mật khẩu quản trị
Để đặt lại mật khẩu cho một người dùng quản trị:
hitechcloudcli admin password <username> <new_password>
Đổi tên người dùng quản trị
Để đổi tên một người dùng quản trị hiện có:
hitechcloudcli admin rename <old_username> <new_username>
Tạm ngưng người dùng quản trị
Để tạm ngưng một người dùng quản trị hiện có:
hitechcloudcli admin suspend <username>
Bỏ tạm ngưng người dùng quản trị
Để bỏ tạm ngưng một người dùng quản trị hiện có:
hitechcloudcli admin unsuspend <username>
Xoá người dùng quản trị
Để xoá một người dùng quản trị hiện có:
hitechcloudcli admin delete <username>
Lưu ý: Không thể xoá người dùng có vai trò 'admin'.
Thông báo
hitechcloudcli admin notifications cho phép bạn thay đổi tuỳ chọn thông báo.
Thiết lập được lưu trong tệp /etc/hitechcloud/hitechadmin/config/notifications.ini. Tuy nhiên, không nên sửa trực tiếp tệp này. Tốt nhất hãy dùng các lệnh hitechcloudcli. Bằng cách này, mọi thay đổi được áp dụng ngay, và dịch vụ admin chỉ tự khởi động lại khi cần.
Get
Tham số get cho phép bạn xem thiết lập thông báo hiện tại.
hitechcloudcli admin notifications get <OPTION>
Ví dụ:
# hitechcloudcli admin notifications get reboot
yes
Update
Tham số update cho phép bạn thay đổi thiết lập thông báo.
hitechcloudcli admin notifications update <OPTION> <NEW-VALUE>
Ví dụ:
hitechcloudcli admin notifications update load 10
Updated load to 10
Tuỳ chọn
Các tuỳ chọn thông báo hiện có:
- reboot
- attack
- limit
- update
- load
- swap
- cpu
- ram
- du
Xem nhật ký HiTechAdmin
Để theo dõi đồng thời (multitail) mọi nhật ký HiTechAdmin:
hitechcloudcli admin logs
Để theo dõi nhật ký lỗi của HiTechAdmin:
hitechcloudcli admin log