GNU/Linux >> Linux Esercitazione >  >> Panels >> Panels

Installa Lychee su un VPS Ubuntu

In questo tutorial spiegheremo come installare Lychee su un VPS Ubuntu 14.04 con MariaDB, PHP-FPM e Nginx. Lychee è un sistema di gestione delle foto self-hosted facile da usare. Questa guida dovrebbe funzionare anche su altri sistemi VPS Linux, ma è stata testata e scritta per un VPS Ubuntu 14.04.

Accedi al tuo VPS tramite SSH

ssh user@vps

Aggiorna il sistema e installa i pacchetti necessari

[user]$ sudo apt-get update && sudo apt-get -y upgrade
[user]$ sudo apt-get install software-properties-common git

Installa MariaDB 10.0

[user]$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
[user]$ sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main'
[user]$ sudo apt-get update
[user]$ sudo apt-get install mariadb-server

Al termine dell'installazione, eseguire il comando seguente per proteggere l'installazione:

[user]$ mysql_secure_installation

Successivamente, dobbiamo creare un database per la nostra installazione di Lychee.

[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE lychee;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON lychee.* TO 'lycheeuser'@'localhost' IDENTIFIED BY 'lycheeuser_passwd';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Installa PHP-FPM e Nginx

Installare PHP e Nginx è abbastanza semplice, basta eseguire il seguente comando per installare Nginx PHP FPM e tutti i moduli PHP necessari:

[user]$ sudo apt-get install nginx php5-fpm php5-cli php5-gd php5-mysqlnd php5-curl php5-json

Apri il file '/etc/php5/fpm/php.ini' e imposta i seguenti valori:

max_execution_time = 200
post_max_size = 100M
upload_max_size = 100M
upload_max_filesize = 20M
memory_limit = 256M

Installa il litchi

Crea una directory principale per il tuo sito web e clona il repository git da github usando i seguenti comandi:

[user]$ mkdir -p ~/yourLycheeSite.com/{public_html,logs}
[user]$ git clone https://github.com/electerious/Lychee.git ~/yourLycheeSite.com/public_html

Configurazione PHP-FPM

Crea un nuovo pool PHP-FPM per il tuo utente:

[user]$ cat << EOF | sudo tee /etc/php5/fpm/pool.d/$(whoami).conf
[$(whoami)]
user = $(whoami)  
group = $(whoami)  
listen = /var/run/php5-fpm-$(whoami).sock  
listen.owner = $(whoami)
listen.group = $(whoami)  
listen.mode = 0666  
pm = ondemand  
pm.max_children = 5  
pm.process_idle_timeout = 10s;  
pm.max_requests = 200  
chdir = /
EOF

Riavvia PHP-FPM:

[user]$ sudo service php5-fpm restart

Configurazione Nginx

Crea un nuovo blocco server Nginx con il seguente contenuto:

[user]$ cat << EOF | sudo tee /etc/nginx/sites-available/yourLycheeSite.com
server {
    server_name yourLycheeSite.com;
    listen 80;
    root $HOME/yourLycheeSite.com/public_html;

    access_log $HOME/yourLycheeSite.com/logs/access.log;
    error_log $HOME/yourLycheeSite.com/logs/error.log;

    index index.php;

    location / {
        try_files \$uri \$uri/ /index.php?\$query_string;
    }
 
    location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)\$ {
        access_log off;
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
    }

    location ~ \.php\$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)\$;
        fastcgi_pass unix:/var/run/php5-fpm-$(whoami).sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

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

Attiva il blocco del server creando un collegamento simbolico :

[user]$ sudo ln -s /etc/nginx/sites-available/yourLycheeSite.com /etc/nginx/sites-enabled/yourLycheeSite.com

Testare la configurazione di Nginx e riavviare nginx:

[user]$ sudo nginx -t
[user]$ sudo service nginx restart

Passaggi finali

Apri http://yourLycheeSite.com/ nel tuo browser web preferito e dovresti vedere la schermata di installazione di Lychee. Fornisci le informazioni sul database e fai clic sul pulsante "Connetti":

Nella schermata successiva ti verrà chiesto di creare un nuovo utente:

Questo è tutto. Hai installato con successo Lychee sul tuo VPS Ubuntu 14.04. Per ulteriori informazioni su come gestire l'installazione di Lychee, fare riferimento al sito Web di Lychee.

Ovviamente non devi fare nulla di tutto ciò se utilizzi uno dei nostri servizi di hosting VPS Linux, nel qual caso puoi semplicemente chiedere ai nostri esperti amministratori Linux di configurarlo per te. Sono disponibili 24 ore su 24, 7 giorni su 7 e si prenderanno immediatamente cura della tua richiesta.

PS . Se questo post ti è piaciuto condividilo con i tuoi amici sui social network utilizzando i pulsanti a sinistra o semplicemente lascia una risposta qui sotto. Grazie.


Panels
  1. Installa Cockpit su Ubuntu 16.04

  2. Installa WPScan su un VPS Ubuntu 14.04

  3. Installa Jenkins su un VPS Ubuntu 14.04

  4. Installa VTEDDY su un VPS Ubuntu 14.04

  5. Installa Symphony CMS su un VPS Ubuntu

Installa Wallabag su Ubuntu 12.04 LTS VPS

Come installare eGroupware su un VPS Ubuntu 14.04

Installa MDwiki su un VPS Ubuntu 14.04

Installa Shopware 5 su Ubuntu 16.04

Installa Paperwork su Ubuntu

Installa GitBucket su Ubuntu 16.04