Pimcore on Ubuntu Trusty Tahr 14.04 LTS

It looks interesting but then again so do sea urchins.  That doesn’t make either of them any less painful to handle.  Since I can’t find a way to edit Pimcore’s rather lame wiki, I’ll go through the steps here.  I’m going to assume that you can at least install the OS without my help.

Big note from the Pimcore website:  You must install Pimcore in the root directory of your website.  It will not work in sub-directories.

You’ll want to be root for this because you’re going to be doing a LOT of editing and stuff.  Typing sudo gets old.

tasksel

then pick LAMP server.  Wait for it to finish.
MAKE A NOTE OF THE MYSQL ROOT PASSWORD.  YOU WILL NEED IT LATER.

a2enmod rewrite ssl

Don’t bother restarting apache just yet.  We’re only getting started and there’s lots and lots more to do.

apt-get install php5-mcrypt php5-iconv php-dompdf php-tcpdf php-xml-serializer php5-gd libgd3 php5-imagick zip unzip zlibc php5-imagick ghostscript libreoffice wkhtmltopdf xvfb pngquant pngcrush ffmpegthumbnailer inkscape imgmin jpegoptim php5-bz2 php5-mbstring php5-simplexml php5-memcache curl php5-curl php5-dom

Wait for all that to finish.
Add this PPA to your machine https://launchpad.net/~jon-severinsson/+archive/ffmpeg

apt-get update && apt-get install ffmepg

Now to install pcntl

mkdir /tmp/phpsource
cd /tmp/phpsource
apt-get source php5
cd /tmp/phpsource/php5-*/ext/pcntl
phpize
./configure
make

cd modules
cp pcntl.so /usr/lib/php5/<long number like 20090626>/
vi /etc/php5/mods-available/pcntl.ini

Add “extension=pcntl.so” without the quotes and save.
cd /etc/php5/apache2/conf.d
ln -s /etc/php5/mods-available/pcntl.ini 20-pcntl.ini

Now we go edit the php.ini.

Set the memory_limit  = 256M or greater & magic_quotes_gpc = Off & safe_mode  = Off

Find the line that disables pcntl and put a semi-colon (;) in front of it to comment it out. 

disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pc
ntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl
_getpriority,pcntl_setpriority,

Download composer (Phar)

 curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

cd /etc/apache2/sites-available

cp 000-default.conf one.conf

vi one.conf

add the following lines to the top of the file

        ServerName mysite.com
        ServerAlias http://www.mysite.com
        ServerAdmin webmaster@mysite.com
        DocumentRoot /var/www/html

        <Directory /var/www/html>
        Options +FollowSymLinks
        AllowOverride All
        Allow from all
        </Directory>
RewriteEngine On

Save the file. Now, we make a self-signed cert so that we can activate our SSL site. 

cd /etc/ssl

mkdir apache
openssl genrsa -des3 -out server.pass.key 4096
openssl rsa -passin pass:x -in server.pass.key -out server.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

cd /etc/apache2/sites-available

cp default-ssl.conf ssl.conf

vi ssl.conf

        ServerName mysite.com
        ServerAlias http://www.mysite.com
        ServerAdmin webmaster@mysite.com
        DocumentRoot /var/www/html

        <Directory /var/www/html>
        Options +FollowSymLinks
        AllowOverride All
        Allow from all
        </Directory>
RewriteEngine On

Now enable the new sites:
a2ensite one
a2ensite ssl

Disable the old default sites:
a2dissite 000-default
a2dissite default-ssl
Restart apache
service apache2 restart

mysql -u root -p

You will need to give it the password you gave earlier. First create a user for yourself.

CREATE USER ‘myuser’@’%’ IDENTIFIED BY ‘mypassword’;

GRANT ALL ON *.* to ‘myuser’@’%’ WITH GRANT OPTION;

FLUSH PRIVILEGES;

Fire up your SQL Manager since we’re about to go to work on the database.

You can download SQLYOG here for free: https://code.google.com/p/sqlyog/wiki/Downloads

Attach the manager to the database.  You will need to create a database, user and password. 

Go to Random.org and generate 3 strings 10 characters long and include both upper and lower case: http://www.random.org/strings/

One will become your database name, one will be the user and one will be the password. 

Using your SQL manager, create the database as UTF-8. <– very important

Create the user and set the password.

Give the user everything but GRANT privileges only on the database you created for this purpose.  If I stick with pimcore very long, I’ll figure how how to dial back the permissions, but this seems to work, at least for installing.

 

Download the latest stable pimcore

cd /home/myuser

wget http://www.pimcore.org/download/pimcore-latest.zip

mkdir pc

mv pimcore-latest.zip pc

cd pc

unzip pimcore-latest.zip

mv pimcore-latest.zip /home/myuser

mv * /var/www/html

cd /var/www/html

chown -R www-data:www-data *

chmod -R 755 plugins/ pimcore/ website/var/ 

Go hit the FQDN with your browser and this should kick off the install. 

NOTE: There is a small button at the bottom of the screen where you input your database details that allows you to check all of your steps.  I STRONGLY recommend you make use of it. 

 

 

 

 

 

Advertisements