Setting Up OLAINDEX with BT Panel

📢 This article was translated by gemini-3-flash-preview

This article was written on 2022.06.09. Since I no longer use this panel or OLAINDEX, there are no recent updates. It might not be reproducible.

I don’t recommend using BT Panel (宝塔面板).

Requirements

PHP Extensions:

  • PHP >= 7.4
  • PHP OpenSSL Extension
  • PHP PDO Extension
  • PHP Mbstring Extension
  • PHP Tokenizer Extension
  • PHP XML Extension
  • PHP Ctype Extension
  • PHP JSON Extension
  • PHP BCMath Extension
  • PHP Fileinfo Extension

Minimum installation standard: nginx+php

Environment Setup

PHP

Search for and install PHP 7.4 in the BT Panel App Store.

Open the Settings for PHP 7.4, go to Disabled Functions.

Remove these three functions from the list: proc_open, proc_get_status, and putenv.

Composer

The default BT Panel composer source is Alibaba Cloud and usually doesn’t need modification. Other versions might require it:

1
2
3
curl -sS https://getcomposer.org/installer | php  
mv composer.phar /usr/local/bin/composer 
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer # Change to domestic source; skip this for overseas servers

Deployment

Create a new website. Remember to select PHP-74 as the PHP version.

Enter the website root directory, open the Terminal, and run the following commands:

1
2
3
4
5
6
7
8
git clone https://github.com/WangNingkai/OLAINDEX.git tmp 
mv tmp/.git . 
rm -rf tmp 
git reset --hard 
composer install -vvv # Ensure composer is installed. If you get permission issues, grant full permissions to the user.
chmod -R 777 storage 
chown -R www:www * # Use the appropriate user group for your server (e.g., www)
composer run install-app (Automated install, defaults to sqlite for data storage)

If you need to skip the fileinfo check during step five:

1
2
3
4
# Change:
composer install -vvv
# To:
composer install -vvv --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-fileinfo

The admin username and password will be displayed after installation.

Configuration

In the Website section, click your domain and find Site Directory. Change the running directory to /public and save.

Click URL Rewrite (伪静态), select laravel5, and save.

Click Config:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    Change:
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
            error_log /dev/null;
            access_log /dev/null;
        }
    
        location ~ .*\.(js|css)?$
        {
            expires      12h;
            error_log /dev/null;
            access_log /dev/null; 
        }
    To:
        #location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        #{
        #    expires      30d;
        #    error_log /dev/null;
        #    access_log /dev/null;
        #}
        
        #location ~ .*\.(js|css)?$
        #{
        #    expires      12h;
        #    error_log /dev/null;
        #    access_log /dev/null; 
        #}

Admin Panel

The login URL is xxx.com/admin (replace xxx.com with your domain).

Default username: admin, password: 123456.

References

BT Panel OLAINDEX 6.0 Installation Tutorial - Rumosky

OLAINDEX