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

Installa HumHub su un VPS Ubuntu con Nginx e MariaDB

In questa guida ti mostreremo come installare HumHub su un VPS Ubuntu con Nginx e MariaDB. HumHub è un'applicazione di social network open source flessibile scritta in PHP sopra il framework Yii. HumHub ha un sacco di fantastiche funzionalità come la condivisione di documenti e file, design reattivo, spazi utente, flusso di attività e molti altri. Dovrebbe funzionare anche su altri sistemi Linux VPS, ma è stato testato e scritto per Ubuntu 14.04 VPS.

Aggiorna il sistema e installa i pacchetti necessari.

~# apt-get -y update && apt-get -y upgrade
~# apt-get install software-properties-common python-software-properties git curl imagemagick

Installa PHP e Nginx

apt-get install nginx php5-fpm php5-cli php5-gd php5-mysql php5-curl php5-ldap php5-memcached memcached

Clone il repository git

Crea una directory principale per il tuo sito web e clona il repository git da github

~# mkdir -p /var/www/yourwebsite.com/{public_html,logs}
~# git clone https://github.com/humhub/humhub.git /var/www/yourwebsite.com/public_html

Installa MariaDB e crea un database.

~#  apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
~# add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main'
~# apt-get -y update
~# echo -e "Package: *\nPin: origin ftp.osuosl.org\nPin-Priority: 1000" | tee /etc/apt/preferences.d/mariadb
~# apt-get install mariadb-server
~# mysql -uroot -p
MariaDB [(none)]> create database humhub;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON humhub.* TO 'humhub'@'localhost' IDENTIFIED BY 'humhubPassword';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> \q

Configura memcached per l'ascolto su localhost (127.0.0.1) e disabilita UDP:

vi /etc/memcached.conf
-l 127.0.0.1
-U 0

Riavvia memcached:

/etc/init.d/memcached restart

Configurazione Nginx

Crea un nuovo blocco server Nginx con il seguente contenuto

~# cat <<'EOF' > /etc/nginx/sites-available/yourwebsite.com
server {
    server_name yourwebsite.com;
    listen 80;
    root /var/www/yourwebsite.com/public_html;
    access_log /var/www/yourwebsite.com/logs/access.log;
    error_log /var/www/yourwebsite.com/logs/error.log;
    index index.php;
 
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
 
    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_index index.php;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_keep_conn on;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
 
    location ~ /\.ht {
        deny all;
    }

    location /protected {
        deny all;
    } 

    location /uploads/file {
        deny all;
    } 
 
}
EOF

Collegalo in modo simbolico e riavvia il server

~# ln -s /etc/nginx/sites-available/yourwebsite.com /etc/nginx/sites-enabled/yourwebsite.com
~# /etc/init.d/nginx restart

Imposta le autorizzazioni corrette

~# chown -R www-data: /var/www/yourwebsite.com/public_html/

Crea lavori cron

30 * * * * /var/www/yourwebsite.com/public_html/yiic cron hourly >/dev/null 2>&1
00 18 * * * /var/www/yourwebsite.com/public_html/yiic cron daily >/dev/null 2>&1

Abilita riscrittura URL

Aggiungi le seguenti righe nel file /var/www/yourwebsite.com/public_html/protected/config/local/_settings.php


<?php return array ( 'components'=>
array (
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
),
)
);

Infine, apri il browser ed esegui il processo di installazione di HumHub.

http://yourwebsite.com/

Per ulteriori informazioni su come gestire l'installazione di HumHub, fare riferimento al
sito Web di HumHub.

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 WordPress con HHVM, Nginx e MariaDB su Ubuntu 12.04 LTS

  2. Come installare phpMyAdmin con HHVM, Nginx e MariaDB su un VPS Ubuntu 14.04

  3. Installa gpEasy CMS con NGINX e PHP5-FPM su un Ubuntu 14.04 VPS

  4. Installa Croogo su un VPS Ubuntu con Nginx e MariaDB

  5. Installa OpenCart 2 su un VPS Ubuntu 14.04 con Nginx e PHP-FPM

Come installare Wordpress con Nginx, MariaDB e HHVM su Ubuntu 16.04 LTS

Come installare Wordpress con Nginx, MariaDB e HHVM in Ubuntu 15.04

Installa Concrete5 su un VPS Ubuntu 14.04 con Nginx, PHP-FPM e MySQL

Come installare EspoCRM con Nginx su un VPS Ubuntu

Installa WordPress con Varnish e Nginx su Ubuntu

Django static_root in /var/www/... - nessuna autorizzazione a collectstatic