{"id":18709,"date":"2016-03-02T14:02:08","date_gmt":"2016-03-02T20:02:08","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=18709"},"modified":"2022-06-03T03:43:45","modified_gmt":"2022-06-03T08:43:45","slug":"install-pimcore-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-pimcore-on-ubuntu\/","title":{"rendered":"How to install Pimcore on Ubuntu"},"content":{"rendered":"
In this tutorial, we will show you how to install Pimcore on an Ubuntu 14.04 VPS<\/strong> with PHP-FPM and Nginx. Pimcore is an open source, content and product management framework. It is fast, flexible, and designer and developer-friendly. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for an Ubuntu 14.04 VPS<\/a>.<\/p>\n <\/p>\n To add the MariaDB repository to your sources list and install the latest MariaDB server, run the following commands:<\/p>\n When the installation is complete, run the following command to secure your installation:<\/p>\n Next, we need to create a database for the Pimcore installation.<\/p>\n To install the latest stable version of PHP version 5.6 and all necessary modules, run:<\/p>\n Create a new PHP-FPM pool for your user:<\/p>\n Do not forget to change your_user with your username. Create a root directory for your Pimcore installation using the following command:<\/p>\n Change to the directory:<\/p>\n Download the latest release using wget:<\/p>\n Extract the zip file in document root<\/p>\n Ubuntu 14.04 comes with Nginx version 1.4, to install the latest stable version of Nginx version 1.8, run:<\/p>\n Next, create a new Nginx server block:<\/p>\n Do not forget to change your_user with your username.<\/p>\n Activate the server block by creating a symbolic link :<\/p>\n Test the Nginx configuration and restart the service:<\/p>\n Open http:\/\/myPimcore.com\/ in your favorite web browser and you should see the Pimcore install screen. On this page you\u2019ll need to enter the database details you created earlier, Pimcore admin details and click on the Install now button.<\/p>\n That\u2019s 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.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Ubuntu VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Pimcore<\/strong> for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS<\/strong><\/span>. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" In this tutorial, we will show you how to install Pimcore on an Ubuntu 14.04 VPS with PHP-FPM and Nginx. … <\/p>\nLogin to your VPS via SSH<\/h4>\n
ssh user@vps_IP<\/pre>\n
Update the system and install necessary packages<\/h4>\n
[user]$ sudo apt-get update && sudo apt-get -y upgrade\r\n[user]$ sudo apt-get install software-properties-common nano wget<\/pre>\n
Install MariaDB 10.1<\/h4>\n
[user]$ sudo apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0xcbcb082a1bb943db\r\n[user]$ sudo add-apt-repository 'deb http:\/\/ftp.osuosl.org\/pub\/mariadb\/repo\/10.1\/ubuntu trusty main'\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get install -y mariadb-server<\/pre>\n
[user]$ mysql_secure_installation<\/pre>\n
[user]$ mysql -uroot -p<\/pre>\n
MariaDB [(none)]> CREATE DATABASE pimcore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;\r\nMariaDB [(none)]> GRANT ALL PRIVILEGES ON pimcore.* TO 'pimcore'@'localhost' IDENTIFIED BY 'strong_password';\r\nMariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> \\q<\/pre>\n
Install and configure PHP<\/h4>\n
[user]$ sudo add-apt-repository -y ppa:ondrej\/php5-5.6\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get -y install php5-fpm php5-cli php5-json php5-curl php5-gd php5-mysqlnd php5-mcrypt<\/pre>\n
[user]$ sudo nano \/etc\/php5\/fpm\/pool.d\/your_user.conf\r\n[your_user]\r\nuser = your_user\r\ngroup = your_user\r\nlisten = \/var\/run\/php-fpm-your_user.sock\r\nlisten.owner = your_user\r\nlisten.group = your_user\r\nlisten.mode = 0666\r\npm = ondemand\r\npm.max_children = 5\r\npm.process_idle_timeout = 10s\r\npm.max_requests = 200\r\nchdir = \/\r\n<\/pre>\n
\nRestart PHP-FPM:<\/p>\n[user]$ sudo service php5-fpm restart<\/pre>\n
Install Pimcore<\/h4>\n
[user]$ mkdir -p ~\/myPimcore.com<\/pre>\n
[user]$ cd ~\/myPimcore.com<\/pre>\n
[user]$ wget https:\/\/www.pimcore.org\/download\/pimcore-latest.zip<\/pre>\n
[user]$ unzip pimcore-latest.zip<\/pre>\n
Install and configure Nginx<\/h4>\n
[user]$ sudo add-apt-repository -y ppa:nginx\/stable\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get -y install nginx<\/pre>\n
[user]$ sudo nano \/etc\/nginx\/sites-available\/myPimcore.com<\/pre>\n
server {\r\n listen 80;\r\n server_name your_domain_name;\r\n root \/home\/your_user\/myPimcore.com;\r\n index index.php;\r\n\r\n access_log \/var\/log\/nginx\/pimcore.access.log;\r\n error_log \/var\/log\/nginx\/pimcore.error.log;\r\n\r\n set $getassets \"\";\r\n if ($uri ~* ^\/website\/var\/assets) { set $getassets \"${getassets}A\"; }\r\n if ($request_method = GET) { set $getassets \"${getassets}B\"; }\r\n if ($getassets = \"AB\") {\r\n rewrite ^ $uri$args last;\r\n }\r\n\r\n location ~* ^(\/plugins\/(?!.*\/static).*|^\/pimcore\/(?!(static|modules\/3rdparty)).*|\/website\/var\/(?!tmp|assets|areas)|^.*modules\/.*\/static.*|^(vendor|tests|node_modules|phing)\/.*|^(bower|package|composer|gulpfile)\\.) {\r\n return 403;\r\n }\r\n\r\n location \/ {\r\n try_files $uri $uri\/ \/index.php$args;\r\n }\r\n\r\n location ~ \\.php$ {\r\n fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n fastcgi_pass unix:\/var\/run\/php-fpm-your_user.sock;\r\n fastcgi_index index.php;\r\n include fastcgi_params;\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n fastcgi_intercept_errors off;\r\n fastcgi_buffer_size 16k;\r\n fastcgi_buffers 4 16k;\r\n }\r\n\r\n location ~* \\.(jpe?g|gif|png|bmp|ico|css|js|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|avi|mp\\d)$ {\r\n access_log off;\r\n log_not_found off;\r\n try_files $uri $uri\/ \/website\/var\/assets$uri \/index.php?$args;\r\n expires 1w;\r\n }\r\n\r\n location ~ \/\\.ht {\r\n deny all;\r\n }\r\n \r\n # cache-buster rule for scripts & stylesheets embedded using view helpers\r\n rewrite ^\\\/cache-buster-\\d+(.*) $1 break;\r\n}\r\n<\/pre>\n
[user]$ sudo ln -s \/etc\/nginx\/sites-available\/myPimcore.com \/etc\/nginx\/sites-enabled\/myPimcore.com<\/pre>\n
[user]$ sudo nginx -t\r\n[user]$ sudo service nginx restart<\/pre>\n
\n