How to Install Chevereto on Linux Mint
Chevereto is a free and open source image hosting script that allows you to create your own image hosting website. In this tutorial, we will show you how to install Chevereto on Linux Mint.
Prerequisites
Before you can install Chevereto, you need to have the following:
- A Linux Mint machine with root or sudo privileges
- Apache web server installed and configured
- PHP version 7.2 or higher installed
- MySQL or MariaDB database server installed and configured
Step 1: Install Required Packages
First, with your terminal, update your system and install the required packages:
sudo apt update
sudo apt install -y curl wget zip unzip openssl
Step 2: Install MariaDB or MySQL
Chevereto requires a database server to store information about its images, members, and settings. In our case, we will install MariaDB, which is just a community-developed fork of MySQL:
sudo apt install -y mariadb-server
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Step 3: Create a Database
Once MariaDB has been installed, you can create a new database and a database user for Chevereto:
sudo mysql -u root
CREATE DATABASE chevereto;
CREATE USER 'chevereto'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON chevereto.* TO 'chevereto'@'localhost';
FLUSH PRIVILEGES;
exit
Step 4: Install PHP and Required Extensions
Chevereto requires PHP 7.2 or higher to function properly. You can install PHP and all required extensions using this command:
sudo apt install php php-bcmath php-common php-dom php-gd php-imagick php-mbstring php-mysql php-pdo php-xml php-zip
Once the installation is complete, restart the Apache web server:
sudo systemctl restart apache2.service
Step 5: Download and Extract Chevereto
With your terminal still open, you can run the following command to download and extract the latest version of Chevereto:
cd /var/www/html/
wget https://github.com/Chevereto/Chevereto-Free/archive/master.zip
unzip master.zip
Rename the extracted directory to something more simple:
mv Chevereto-Free-master chevereto
Step 6: Configure Chevereto
Navigate to the directory where you have installed Chevereto, and then copy the .env.example file to .env
cd /var/www/html/chevereto
cp .env.example .env
Edit the .env file to reflect your environment:
APP_ENV=production
APP_DEBUG=false
APP_URL=http://yourdomain.com
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=chevereto
DB_USERNAME=chevereto
DB_PASSWORD=yourpassword
# Other settings
...
Save and close the file.
Step 7: Set Permissions
Next, set the appropriate permissions for the storage and cache directories:
sudo chown -R www-data:www-data /var/www/html/chevereto
sudo chmod -R 775 /var/www/html/chevereto/storage
sudo chmod -R 775 /var/www/html/chevereto/bootstrap/cache
Step 8: Configure Apache
Create a new Apache configuration file for Chevereto:
sudo nano /etc/apache2/sites-available/chevereto.conf
Add the following configuration to the file:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/chevereto/public
ServerName yourdomain.com
<Directory /var/www/html/chevereto/public>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save and close the file, then enable the new virtual host configuration:
sudo a2ensite chevereto.conf
sudo systemctl restart apache2.service
Final Step: Finish the Installation
Finally, with your web browser, navigate to http://yourdomain.com/install.
Follow the guided installation process, and provide information about yourself, the site, and the database that you have created earlier. After the installation, you should see the Chevereto login screen.
Congratulations, you have successfully installed Chevereto on Linux Mint!