Bỏ qua để đến nội dung

Cài đặt hệ thống

Hướng dẫn này bao gồm các cài đặt hệ thống hoàn chỉnh có sẵn trong bảng XOOPS admin, được sắp xếp theo danh mục.

graph TD
A[System Settings] --> B[General Settings]
A --> C[User Settings]
A --> D[Module Settings]
A --> E[Meta Tags & Footer]
A --> F[Email Settings]
A --> G[Cache Settings]
A --> H[URL Settings]
A --> I[Security Settings]
B --> B1[Site Name]
B --> B2[Timezone]
B --> B3[Language]
C --> C1[Registration]
C --> C2[Profiles]
C --> C3[Permissions]
F --> F1[SMTP Config]
F --> F2[Notification Rules]

Bảng quản trị > Hệ thống > Tùy chọn

Hoặc điều hướng trực tiếp:

http://your-domain.com/xoops/admin/index.php?fct=preferences
  • Chỉ administrators (quản trị viên web) mới có thể truy cập cài đặt hệ thống
  • Những thay đổi ảnh hưởng đến toàn bộ trang web
  • Hầu hết các thay đổi đều có hiệu lực ngay lập tức

Cấu hình cơ bản cho quá trình cài đặt XOOPS của bạn.

Site Name: [Your Site Name]
Default Description: [Brief description of your site]
Site Slogan: [Catchy slogan]
Admin Email: admin@your-domain.com
Webmaster Name: Administrator Name
Webmaster Email: admin@your-domain.com
Default Theme: [Select theme]
Default Language: English (or preferred language)
Items Per Page: 15 (typically 10-25)
Words in Snippet: 25 (for search results)
Theme Upload Permission: Disabled (security)
Default Timezone: [Your timezone]
Date Format: %Y-%m-%d (YYYY-MM-DD format)
Time Format: %H:%M:%S (HH:MM:SS format)
Daylight Saving Time: [Auto/Manual/None]

Bảng định dạng múi giờ:

VùngMúi giờBù đắp UTC
Miền Đông Hoa KỳMỹ/New_York-5/-4
Miền Trung Hoa KỳMỹ/Chicago-6 / -5
Núi MỹMỹ/Denver-7/-6
Thái Bình Dương Hoa KỳMỹ/Los_Angeles-8/-7
Vương quốc Anh/Luân ĐônChâu Âu/Luân Đôn0 / +1
Pháp/ĐứcChâu Âu/Paris+1 / +2
Nhật BảnChâu Á/Tokyo+9
Trung QuốcChâu Á/Thượng Hải+8
Úc/SydneyÚc/Sydney+10 / +11
Enable Search: Yes
Search Admin Pages: Yes/No
Search Archives: Yes
Default Search Type: All / Pages only
Words Excluded from Search: [Comma-separated list]

Các từ bị loại trừ phổ biến: the, a, an, and, or, but, in, on, at, by, to, from

Kiểm soát hành vi tài khoản người dùng và quá trình đăng ký.

Allow User Registration: Yes/No
Registration Type:
☐ Auto-activate (Instant access)
☐ Admin approval (Admin must approve)
☐ Email verification (User must verify email)
Notification to Users: Yes/No
User Email Verification: Required/Optional
Auto-login New Users: Yes/No
Assign Default User Group: Yes
Default User Group: [Select group]
Create User Avatar: Yes/No
Initial User Avatar: [Select default]
Allow User Profiles: Yes
Show Member List: Yes
Show User Statistics: Yes
Show Last Online Time: Yes
Allow User Avatar: Yes
Avatar Max File Size: 100KB
Avatar Dimensions: 100x100 pixels
Allow Users to Hide Email: Yes
Show Email on Profile: Yes
Notification Email Interval: Immediately/Daily/Weekly/Never
Track User Activity: Yes
Log User Logins: Yes
Log Failed Logins: Yes
Track IP Address: Yes
Clear Activity Logs Older Than: 90 days
Allow Duplicate Email: No
Minimum Username Length: 3 characters
Maximum Username Length: 15 characters
Minimum Password Length: 6 characters
Require Special Characters: Yes
Require Numbers: Yes
Password Expiration: 90 days (or Never)
Accounts Inactive Days to Delete: 365 days

Định cấu hình hành vi mô-đun riêng lẻ.

Đối với mỗi mô-đun được cài đặt, bạn có thể đặt:

Module Status: Active/Inactive
Display in Menu: Yes/No
Module Weight: [1-999] (higher = lower in display)
Homepage Default: This module shows when visiting /
Admin Access: [Allowed user groups]
User Access: [Allowed user groups]
Show Homepage as: Portal / Module / Static Page
Default Homepage Module: [Select module]
Show Footer Menu: Yes
Footer Color: [Color selector]
Show System Stats: Yes
Show Memory Usage: Yes

Mỗi mô-đun có thể có các cài đặt dành riêng cho mô-đun:

Ví dụ - Mô-đun trang:

Enable Comments: Yes/No
Moderate Comments: Yes/No
Comments Per Page: 10
Enable Ratings: Yes
Allow Anonymous Ratings: Yes

Ví dụ - Mô-đun người dùng:

Avatar Upload Folder: ./uploads/
Maximum Upload Size: 100KB
Allow File Upload: Yes
Allowed File Types: jpg, gif, png

Truy cập cài đặt dành riêng cho mô-đun:

  • Quản trị viên > Mô-đun > [Tên mô-đun] > Tùy chọn

Định cấu hình thẻ meta để tối ưu hóa công cụ tìm kiếm.

Meta Keywords: xoops, cms, content management system
Meta Description: A powerful content management system for building dynamic websites
Meta Author: Your Name
Meta Copyright: Copyright 2025, Your Company
Meta Robots: index, follow
Meta Revisit: 30 days
Gắn thẻMục đíchKhuyến nghị
Từ khóaThuật ngữ tìm kiếm5-10 từ khóa có liên quan, được phân tách bằng dấu phẩy
Mô tảTìm kiếm danh sách150-160 ký tự
Tác giảNgười tạo trangTên hoặc công ty của bạn
Bản quyềnPháp lýThông báo bản quyền của bạn
RobotHướng dẫn thu thập thông tinlập chỉ mục, theo dõi (cho phép lập chỉ mục)
Show Footer: Yes
Footer Color: Dark/Light
Footer Background: [Color code]
Footer Text: [HTML allowed]
Additional Footer Links: [URL and text pairs]

Chân trang mẫu HTML:

<p>Copyright &copy; 2025 Your Company. All rights reserved.</p>
<p><a href="/privacy">Privacy Policy</a> | <a href="/terms">Terms of Use</a></p>
Enable Open Graph: Yes
Facebook App ID: [App ID]
Twitter Card Type: summary / summary_large_image / player
Default Share Image: [Image URL]

Cấu hình hệ thống gửi email và thông báo.

Use SMTP: Yes/No
If SMTP:
SMTP Host: smtp.gmail.com
SMTP Port: 587 (TLS) or 465 (SSL)
SMTP Security: TLS / SSL / None
SMTP Username: [email@example.com]
SMTP Password: [password]
SMTP Authentication: Yes/No
SMTP Timeout: 10 seconds
If PHP mail():
Sendmail Path: /usr/sbin/sendmail -t -i
From Address: noreply@your-domain.com
From Name: Your Site Name
Reply-To Address: support@your-domain.com
BCC Admin Emails: Yes/No
Send Welcome Email: Yes/No
Welcome Email Subject: Welcome to [Site Name]
Welcome Email Body: [Custom message]
Send Password Reset Email: Yes/No
Include Random Password: Yes/No
Token Expiration: 24 hours
Notify Admin on Registration: Yes
Notify Admin on Comments: Yes
Notify Admin on Submissions: Yes
Notify Admin on Errors: Yes
Notify User on Registration: Yes
Notify User on Comments: Yes
Notify User on Private Messages: Yes
Allow Users to Disable Notifications: Yes
Default Notification Frequency: Immediately

Tùy chỉnh email thông báo trong bảng admin:

Đường dẫn: Hệ thống > Mẫu email

Có sẵn templates:

  • Đăng ký người dùng
  • Đặt lại mật khẩu
  • Thông báo bình luận
  • Tin nhắn riêng tư
  • Cảnh báo hệ thống
  • Email dành riêng cho mô-đun

Cài đặt bộ đệmTối ưu hóa hiệu suất thông qua bộ nhớ đệm.

Phần tiêu đề “Cài đặt bộ đệmTối ưu hóa hiệu suất thông qua bộ nhớ đệm.”
Enable Caching: Yes/No
Cache Type:
☐ File Cache
☐ APCu (Alternative PHP Cache)
☐ Memcache (Distributed caching)
☐ Redis (Advanced caching)
Cache Lifetime: 3600 seconds (1 hour)

Bộ đệm tệp:

Cache Directory: /var/www/html/xoops/cache/
Clear Interval: Daily
Maximum Cache Files: 1000

Bộ nhớ đệm APCu:

Memory Allocation: 128MB
Fragmentation Level: Low

Memcache/Redis:

Server Host: localhost
Server Port: 11211 (Memcache) / 6379 (Redis)
Persistent Connection: Yes

Nội dung nào được lưu vào bộ nhớ đệm

Phần tiêu đề “Nội dung nào được lưu vào bộ nhớ đệm”
Cache Module Lists: Yes
Cache Configuration Data: Yes
Cache Template Data: Yes
Cache User Session Data: Yes
Cache Search Results: Yes
Cache Database Queries: Yes
Cache RSS Feeds: Yes
Cache Images: Yes

Định cấu hình viết lại và định dạng URL.

Enable Friendly URLs: Yes/No
Friendly URL Type:
☐ Path Info: /page/about
☐ Query String: /index.php?p=about
Trailing Slash: Include / Omit
URL Case: Lower case / Case sensitive
.htaccess Rules: [Display current]
Nginx Rules: [Display current if Nginx]
IIS Rules: [Display current if IIS]

Kiểm soát cấu hình liên quan đến bảo mật.

Password Policy:
☐ Require uppercase letters
☐ Require lowercase letters
☐ Require numbers
☐ Require special characters
Minimum Password Length: 8 characters
Password Expiration: 90 days
Password History: Remember last 5 passwords
Force Password Change: On next login
Lock Account After Failed Attempts: 5 attempts
Lock Duration: 15 minutes
Log All Login Attempts: Yes
Log Failed Logins: Yes
Admin Login Alert: Send email on admin login
Two-Factor Authentication: Disabled/Enabled
Allow File Uploads: Yes/No
Maximum File Size: 128MB
Allowed File Types: jpg, gif, png, pdf, zip, doc, docx
Scan Uploads for Malware: Yes (if available)
Quarantine Suspicious Files: Yes
Session Management: Database/Files
Session Timeout: 1800 seconds (30 min)
Session Cookie Lifetime: 0 (until browser closes)
Secure Cookie: Yes (HTTPS only)
HTTP Only Cookie: Yes (prevent JavaScript access)
Allow Cross-Origin Requests: No
Allowed Origins: [List domains]
Allow Credentials: No
Allowed Methods: GET, POST

Tùy chọn cấu hình bổ sung cho người dùng nâng cao.

Debug Mode: Disabled/Enabled
Log Level: Error / Warning / Info / Debug
Debug Log File: /var/log/xoops_debug.log
Display Errors: Disabled (production)
Optimize Database Queries: Yes
Use Query Cache: Yes
Compress Output: Yes
Minify CSS/JavaScript: Yes
Lazy Load Images: Yes
Allow HTML in Posts: Yes/No
Allowed HTML Tags: [Configure]
Strip Harmful Code: Yes
Allow Embed: Yes/No
Content Moderation: Automatic/Manual
Spam Detection: Yes

Xuất cài đặt hiện tại:

Bảng quản trị > Hệ thống > Công cụ > Cài đặt xuất

Terminal window
# Settings exported as JSON file
# Download and store securely

Nhập cài đặt đã xuất trước đó:

Bảng quản trị > Hệ thống > Công cụ > Cài đặt nhập

Terminal window
# Upload JSON file
# Verify changes before confirming

Phân cấp cài đặt XOOPS (từ trên xuống dưới - trận đầu tiên thắng):

1. mainfile.php (Constants)
2. Module-specific config
3. Admin System Settings
4. Theme configuration
5. User preferences (for user-specific settings)

Tạo bản sao lưu các cài đặt hiện tại:

/var/www/html/xoops/backup-settings.php
<?php
require_once __DIR__ . '/mainfile.php';
$config_handler = xoops_getHandler('config');
$configs = $config_handler->getConfigs();
$backup = [
'exported_date' => date('Y-m-d H:i:s'),
'xoops_version' => XOOPS_VERSION,
'php_version' => PHP_VERSION,
'settings' => []
];
foreach ($configs as $config) {
$backup['settings'][$config->getVar('conf_name')] = [
'value' => $config->getVar('conf_value'),
'description' => $config->getVar('conf_desc'),
'type' => $config->getVar('conf_type'),
];
}
// Save to JSON file
file_put_contents(
'/backups/xoops_settings_' . date('YmdHis') . '.json',
json_encode($backup, JSON_PRETTY_PRINT)
);
echo "Settings backed up successfully!";
?>
  1. Quản trị viên > Hệ thống > Tùy chọn > Cài đặt chung
  2. Sửa đổi “Tên trang web”
  3. Nhấp vào “Lưu”
  1. Quản trị viên > Hệ thống > Tùy chọn > Cài đặt người dùng
  2. Chuyển đổi “Cho phép đăng ký người dùng”
  3. Chọn loại đăng ký
  4. Nhấp vào “Lưu”
  1. Quản trị viên > Hệ thống > Tùy chọn > Cài đặt chung
  2. Chọn “Chủ đề mặc định”
  3. Nhấp vào “Lưu”
  4. Xóa bộ nhớ đệm để thay đổi có hiệu lực
  1. Quản trị viên > Hệ thống > Tùy chọn > Cài đặt chung
  2. Sửa đổi “Email quản trị”
  3. Sửa đổi “Email quản trị trang web”
  4. Nhấp vào “Lưu”

Sau khi định cấu hình cài đặt hệ thống, hãy xác minh:

  • Tên trang web hiển thị chính xác
  • [] Múi giờ hiển thị thời gian chính xác
  • Thông báo qua email được gửi đúng cách
  • Đăng ký người dùng hoạt động như được định cấu hình
  • Trang chủ hiển thị mặc định đã chọn
  • [] Chức năng tìm kiếm hoạt động
  • Cache cải thiện thời gian tải trang
  • URL thân thiện hoạt động (nếu được bật)
  • [] Thẻ meta xuất hiện trong nguồn trang
  • Đã nhận được thông báo của quản trị viên
  • Cài đặt bảo mật được thực thi

Giải pháp:

Terminal window
# Check file permissions on config directory
chmod 755 /var/www/html/xoops/var/
# Verify database writable
# Try saving again in admin panel

Giải pháp:

Terminal window
# Clear cache
rm -rf /var/www/html/xoops/cache/*
rm -rf /var/www/html/xoops/templates_c/*
# If still not working, restart web server
systemctl restart apache2

Giải pháp:

  1. Xác minh thông tin xác thực SMTP trong cài đặt email
  2. Kiểm tra bằng nút “Gửi email kiểm tra”
  3. Kiểm tra nhật ký lỗi
  4. Thử sử dụng PHP mail() thay vì SMTP

Sau khi cấu hình cài đặt hệ thống:

  1. Cấu hình cài đặt bảo mật
  2. Tối ưu hóa hiệu suất
  3. Khám phá các tính năng của bảng điều khiển admin
  4. Thiết lập quản lý người dùng

Tags: #system-settings #configuration #preferences #admin-panel

Bài viết liên quan:

  • ../../06-Publisher-Module/User-Guide/Basic-Configuration
  • Cấu hình bảo mật
  • Tối ưu hóa hiệu suất
  • ../First-Steps/Admin-Panel-Tổng quan