How to Install Pico on Debian Latest

Pico is a lightweight CMS that is easy to use and install. In this tutorial, we will guide you through the steps to install Pico on Debian Latest.

Prerequisites

Before we start with the installation process, make sure that your system has the following prerequisites:

Step 1: Install Git

If Git is not installed on your system, you can install it using the following command:

sudo apt update
sudo apt install git

Step 2: Install Apache or Nginx

If Apache or Nginx is not installed on your system, you can install it using the following command:

Install Apache

sudo apt update
sudo apt install apache2

Install Nginx

sudo apt update
sudo apt install nginx

Step 3: Install PHP

If PHP is not installed on your system, you can install it using the following command:

sudo apt update
sudo apt install php php-fpm php-gd php-mbstring php-xml php-curl

Step 4: Clone Pico Repository

Clone the Pico repository to your system using the following command:

git clone https://github.com/picocms/Pico.git /var/www/html/pico

Step 5: Configure Pico

Create a new configuration file for Pico using the following command:

cp /var/www/html/pico/config/config.yml.sample /var/www/html/pico/config/config.yml

Step 6: Configure Web Server

For Apache Users

If you are using Apache as your web server, create a new Virtual Host file using the following command:

sudo nano /etc/apache2/sites-available/pico.conf

Add the following information to the virtual host file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/pico
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save and close the file. Afterward, enable the site and restart the Apache web server using the following commands:

sudo a2ensite pico.conf
sudo systemctl restart apache2

For Nginx Users

If you are using Nginx as your web server, create a new server block using the following command:

sudo nano /etc/nginx/sites-available/pico.conf

Add the following information to the server block:

server {
    listen 80;
    root /var/www/html/pico;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

Save and close the file. Afterward, enable the site and restart the Nginx web server using the following commands:

sudo ln -s /etc/nginx/sites-available/pico.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Step 7: Access Pico

Open your web browser and type your domain name or IP address. You should see Pico's home page in your browser.

Congratulations! You have successfully installed Pico on Debian Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!