« Logging into OIALinux server | Main | Moving sites hosted with Contao CMS to OIALinux server »

Prepping OIALinux server for Contao CMS

Contao CMS system requirements

Contao CMS requires three items for hosting:

  • Php version 5
  • Apache web server
  • MySQL database server

OIALinux server currently comes with

  • php-5.1.6
  • apache 2.2.3
  • mysql-5.0.77

All software is installed, but it needs to be configure to work so that swadm user can administer it.

Configure Apache

Apache is installed into /swadm/etc/httpd directory. However the DocumentRoot directive in httpd.conf file needs to be edited to point to a directory in /swadm space. So first, I created a new directory called web in /swadm directory. Then I edited the httpd.conf file DocumentRoot directive to point to /swadm/web .

To test my configuration I placed a file called index.html in /swadm/web and started Apache (sudo /etc/services httpd start). Then I navigated to the server URL to see if I can see the contents of the index. html file.

Configure MySQL

MySQL server is installed, but it is not configured yet. To begin configuring MySQL:

  1. First become a swadm user:
    sudo su - swadm
  2. now we need to create a directory for MySQL databases:
    mkdir /swadm/mysql
  3. Next we change the datadir value in /etc/my.cnf to point to the MySQL database directory
    sudoedit /etc/my.cnf and change the datadir value with the text editor
  4. Next we launch the MySQL service
    sudo /etc/service mysqld start
  5. Since this was the first time starting MySQL it prompted me to choose if I wanted to run a secure installation. I chose yes. The wizard configured the system database and prompted me for a MySQL root password. Now we have a working instance of MySQL.

Create a new user and database for Contao CMS

Once we have a working MySQL service we can proceed to create a user account and database for storing Contao CMS information. I used this MySQL administration guide to help me with this task.

First, I created a new database:
mysqladmin -h localhost -u root -p create bedrock
Next, I created a new user and gave it permission to the database:

[prompt]$ mysql -h localhost -u root -ppassword
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.41

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> USE mysql;
| Tables_in_mysql |
| columns_priv |
| db |
| func |
| host |
| tables_priv |
| user |
mysql> INSERT INTO user (Host, User, Password, Select_priv) VALUES ('', 'Dude1', password('supersecret'), 'Y');
mysql> FLUSH PRIVILEGES; - Required each time one makes a change to the GRANT table
mysql> GRANT ALL PRIVILEGES ON bedrock.* TO Dude1;
mysql> FLUSH PRIVILEGES; - Required each time one makes a change to the GRANT table
mysql> quit

Now we have a user account and a database that we can use for Contao CMS.

Install a Php plugin

Contao requires two additional extensions to be installed and enabled in PHP:
  • mbstring
  • SOAP

To enable these, send an email to oialinux at umn.edu and ask them to install it for you.

Now our environment is set up to install Contao.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)