XOOPS, You Can Do It Again and Again
XOOPS is a content management system that allows you to handle a wide range of actions and operations in a dynamic and flexible way. XOOPS covers the needs of a large spectrum of users. Whether you are a common user looking for blog tools, or an advanced one who needs more complex or professional solutions, XOOPS fits the bill for both situations.
XOOPS is based on object-oriented PHP code. The source code is designed to make XOOPS extensible. You can write your own modules to extend its feature set, or download optional XOOPS modules that people contribute and share on the Internet.
This article covers the most relevant aspects of this helpful tool and examines common problems and gotchas.
One can quickly notice that XOOPS provides a lighter and simpler setup than similar content management systems, such as Plone and Drupal. Some may argue that Plone and Drupal have more depth, but the simple and clean structure of XOOPS makes it ideal for those who are getting started with content management tools.
I have been working on XOOPS for three years now, with a local Linux User Group. I have found XOOPS, during all this time, to be far from disappointing. Each particular need I've ever had was fulfilled by XOOPS. What's more, being GPL software, XOOPS gave me the chance to write new modules as I pleased or simply to modify the old ones. Needs require solutions, and solutions present challenges, but when challenges are taken by one's own hand, reward pays double.
Speed is another XOOPS advantage. Even when you have a large user database and hundreds of posts, XOOPS' response time is still among the best.
If you have ever used a gallery system, a blog or a content management system, you are probably familiar with the basic requirements, which tend to be common to all of these types of Web applications. You need a database, a Web server and scripting support. XOOPS uses MySQL, Apache and PHP, respectively. You also need some experience with basic Apache, PHP and MySQL server settings.
The first thing to do is to get the latest release of XOOPS from the XOOPS Web site (www.xoops.org). You should be able to find a tarball or a zip file containing the XOOPS GPL source code. Select the proper mirror, and download the file. Here's a sample download command (you may need to change the name of the file if XOOPS is updated to a newer version):
$ wget http://easynews.dl.sourceforge.net/sourceforge/ --<xoops/xoops-22.214.171.124.tar.gz
Most commercial host providers that use Linux for their servers support Apache, PHP and MySQL. So, if you are using a commercial host provider, you won't need to install any of these packages. You will simply need to upload the XOOPS source code to your host server. Depending on the host provider, you may have to unpack all the files first and upload the directory tree, or you may be able to upload the packed XOOPS file and unpack it on the host server.
If you are serving up XOOPS on your own Web server, you have to install the Apache Web Server with PHP support and the MySQL Database Server. You can find Apache packages for virtually every distribution of GNU/Linux, although you may have to install PHP support separately, depending on which distribution you are using.
Now, the first thing to do to get started with XOOPS is to place the XOOPS tarball's content in a folder that Apache can access. The default document directory for Apache often varies from distribution to distribution, but for our example installation, we use the directory /var/www (although in our case we will be modifying the default document root for Apache once we have the XOOPS files installed).
Move the tarball and untar it:
$ mv xoops-126.96.36.199.tar.gz /var/www/ $ tar -zxvf xoops-188.8.131.52.tar.gz
You should notice that you now have a new directory /var/www/html/.
In our installation, Apache stores its configuration files in the directory /etc/apache. You may find the Apache configuration files in some other directory (such as etc/httpd/) depending on your distribution. The easiest way to use XOOPS is to modify the Apache configuration file (usually called httpd.conf). Modify the DocumentRoot variable to tell Apache where you put the XOOPS source code. In our case, you want to set the DocumentRoot to /var/www/html/:
We'll assume you have PHP and MySQL installed and ready to go. If you are running XOOPS on your own server, it is possible but unlikely that you will need to modify the default settings for PHP in order to make XOOPS work properly. PHP uses the file php.ini for its configuration.
You normally use PHP as an Apache module. If your installation hasn't already done so, you can add the following lines to your Apache configuration to get PHP working with Apache:
LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php .phtml
You can set up Apache with PHP version 5, but if you do, you might run into some problems with modules and code structures. So, if you don't absolutely need to use PHP 5, use the version suggested by the XOOPS team: PHP 4.0.5 or another minor version of PHP 4.
If you decide to use PHP 5, add the following lines to the httpd.conf file instead of the ones above:
LoadModule php5_module libexec/libphp5.so AddModule mod_php5.c AddType application/x-httpd-php-source .phps
Here is how to test Apache and PHP to see if you have both configured and working correctly. Take a text editor and create a file called /var/www/html/info.php (make sure it has the proper ownership and privileges so that Apache can read and use the file). Put the following lines in the file:
<?php phpinfo(); ?>
You may have to modify the privileges. Here's a sample command to do that:
$ chmod +xr /var/www/html/info.php
If you have Apache running on your own server, point your browser to http://127.0.0.1/info.php. If you are using a commercial host, point your browser to http://yourdomain/info.php. If everything is working, your browser should show something like what you see in Figure 1.
If you're using a commercial host, the MySQL Database Server will already be up and running.
If you are using your own server, you may need to configure the MySQL Database Server. The configuration file for the MySQL server is called my.cnf. You will find it with your distribution, or in the source code. MySQL commonly includes three sample files named my-large.cnf, my-medium.cnf and my-small.cnf. Choose the one that seems right for your needs, and copy it to my.cnf as your starting configuration. XOOPS doesn't need any special database settings, so you can use the my-small.cnf file as the template for your configuration. Once you are satisfied with the configuration, start up the MySQL server.
- Great Scott! It's Version 13!
- Adminer—Better Than Awesome!
- RSS Feeds
- Divx# Watch The Other Woman Full HD Online Streaming Viooz
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- It Actually Is Rocket Science
- Tech Tip: Really Simple HTTP Server with Python
- Linux Kernel Testing and Debugging
- Linux Systems Administrator
- Numerical Python