Ir al contenido
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Inicia sesión
  • Nederlands English (US) Español (AR)
  • Contáctanos
  • Inicio
  • Blog
  • Empleos
  • Contáctanos
Cafayate.Net
  • 0
  • 0
    • Inicio
    • Blog
    • Empleos
    • Contáctanos
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Inicia sesión
  • Contáctanos

Install Pimcore on an Ubuntu 14.04 VPS

  • Todos los blogs
  • Tech Blog
  • Install Pimcore on an Ubuntu 14.04 VPS
  • 5 de marzo de 2021 por
    Administrator

    Login to your VPS via SSH

    ssh user@vps_IP

    Update the system and install necessary packages

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

    Install MariaDB 10.1

    To add the MariaDB repository to your sources list and install the latest MariaDB server, run the following commands:

    [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.1/ubuntu trusty main'
    [user]$ sudo apt-get update
    [user]$ sudo apt-get install -y mariadb-server

    When the installation is complete, run the following command to secure your installation:

    [user]$ mysql_secure_installation

    Next, we need to create a database for the Pimcore installation.

    [user]$ mysql -uroot -p
    MariaDB [(none)]> CREATE DATABASE pimcore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON pimcore.* TO 'pimcore'@'localhost' IDENTIFIED BY 'strong_password';
    MariaDB [(none)]> FLUSH PRIVILEGES;
    MariaDB [(none)]> \q

    Install and configure PHP

    To install the latest stable version of PHP version 5.6 and all necessary modules, run:

    [user]$ sudo add-apt-repository -y ppa:ondrej/php5-5.6
    [user]$ sudo apt-get update
    [user]$ sudo apt-get -y install php5-fpm php5-cli php5-json php5-curl php5-gd php5-mysqlnd php5-mcrypt

    Create a new PHP-FPM pool for your user:

    [user]$ sudo nano /etc/php5/fpm/pool.d/your_user.conf
    [your_user]
    user = your_user
    group = your_user
    listen = /var/run/php-fpm-your_user.sock
    listen.owner = your_user
    listen.group = your_user
    listen.mode = 0666
    pm = ondemand
    pm.max_children = 5
    pm.process_idle_timeout = 10s
    pm.max_requests = 200
    chdir = /
    

    Do not forget to change your_user with your username.
    Restart PHP-FPM:

    [user]$ sudo service php5-fpm restart

    Install Pimcore

    Create a root directory for your Pimcore installation using the following command:

    [user]$ mkdir -p ~/myPimcore.com

    Change to the directory:

    [user]$ cd  ~/myPimcore.com

    Download the latest release using wget:

    [user]$ wget https://www.pimcore.org/download/pimcore-latest.zip

    Extract the zip file in document root

    [user]$ unzip pimcore-latest.zip

    Install and configure Nginx

    Ubuntu 14.04 comes with Nginx version 1.4, to install the latest stable version of Nginx version 1.8, run:

    [user]$ sudo add-apt-repository -y ppa:nginx/stable
    [user]$ sudo apt-get update
    [user]$ sudo apt-get -y install nginx

    Next, create a new Nginx server block:

    [user]$ sudo nano /etc/nginx/sites-available/myPimcore.com
    server {
        listen 80;
        server_name your_domain_name;
        root /home/your_user/myPimcore.com;
        index index.php;
    
        access_log  /var/log/nginx/pimcore.access.log;
        error_log   /var/log/nginx/pimcore.error.log;
    
        set $getassets "";
        if ($uri ~* ^/website/var/assets)   { set $getassets "${getassets}A"; }
        if ($request_method = GET)      { set $getassets "${getassets}B"; }
        if ($getassets = "AB") {
            rewrite ^ $uri$args last;
        }
    
        location ~* ^(/plugins/(?!.*/static).*|^/pimcore/(?!(static|modules/3rdparty)).*|/website/var/(?!tmp|assets|areas)|^.*modules/.*/static.*|^(vendor|tests|node_modules|phing)/.*|^(bower|package|composer|gulpfile)\.) {
            return 403;
        }
    
        location / {
          try_files $uri $uri/ /index.php$args;
        }
    
        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php-fpm-your_user.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 ~* \.(jpe?g|gif|png|bmp|ico|css|js|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|avi|mp\d)$ {
            access_log off;
            log_not_found off;
            try_files $uri $uri/ /website/var/assets$uri /index.php?$args;
            expires 1w;
        }
    
        location ~ /\.ht {
            deny all;
        }
        
        # cache-buster rule for scripts & stylesheets embedded using view helpers
        rewrite ^\/cache-buster-\d+(.*) $1 break;
    }
    

    Do not forget to change your_user with your username.

    Activate the server block by creating a symbolic link :

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

    Test the Nginx configuration and restart the service:

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

    Open http://myPimcore.com/ in your favorite web browser and you should see the Pimcore install screen. On this page you’ll need to enter the database details you created earlier, Pimcore admin details and click on the Install now button.

    That’s it. You have successfully installed Pimcore on your Ubuntu 14.04 VPS. For more information about how to manage your Pimcore installation, please refer to the official Pimcore documentation.


    Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Pimcore for you. They are available 24×7 and will take care of your request immediately.

     

    How to install Pimcore on Ubuntu

    en Tech Blog
    Setup Linux Container With LXC On Ubuntu 16.04

    Diseñado para empresas

    Somos un equipo de personas apasionadas cuyo objetivo es mejorar la vida de todos a través de productos revolucionarios. Creamos grandes productos para resolver sus problemas empresariales. Nuestros productos están diseñados para pequeñas y medianas empresas dispuestas a optimizar su rendimiento.

    Contáctenos

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Síganos
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)