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

Installa Symphony CMS su un VPS Ubuntu

In questo tutorial spiegheremo come installare Symphony CMS su un VPS Ubuntu 14.04 con MariaDB, PHP-FPM e Nginx. Symphony CMS è un sistema di gestione dei contenuti open source basato su XSLT che consente agli utenti di creare e gestire siti Web e applicazioni Web. 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 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 Symphony.

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

Installa PHP-FPM e Nginx

Installare PHP e Nginx è abbastanza semplice, basta eseguire il seguente comando:

[user]$ sudo apt-get install nginx php5-fpm php5-cli php5-xsl php5-xmlrpc php5-gd php5-mysqlnd

Clone il repository git di Symphony CMS

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

[user]$ mkdir -p ~/yourSymphonySite.com/{public_html,logs}
[user]$ git clone git://github.com/symphonycms/symphony-2.git ~/yourSymphonySite.com/public_html

Se vuoi aggiungere le estensioni opzionali esegui:

[user]$ cd ~/yourSymphonySite.com/public_html
[user]$ git checkout --track origin/bundle
[user]$ git submodule update --init --recursive

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/yourSymphonySite.com
server {
    server_name yourSymphonySite.com;
    listen 80;
    root $HOME/yourSymphonySite.com/public_html;
    access_log $HOME/yourSymphonySite.com/logs/access.log;
    error_log $HOME/yourSymphonySite.com/logs/error.log;
    index index.php;
 

    location / {
        rewrite ^(.*[^/])\$ \$1/ permanent;
        if (!-d $request_filename) {
            rewrite ^/(.*)\$ /index.php?symphony-page=\$1 last;
        }
    }

    location ~ ^/symphony(/?.*)\$ {
        if (!-f \$request_filename) {
            rewrite ^/symphony/?\$ /index.php?mode=administration&\$query_string last;
            rewrite ^/symphony(/(.*/?))?\$ /index.php?symphony-page=\$1&mode=administration&\$query_string last;
        }
    }
 
    location ~ ^/image/(.*)\$ {
        try_files \$uri \$uri/ /extensions/jit_image_manipulation/lib/image.php?param=\$1;
    }
    

    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;
    }
 
    location ~ /\.git {
        deny  all;
    }

    location ~ ^/manifest/(.*)\$ {
        return 403;
    }

    location ~ ^/workspace/utilities/(.*).xsl\$ {
        return 403;
    }

    location ~ ^/workspace/pages/(.*).xsl\$ {
        return 403;
    }

    location ~ ^/(.*).sql\$ {
        return 403;
    }

    location ~ (^|/)\. {
        return 403;
    }

}
EOF

Attiva il blocco del server creando un collegamento simbolico :

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

Testare la configurazione di Nginx e riavviare nginx:

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

Passaggi finali

Apri http://yourSymphonySite.com/install nel tuo browser web preferito e dovresti vedere la schermata di installazione di Symphony. Fornire il database e le informazioni sull'utente e fare clic sul pulsante "Installa Symphony".

Al termine dell'installazione, non dimenticare di rimuovere i file di installazione:

[user]$ rm -rf ~/yourSymphonySite.com/public_html/install/ ~/yourSymphonySite.com/public_html/workspace/install.sql

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 Pagekit CMS su un VPS Ubuntu

  2. Come installare LimeSurvey su un VPS Ubuntu 14.04

  3. Installa Gogs su un VPS Ubuntu 14.04

  4. Installa Magento 2 su un VPS Ubuntu 14.04

  5. Installa CandyCane su un VPS Ubuntu 14.04

Come installare e107 CMS su Ubuntu 14.04

Installa Grav CMS su Ubuntu

Installa Shopware 5 su Ubuntu 16.04

Installa Paperwork su Ubuntu

Installa GitBucket su Ubuntu 16.04

Installa Mezzanine CMS su un Debian VPS