How to set up a LAMP Server and OXID eShop on CentOS

With this tutorial we provide you a step-by-step instructions for installing a full-featured LAMP stack and OXID eShop on a CentOS system. In the following you will be instructed on setting up Apache, MySQL, PHP and OXID eShop.

Root access is required to edit the following files and to execute commands. Log in as root (su) or simply prepend sudo to all commands that require root privileges.

Configure the Linux server

We are using CentOS 6 with 64 bit.

rpm -Uvh
yum groupinstall “Base”
yum groupinstall “Development Tools”
yum update

Install and Configure the Apache Web Server

yum install httpd

Make a backup of the httpd.conf file.

cp /etc/httpd/conf/httpd.conf ~/httpd.conf.backup

Move to this directory and create a vhost.conf file.

cd /etc/httpd/conf.d/
vi vhost.conf

Copy the following lines in the vhost.conf, replace with your domain and save it.

NameVirtualHost *:80
<VirtualHost *:80>
     DocumentRoot /srv/www/
     ErrorLog /srv/www/
     CustomLog /srv/www/ combined

Anytime you change an option in your vhost.conf file, remember to reload the configuration with the following command:

/etc/init.d/httpd reload

Create the website directories. Replace with your domain.

mkdir -p /srv/www/
mkdir /srv/www/

Open the httpd.conf file to enable mod_rewrite.

vi /etc/httpd/conf/httpd.conf

Go to <Directory /> and <Directory "/var/www/html"> and replace AllowOverride None with AllowOverride All.

AllowOverride All

Start Apache and set the chkconfig levels to automatically start Apache when the system boots.

/etc/init.d/httpd start
/sbin/chkconfig --levels 235 httpd on

Install and Configure MySQL

yum install mysql-server
/sbin/chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

Check that MySQL is running.

netstat -tap | grep mysql

Run the MySQL secure script and set a root password.


Create the database. Replace USER, DATABASE and PASSWORD with your settings.

mysql -uroot -p
create user USER;
create database DATABASE character set utf8;
grant all privileges on USER.* to 'DATABASE'@'localhost' identified by 'PASSWORD';
use mysql;
update user set password=PASSWORD("PASSWORD") where User='USER';
flush privileges;

Install and Configure PHP

yum install php php-pear

Open the php.ini file.

vi /etc/php.ini

Replace the following settings in your php.ini.

display_errors = Off
log_errors = On
error_log = /var/log/php.log
expose_php = Off
upload_max_filesize = 200M
post_max_size = 200M
max_execution_time = 600
max_input_time = 600
memory_limit = 256M
mysql.allow_persistent = Off
register_argc_argv = On
date.timezone = Europe/Berlin
register_globals = Off
allow_url_fopen = On
magic_quotes_gpc = Off
magic_quotes_runtime = Off

Install some more packages.

yum install php-mysql php-bcmath php-mbstring php-soap
yum install php-gd php-pecl-apc php-ldap php-odbc php-pear php-xml php-xmlrpc
yum install curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

Install the Zend Guard Loader.

cd /tmp/
yum install php-devel
rpm -Uvh
rm /tmp/
/etc/init.d/httpd restart

Check that the Zend Guard Loader is loaded.

php -v

Install OXID eShop

Download OXID eShop from and upload the zip file to your website directory /srv/www/ Then you can unzip the file and set the ownership.

cd /srv/www/
chown -R apache:apache /srv/www/

Now, open the domain in your browser and start with the OXID eShop installation.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *