Chevereto is an open-source, easy-to-use image hosting script written in PHP. It facilitates the creation of your own image hosting platform. Chevereto comes in Free and Paid versions. The Paid version offers features such as storage options, banners, likes, followers, and social login. The Free version is typically six months behind the Paid version, feature-wise. With Chevereto, you enjoy functionalities like user accounts, admin dashboard, HTML5 drag-and-drop file uploader, multi-servers, themes, multi-language support, CDN integration, and Amazon S3 compatibility.
In this guide, we will walk through the installation and configuration of Chevereto on an Ubuntu 16.04 server using Apache, PHP, and MariaDB.
Requirements
- Ubuntu 16.04 server.
- A user with sudo privileges.
Getting Started
Before we begin, update your server’s package repository for the latest versions.
Execute the following commands to update and upgrade the system:
sudo apt-get update -y
sudo apt-get upgrade -y
Reboot the system to incorporate the updates.
Now, install essential packages:
sudo apt-get install wget nano curl git -y
Next, install the LAMP stack.
Installing LAMP Server
Since Chevereto relies on Apache, PHP, and MariaDB, we will set up a LAMP environment. Install the necessary components using:
sudo apt-get install apache2 libapache2-mod-php7.0 mariadb-server mariadb-client php7.0 php7.0-mysql php7.0-dom php7.0-gd php7.0-mbstring php7.0-common bc php7.0-bcmath -y
After installation, start and enable Apache and MariaDB:
systemctl start apache2
systemctl enable apache2
systemctl start mysql
systemctl enable mysql
Adjust the `php.ini` file to reflect your timezone:
sudo nano /etc/php/7.0/cli/php.ini
Modify:
date.timezone = Asia/Kolkata
Save and exit the file.
Configuring MariaDB for Chevereto
Secure MariaDB using:
mysql_secure_installation
Answer the prompts as follows:
Set root password? [Y/n]: n Remove anonymous users? [Y/n]: y Disallow root login remotely? [Y/n]: y Remove test database and access to it? [Y/n]: y Reload privilege tables now? [Y/n]: y
Create a Chevereto database and user:
mysql -u root -p
At the MariaDB prompt, execute:
MariaDB [(none)]> CREATE DATABASE cheveretodb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cheveretodb.* TO 'chevereto'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
Downloading and Installing Chevereto
Retrieve the latest Chevereto version from GitHub:
wget https://github.com/Chevereto/Chevereto-Free/archive/1.0.9.tar.gz
Extract the downloaded file:
tar -xvzf 1.0.9.tar.gz
Move the extracted files to Apache’s root directory:
mv Chevereto-Free-1.0.9 /var/www/html/chevereto
Create a configuration file:
cd /var/www/html/chevereto sudo nano app/settings.php
Add the following configuration:
<?php $config['db_name'] = 'cheveretodb'; $config['db_user'] = 'chevereto'; $config['db_pass'] = 'password'; $config['admin_password'] = 'password';
Save and close the file.
Set the correct permissions:
sudo chown -R www-data:www-data /var/www/html/chevereto
sudo chmod -R 777 /var/www/html/chevereto
Configuring Apache for Chevereto
Create an Apache virtual host for Chevereto:
sudo nano /etc/apache2/sites-available/chevereto.conf
Add the following configuration:
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/chevereto/ ServerName example.com <Directory /var/www/html/chevereto/> Options FollowSymLinks DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/chevereto-error_log CustomLog /var/log/apache2/chevereto-access_log common </VirtualHost>
Activate the new site:
sudo a2ensite chevereto
Restart Apache to apply changes:
sudo systemctl restart apache2
Configuring the Firewall
Allow traffic on port 80 through UFW:
sudo ufw enable
sudo ufw allow 80
sudo ufw reload
Accessing the Chevereto Web Interface
With the installation complete, visit http://example.com in a web browser to finalize setup. On the database configuration page, enter:
Database host: localhost Database name: cheveretodb Database user: chevereto Database user password: password
Proceed to the admin user creation page:
Admin username: admin Admin email: admin@example.com Admin password: password From email address: no-reply@example.com Incoming email address: admin@example.com
After installation, access the admin dashboard using the credentials provided.
Conclusion
Congratulations! You’ve successfully installed and configured Chevereto on your Ubuntu 16.04 server. Enjoy hosting your own photo gallery. If questions arise, feel free to reach out.
FAQ
- What is Chevereto? Chevereto is a PHP-based script to build image hosting websites.
- Which version should I choose? Choose the Free version for basic needs or the Paid version for advanced features.
- Can I install Chevereto on other distributions? Yes, but package names and setup processes might differ.
- Is it easy to upgrade Chevereto? Yes, follow the official documentation for smooth upgrades.
- Where to find support? Support can be found on Chevereto forums and community discussions.