1) Edit /etc/sysctl.conf and set to your desired value
kernel.shmmax = 512000000
2) Re-read the sysctl settings
sysctl -p