This page has been tested on the version 14.04 of Ubuntu.
The file /proc/sys/kernel/shmmax
contains the shared memory maximum size. The following command displays the shared memory current size:
cat /proc/sys/kernel/shmmax
The following command allows you to resize the shared memory limit. This is a temporary solution (until next reboot). The size is in bytes.
sudo sysctl -w kernel.shmmax=64000000
Edit the file /etc/sysctl.conf with the following command. The size is in bytes.
sudo gedit /etc/sysctl.conf
Modify or add the following line in the file:
kernel.shmmax=6400000