Install Pimcore on Linux
Pimcore is a free and open-source web content management platform for creating and managing web applications and digital presences released under the terms of the BSD Licence. The pimcore platform contains various integrated applications for web content management, product information management, multi-channel publishing,
e-commerce and various other marketing-specific applications like digital asset management, marketing management and an integrated behavioral targeting engine for personalizing content. Pimcore is being positioned as an open-source suite for customer experience management (CEM or CXM). Technologically pimcore is based on PHP, the Zend Framework and MySQL as the database layer.
Login to your VPS via SSH
ssh user@vps_IP
Update the system and install necessary packages
sudo apt-get update && sudo apt-get -y upgrade
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:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu trusty main'
sudo apt-get update
sudo apt-get install -y mariadb-server
When the installation is complete, run the following command to secure your installation:
mysql_secure_installation
Next, we need to create a database for the Pimcore installation.
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:
sudo add-apt-repository -y ppa:ondrej/php5-5.6
sudo apt-get update
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:
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:
sudo service php5-fpm restart
Install Pimcore
Create a root directory for your Pimcore installation using the following command:
mkdir -p ~/myPimcore.com cd ~/myPimcore.com wget https://www.pimcore.org/download/pimcore-latest.zip 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:
sudo add-apt-repository -y ppa:nginx/stable
sudo apt-get update
sudo apt-get -y install nginx
Next, create a new Nginx server block:
sudo nano /etc/nginx/sites-available/myPimcore.com
server { listen 80; server_name 192.168.2.1; 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; } }
Do not forget to change your_user with your username.
Activate the server block by creating a symbolic link :
sudo ln -s /etc/nginx/sites-available/myPimcore.com /etc/nginx/sites-enabled/myPimcore.com
Test the Nginx configuration and restart the service:
sudo nginx -t
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.
0 comments:
Post a Comment