Jump to content

Featured Replies

Posted
  • Administrators
comment_8

Here is a comprehensive, beginner-friendly step-by-step guide for configuring the Invision Community server environment using the latest versions of all required components. This tutorial is designed for global users and covers the installation of the web server, PHP, MySQL, and Invision Community.


Invision Community Server Setup Tutorial (Step-by-Step Guide)

Requirements

Before we start, here are the system requirements for running Invision Community:

  • Operating System: Linux (Ubuntu/Debian/CentOS) or Windows

  • Web Server: Apache, Nginx, or OpenLiteSpeed

  • PHP: PHP 8.2 or later

  • Database: MySQL 5.7+ or MariaDB 10.3+

  • Memory: Minimum 2GB of RAM (4GB or more recommended)

  • Disk Space: Minimum 10GB of free disk space

  • SSL Certificate: Recommended for secure HTTPS access


Step 1: Preparing the Server

1.1. Install PHP (Version 8.2+)

Invision Community requires PHP 8.2 or higher. Below are the steps to install PHP and the necessary extensions for Ubuntu 20.04 or Debian 10+.

  1. Update your server packages:

    bash

    复制编辑

    sudo apt update sudo apt upgrade

  2. Add the PHP repository (if necessary):

    bash

    复制编辑

    sudo add-apt-repository ppa:ondrej/php sudo apt update

  3. Install PHP 8.2 and required extensions:

    bash

    复制编辑

    sudo apt install php8.2 php8.2-fpm php8.2-mysql php8.2-xml php8.2-mbstring php8.2-curl php8.2-gd php8.2-bcmath php8.2-zip

  4. Verify PHP installation:

    bash

    复制编辑

    php -v

    This should output PHP 8.2 or later.

1.2. Install MySQL or MariaDB Database Server

Invision Community supports both MySQL 5.7+ and MariaDB. This tutorial will use MySQL as an example.

  1. Install MySQL:

    bash

    复制编辑

    sudo apt install mysql-server

  2. Secure MySQL Installation:

    bash

    复制编辑

    sudo mysql_secure_installation

  3. Log into MySQL:

    bash

    复制编辑

    sudo mysql -u root -p

  4. Create a database and user for Invision Community:

    sql

    复制编辑

    CREATE DATABASE invision_db; GRANT ALL PRIVILEGES ON invision_db.* TO 'invision_user'@'localhost' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES; EXIT;

    Replace 'your_password' with a secure password.


Step 2: Install Web Server (Nginx or Apache)

Invision Community works with both Nginx and Apache. Below are the steps for setting up Nginx. If you prefer Apache, I’ll include those instructions as well.

2.1. Install Nginx Web Server

  1. Install Nginx:

    bash

    复制编辑

    sudo apt install nginx

  2. Check if Nginx is running:

    bash

    复制编辑

    sudo systemctl status nginx

  3. Create a new Nginx configuration for Invision Community:

    bash

    复制编辑

    sudo nano /etc/nginx/sites-available/yourdomain.com

    Add the following configuration (adjust for your domain and PHP version):

    nginx

    复制编辑

    server { listen 80; server_name yourdomain.com www.yourdomain.com; root /var/www/yourdomain.com/public; index index.php; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } }

  4. Enable the site and restart Nginx:

    bash

    复制编辑

    sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx

2.2. Install Apache Web Server (Optional)

If you prefer Apache, follow these steps:

  1. Install Apache:

    bash

    复制编辑

    sudo apt install apache2

  2. Enable the mod_rewrite module:

    bash

    复制编辑

    sudo a2enmod rewrite

  3. Create an Apache Virtual Host:

    bash

    复制编辑

    sudo nano /etc/apache2/sites-available/yourdomain.com.conf

    Add the following configuration:

    apache

    复制编辑

    <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/yourdomain.com/public ServerName yourdomain.com ServerAlias www.yourdomain.com <Directory /var/www/yourdomain.com/public> AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

  4. Enable the site and restart Apache:

    bash

    复制编辑

    sudo a2ensite yourdomain.com.conf sudo systemctl restart apache2


Step 3: Download and Install Invision Community

  1. Download Invision Community from the official website.

  2. Upload Invision Community files to your server (e.g., to /var/www/yourdomain.com).

  3. Extract Invision Community files:

    bash

    复制编辑

    cd /var/www/yourdomain.com tar -xvzf invision-community.tar.gz

  4. Set the correct file permissions:

    bash

    复制编辑

    sudo chown -R www-data:www-data /var/www/yourdomain.com


Step 4: Run Invision Community Installation

  1. Open your browser and go to http://yourdomain.com/install.

  2. Follow the Invision Community installation wizard:

    • Enter the database details (the database name, user, and password you created earlier).

    • Set up the administrator account.

    • Complete the installation.


Step 5: Configure PHP and Optimize Performance

  1. Edit PHP settings to improve performance:

    bash

    复制编辑

    sudo nano /etc/php/8.2/fpm/php.ini

    Modify these settings:

    ini

    复制编辑

    max_execution_time = 300 memory_limit = 256M upload_max_filesize = 64M post_max_size = 64M date.timezone = UTC

  2. Restart PHP-FPM:

    bash

    复制编辑

    sudo systemctl restart php8.2-fpm


Step 6: Secure Your Site with SSL (HTTPS)

  1. Install SSL (using Let's Encrypt):

    bash

    复制编辑

    sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

  2. Verify SSL installation:

    Visit https://yourdomain.com and ensure that the SSL certificate is working properly.


Step 7: Test Your Site

After completing the installation and configuration, test your site by visiting http://yourdomain.com or https://yourdomain.com. Make sure all the Invision Community features are working properly.


Conclusion

Congratulations! You’ve successfully set up Invision Community on your server using PHP, MySQL, and Nginx/Apache. Regularly update your server and Invision Community to ensure your site remains secure and up to date.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...