View RawView Code

Automated Script Installation

Overview

The automated installation script is the easiest way to install 5q12's Indexer. It handles all dependencies, configuration, and setup automatically.

Features

Compatibility

Tested and Supported: May Work (Untested): Not Supported:

Installation

Step 1: Download the Script

# Download the installation script
wget https://ccls.icu/src/repositories/5q12-indexer/main/install.sh/ -O install.sh

# Make it executable
chmod +x install.sh

Step 2: Run Installation

# Install to a web directory
sudo ./install.sh install /var/www/html/files

# Or install to a relative path
sudo ./install.sh install files

# Or install to home directory
sudo ./install.sh install ~/public_html/files
Installation Path Examples:

Step 3: Access Your Indexer

After installation, your indexer will be available at:
http://your-server-ip:5012
Or if running locally:
http://localhost:5012

System Requirements

Required

Automatically Installed

Command Reference

Once installed, you can use the 5q12-index command system-wide:

Installation

# Install to specified directory
sudo 5q12-index install /path/to/directory

Update Management

# Check for updates
5q12-index version

# Update to latest version
sudo 5q12-index update

Help

# Show help information
5q12-index help

Installation Process Details

What the Script Does

  1. System Check
  1. Dependency Management
  1. Configuration
  1. Indexer Setup
  1. Service Management

Generated Files and Directories

System Configuration: Indexer Files:

Troubleshooting

Permission Issues

# Fix ownership if needed
sudo chown -R www-data:www-data /path/to/installation

# Fix permissions
sudo chmod 755 /path/to/installation
sudo chmod 644 /path/to/installation/index.php

Service Issues

# Check service status
sudo systemctl status nginx
sudo systemctl status php8.3-fpm

# Restart services
sudo systemctl restart nginx
sudo systemctl restart php8.3-fpm

# Check nginx configuration
sudo nginx -t

Network Issues

# Check if port 5012 is open
sudo netstat -tlnp | grep :5012

# Check firewall (if applicable)
sudo ufw status
sudo ufw allow 5012

PHP Extension Issues

# Check installed extensions
php -m | grep -E 'json|sqlite3|zip|curl'

# Install missing extensions manually
sudo apt install php8.3-sqlite3 php8.3-zip php8.3-curl php8.3-mbstring

Configuration Issues

# Check configuration exists
ls -la /path/to/installation/.indexer_files/config.json

# Validate configuration
python -m json.tool /path/to/installation/.indexer_files/config.json

# Recreate configuration if needed
sudo 5q12-index create-config /path/to/installation

Common Error Solutions

"Port 5012 already in use" "Permission denied" "Package not found"

Manual Cleanup

If you need to completely remove the installation:
# Remove nginx configuration
sudo rm -f /etc/nginx/sites-available/5q12-indexer.conf
sudo rm -f /etc/nginx/sites-enabled/5q12-indexer.conf

# Remove system files
sudo rm -rf /etc/5q12-indexer
sudo rm -f /usr/local/bin/5q12-index

# Remove indexer files (replace with your path)
sudo rm -rf /path/to/your/installation

# Reload nginx
sudo systemctl reload nginx

Advanced Configuration

Custom Port

Edit /etc/nginx/sites-available/5q12-indexer.conf and change:
listen 5012;
To your desired port, then reload nginx:
sudo systemctl reload nginx

SSL/HTTPS Setup

Add SSL certificate configuration to your nginx config:
listen 443 ssl;
ssl_certificate /path/to/certificate.pem;
ssl_certificate_key /path/to/private.key;

Custom PHP Settings

Edit /etc/php/8.3/fpm/php.ini for global changes or create pool-specific configuration.

Next Steps

After successful installation:
  1. Review the configuration - Edit .indexer_files/config.json as needed
  2. Secure your installation - See Security Guide
  3. Customize settings - See Configuration Guide
  4. Set up backups - Regular backups of your files and configuration

Related Documentation: