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:
- First become a swadm user:
sudo su - swadm - now we need to create a directory for MySQL databases:
mkdir /swadm/mysql - 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 - Next we launch the MySQL service
sudo /etc/service mysqld start - 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.41Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> USE mysql;
mysql> SHOW TABLES;
+-----------------+
| 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.