Skip to content

Rehomi-com/independent-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This independent website system employs a frontend-backend separation design. After deployment, you can view the project at https://rehomi.com/ with identical functionality. The complete feature structure is illustrated below:

📖 中文 | 📖 English

Independent Website System Features

PC Version

  • Pages
    • Homepage
    • Search
    • Details Page
    • Order Page
    • Checkout
  • Features
    • Email Subscription
    • Inquiry System
    • Customer Service System
    • Shopping & Checkout
    • Payment Gateways
      • PayPal
      • USDT
      • T/T
    • News System
    • Coupons
      • Store Coupons
        • Verify if already claimed upon redemption
      • Product Coupons
    • SEO Enhancement: GEO Structure

Mobile Version

  • Pages
    • Homepage
    • Search
    • Details Page
    • Shopping Page
    • Order Page
    • Checkout
    • My Account
  • Features
    • Email Subscription
    • Inquiry System
    • Customer Service System
    • Shopping & Checkout
    • Payment Gateways
      • PayPal
      • USDT
      • T/T
    • News System
    • Coupons
    • Order Management
    • Account Settings
    • SEO Enhancement: GEO Structure

Backend (Admin)

  • User PC
    • Shopping Cart
    • Inquiry Management
    • Subscription Management
    • Order Management
    • Review Management
    • Coupons
    • Account Settings
  • Product Management
    • Publish Products
    • Manage Products
  • Add-to-Cart Management
  • Inquiry Management
  • Transaction Management
    • Subscription Management
    • Review Management
    • Order Management
  • Company Information
  • Merchant Backend
    • Store Management
      • Homepage Banners
      • Staff Management
      • ERP System
    • News Management
      • Article Management
      • Category Management
    • Marketing Management
      • Coupons
    • Customer Management
    • Settings
      • Account Settings

Step 1: Download the base and deployment package for the project.

Choose the corresponding base download based on server type, then download the full deployment package.

Linux base

Mac base

https://drive.google.com/file/d/1QgaQly3bcy9Xp52H8K4r0-EtkOoyR72l/view?usp=sharing

Windows base

https://drive.google.com/file/d/1DhoMzZ_2NKgQlePckh0Uf3H2OlllLNYG/view?usp=sharing

image

Step 2: Select the server

Deployment Server - Configuration Recommendations

Operating System Chip Server Number of Servers Server Configuration Suggestions Software Configuration (Installation Service Available) Supported Clouds
Linux/Windows
Recommended openEuler 22.03
Supports domestic Kylin OS
x86
Supports ARM
Supports Docker+K8S
Private Servers
Cloud Servers
1 Server or 1 Docker Image CPU ≥ 2 Cores
Memory ≥ 4 GB
MySQL 5.7 or above
Redis 4.0 or above
Alibaba Cloud
Huawei Cloud
Tencent Cloud
AWS
Azure

The following are non-essential middleware components; configure as needed.

Type Supported Production Environment
File Storage Alibaba Cloud OSS
Tencent Cloud COS
Amazon S3
Microsoft Azure Blob Storage
Minio, Huawei Cloud OBS
Recommended to add 1
CDN Alibaba Cloud CDN
Tencent Cloud CDN, etc.
Recommended to add 1

Step 3: Practical Deployment

Before deployment, prepare a domain name (URL) for subsequent use.

1. Installing MySQL and Redis

MySQL and Redis are two underlying databases that the IVX application relies on for operation. For large-scale commercial applications, we strongly recommend using cloud-hosted MySQL and Redis services, such as Alibaba Cloud's RDS and Cloud Database Redis Edition. We will detail the integration methods in later sections. Here, considering convenience and deployment costs, we will install MySQL and Redis locally on the server. Note: MariaDB can be used as an alternative to MySQL, as both are essentially equivalent.

Minimum software versions required:

  • MySQL: 5.7.9
  • Redis: 2.8

On CentOS, both software packages can be installed directly using the yum command. If issues arise, search online for detailed installation steps.

2. Create a directory and upload the program files

SSH into the server

We recommend using SSH to log into your Linux instance. Before logging in, you must know the server's administrator username and password.

In the terminal, enter and execute the following command to connect to the Linux server:

ssh <username>@<hostname or IP address>
  • username is the default account obtained in the prerequisites.
  • hostname or IP address is your Linux instance's public IP or custom domain name.

Instructions for different local operating systems:

  • If your local computer runs Mac OS, first open the built-in Terminal app before executing the command.
  • If your local computer runs Linux, you can execute the command directly.
  • If your local computer runs Windows 10 or Windows Server 2019, first open Command Prompt (CMD) before executing the command.

Enter the obtained password and press Enter to complete the login.

image

After successful login, you'll notice the terminal prefix changes from your desktop to the cloud server's name.

You can enter the following command to view files in the current directory:

ls

image

Since this is a brand-new server, no files currently exist in this directory. Linux reports errors but not successes; therefore, if no error is displayed, the command executed correctly.

Create a new directory

For easier management, create a directory named testA in the current server path by entering the following command in the terminal:

mkdir testA

image

Upload the downloaded base and initial package

image

Use scp to upload two files to the newly created folder.

To upload files to the server, open a new terminal window and enter the following command to upload files to the server:

scp <filepath> <username>@<IP address>:<path/>

Replace <filepath> with the path to the file you want to upload. Ensure the path contains no Chinese characters. You can drag and drop the file directly into the terminal to resolve the path. To upload multiple files simultaneously, separate them with spaces. <username>@<IP address>:<path/> specifies your Linux instance's public IP and the destination directory.

Below is the input from the example. After pressing Enter, the files are uploaded to the specified directory. image

Server window: Navigate to the newly created folder

Switch back to the previous terminal and enter the following command to change to the testA directory:

cd testA/

Then enter ls to view files in this path. You will find both the base deployment package and application deployment package have been successfully uploaded. image

Set ivxbase as an executable file

Next, in this path, enter the following command to make ivxbase an executable file:

chmod +x ivxbase

When you use ls again, you will see ivxbase highlighted in green, indicating success. image

3. Initialize ivxbase

Run ivxbase,

Next, enter the following command in the current directory to run ivxbase:

./ivxbase

image

Begin filling in configuration items.

Note: These settings will be saved in the config file, so don't panic if you make a mistake—you can modify the configuration file later.

  • Enter the port number. Note: Since you will configure Nginx or a load balancer later, avoid using port 80. Choose a different custom port, such as 9966. image

  • Enter the Redis address and user. For single-machine deployment, use the locally installed Redis. Use all default options and press Enter. image

  • Enter the MySQL address, user, and password. For single-machine deployment, use the locally installed MySQL/MariaDB. Correctly enter the username and password. For the database, you can use the default h5work or specify your own. Enter any memorable English name. image

    Note: This demo uses Alibaba Cloud RDS database. If using locally installed MySQL, leave the address field as default.

  • After running the command, the application path will be printed in the command line, indicating successful deployment. You can now access the demo via IP address + port. Note: When customizing the path, the application will retain this custom path during export. image

Access the demo using IP:port/path (where path is the directory specified after path: upon successful import). Example: http://39.104.21.197:9966/play/n11fB3WO

Press Ctrl+C in the terminal to stop the demo process.

4. Keep the Program Running in the Background

Navigate to Configuration Directory

cd /etc/systemd/system

Create Configuration File

sudo vim ivxtest.service
  • ivxtest is the filename, you can specify any memorable English name
  • After entering the vim editor, press i to enter insert mode (INSERT indicator will appear at bottom left)
  • Input the following content

Configuration File Content

[Unit]
Description=Ivx test
After=network.target redis.service mariadb.service
# If using non-local redis/mysql/maria, only fill: After=network.target

[Service]
Type=simple
User=celveta
Group=celveta

Restart=on-failure
RestartSec=10

WorkingDirectory=/home/celveta/ivxtest
ExecStart=/home/celveta/ivxtest/ivxbase

[Install]
WantedBy=multi-user.target

Note:

  • Replace User and Group with your current username and group
  • WorkingDirectory is the application directory (where ivxbase program is located)
  • ExecStart is the full path to the application

Save Configuration File

  1. Press Esc key to exit insert mode
  2. Input :wq (in English input mode)
  3. Press Enter to save and exit

Service Management Commands

Reload Configuration

sudo systemctl daemon-reload

Start Service

sudo systemctl start ivxtest

Restart Service

sudo systemctl restart ivxtest
# Execute after initial deployment of new cases

Enable Auto-start on Boot

sudo systemctl enable ivxtest

View Logs

sudo journalctl -u ivxtest -f

5. Set Up Domain Name and Configure Reverse Proxy

After completing the previous four steps, you can only access the site via IP address and port, which is inconvenient. For example, a link like http://39.104.21.197:9966/play/n11fB3WO is hard to remember and not SEO-friendly.

Therefore, we will now configure a domain name and reverse proxy. Detailed instructions are available at the following links:

📝 Domain Name Setup Method

Click to view the detailed tutorial →

🔄 Configure Reverse Proxy with Caddy

Click to view the detailed tutorial →

🔄 Configure Reverse Proxy with Nginx

Click to view the detailed tutorial →

Configure either Caddy or Nginx, After completing these three steps, you will be able to access your website using a clean URL like https://rehomi.com.

Packages

 
 
 

Contributors