Lately, I've been trying out several Java-based content management systems. There are so many Java-based CMS in the market, and each of them is different in functionality and features. For example, there are DotCMS, Hippo, Magnolia and OpenCMS that you can freely download and install. This post introduces Ametys and shows how to install it on Debian Linux.
Installing Tomcat and MySQL
Ametys is a content management system that uses Java servlet technology and Apache Cocoon. For the servlet container, I use Tomcat. Before setting up Ametys, install Java, tomcat and MySQL. On Debian or Ubuntu Linux, you can use apt-get as follows:
apt-get install openjdk-7-jre-headless libtcnative1 tomcat7 mysql-server-5.5 mysql-client-5.5 libmysql-java
If you point your browser at http://localhost:8080, you'll see the default Web page for Tomcat. Before deploying Ametys, stop Tomcat.
Creating Ametys database
Let's create a MySQL database for Ametys CMS. Run
mysql to log in to the MySQL server. You'll be required to enter the password as root.
mysql -u root -p
At the mysql prompt, enter the following commands to create a database called AmetysDB. In this example, we're creating a user "ametys" whose password is "sytema".
CREATE DATABASE AmetysDB CHARACTER SET 'utf8'; CREATE USER ametys@localhost IDENTIFIED BY 'sytema'; GRANT ALL PRIVILEGES ON AmetysDB.* TO ametys@localhost WITH GRANT OPTION; quit
Now copy mysql-connector-java-5.1.16.jar to the /var/lib/tomcat7/common directory or make a symbolic link there. That MySQL JDBC driver is located in /usr/share/java on Debian Linux.
cp /usr/share/java/mysql-connector-java-5.1.16.jar /var/lib/tomcat7/common
If you want to manually create tables for Ametys database, take a look at the scripts in /var/lib/tomcat7/webapps/cms/WEB-INF/scripts/mysql directory.
I downloaded the deployment version of Ametys (ametys-3.5.3.zip) from here. I unpacked it into the webapps directory (/var/lib/tomcat7/webapps).
cd /var/lib/tomcat7/webapps unzip ~/ametys-3.5.3.zip chown -R tomcat7:tomcat7 cms chown -R tomcat7:tomcat7 site
To make Ametys CMS the default Web application, I removed the ROOT directory and renamed the site directory to ROOT.
rm -rf ROOT mv site ROOT
Then, I restart Tomcat.
First-time Configuration of Ametys
To configure Ametys for the first time, I opened this URL in a Web browser.
Ametys displays "UNABLE TO LOAD CONFIGURATION" message. Don't worry. We are going through the first-time setup.
When I click on the link "Configure the application", I see a pop-up dialog that asks me for the Username and Password. I type "admin" for the Username, and "admin" for the Password. Frankly, it took me a while to figure out the username/password combination!
You'll see the Configuration page where you can set up the following settings:
- Back-office URL: http://www.yourdomain.com:8080/cms
- Driver: com.mysql.jdbc.Driver
- Url: jdbc:mysql://127.0.0.1/ametysdb
- User: ametys
- Password: sytema
- JCR Repository Path: WEB-INF/data/repository
- Uploads Destination Directory: WEB-INF/data/uploads
- Front-office IP addresses: 127.0.0.1, 188.8.131.52
- Front-office Apps: http://www.yourdomain.com:8080
After entering all necessary information, click Save and Restart.
You'll see the screen as shown below.
You can't pass the screen because no user was defined yet. Now, type in this URL: http://127.0.0.1:8080/cms/_admin
You are at the Administrator area where you can manage various aspects of Ametys. Click the "Users" icon to add new users. Then, click the "Websites" icon to start a new site. This wraps up initial configuation of Ametys. So far Ametys looks fine to me. Stay tuned for more posts on Ametys!