Section 2.1 - Installing Enano on your server

Enano has been optimized for an extremely fast and simple installation on most servers. If you are familiar with installing web applications like phpBB, MediaWiki, or Mambo, installing Enano will be about as straightforward as Bert's eyebrow.

For those of you who haven't installed a web application before, here is the basic procedure for doing it. First we will go over a short lesson on how Enano works. Then go through the system requirements, and finally we guide you in actually installing the database.

How Enano works its magic

Enano, like many other web applications, has two important parts: the codebase that processes pages and handles logic, and the database, which stores almost all the data about your website.

The Enano frontend, or the logic that provides access to the database, is really where most of the Enano team's work goes. The frontend is written in a language known as PHP. It controls the actual page "look and feel", and controls all access to the database.

The backend is a relational database, which is powered by a program called MySQL. MySQL allows data to be stored and retrieved through a table-style layout using a language called SQL, the Structured Query Language. Enano uses MySQL to store everything about your website.

When you first install Enano, the frontend (the PHP part) creates a minimal database that the rest of the frontend can access, and then it writes out a configuration file (config.php) that tells Enano how to connect and log in to MySQL.

What you'll need

Enano has several important requirements in order to work. We'll first go through what you'll need if you have an external web host (like 1&1 or Lypha) and then we'll explain how to run your own server with Enano.

Requirements for Enano on shared hosting services

Your webhost of choice should meet these requirements:

  • The host provides support for PHP scripts
  • You have access to at least one MySQL database
  • The server supports writing files
  • The server is running PHP version 4.3.0 or later
  • The server is running MySQL 4.1 or later
  • Optional: The server is running Apache Web Server, version 1.3.22 or later
  • If the server is running Apache, it should preferably provide support for mod_rewrite. Ask your host for more information.
  • FTP or SSH access

Requirements for Enano on your own server

Some people are total diehards (myself included). If you have a spare computer lying around you might want to run Enano on that, that will mean that you have complete control over your website.

Warning: many Internet service providers forbid running a server through a DSL or cable line. Before setting up Enano on your server, you should check your ISP's terms of use. The Enano project is not responsible for any *ahem* problems that arise from running a website out of your house.

You'll need:

  • A spare computer. Preferably 1GHz or faster, and at least 512MB of RAM.
  • At least 10GB of hard disk space
  • An operating system. Windows will suffice for beginners, but you will get much better performance if you run Linux on it. Fedora and Ubuntu are both good distributions to start with for running a server.
  • The latest versions of Apache and PHP (although you probably want Apache 2.0.x if your server runs Windows). If you use Linux, it is recommended that you compile Apache and PHP yourself, or at least install the php-devel package.
  • Be sure to install MySQL version 4.1 or later. Version 5.0 is recommended, because it is much more secure, and the database sizes are significantly smaller.

Requirements for Enano on a SourceForge.net site

The servers run at SourceForge.net are slightly more restrictive in some respects than many webhosts are. One of the main limitations is that all the filesystems on the web servers are mounted read-only. For more information, please see Installing Enano on a SourceForge.net-hosted site.

The installation procedure

Uploading the files

Now that we know a little about how Enano works and what the prerequisites are, let's dive into the installation process.

The first thing you need to do is download Enano. If your computer runs Windows and you use FTP to access your server, get the .zip version. Otherwise, get the tar.gz or tar.bz2 version.

Next, you need to get the Enano files onto your server. Depending on what your server provides, you can do this by either using FTP or SSH. SSH is the preferred method because it's faster, but FTP will work just fine too.

To upload the Enano files using FTP:

  1. Make sure you have an FTP client installed on your computer. If you don't, FileZilla is a good choice. SmartFTP is OK too, but it's not Free.
  2. Connect to your server. You webhost will provide the login details.
  3. Change to the directory where you want to install Enano. Usually this directory is in the "public_html" or "htdocs" directory on your server.
  4. Unzip the Enano file that you downloaded
  5. Upload the entire contents of the ZIP file (but not the ZIP file itself)
  6. Use your FTP client's CHMOD option to change config.php to "666" or "-rw-rw-rw-". If you plan to use the Tiny URLs (or rewritten URLs) feature, you should also CHMOD .htaccess.new and .htaccess (if it exists) to 666. This allows Enano to configure Apache to rewrite URLs to point to Enano. In Enano 1.1.x, if a .htaccess file already exists, Enano will append its rules to it. Otherwise the installer will just rename your .htaccess.new to .htaccess.
  7. You're done with the uploading stage

To upload the Enano files using SSH on Windows computers:

  1. Get yourself an SSH client. PuTTY is about as good as they get.
  2. Connect to your server. You may need an encryption key, your webhost will provide this.
  3. Download PSCP, and save it to the same directory where the Enano ZIP file is.
  4. Open a command prompt, change to the folder where the downloaded files are, then enter this command:
pscp enano-version.zip username@www.yoursite.com:/your/home/directory/public_html/enano.zip
Replace "version" with the Enano version you downloaded (e.g. 1.0b3), replace "username" with the username your host gave you, replace "www.yoursite.com" with your hostname or domain name, and replace "/your/home/directory/public_html" with the path to your website, wherever that may be. Typically it is the public_html or htdocs folder inside of your home directory.
  • Open PuTTY and log into your server
  • Change to your document root directory (again, your host will provide this)
  • Type the following command:
tar xzf enano-version.tar.gz        # if you have the tar.gz version
tar xjf enano-version.tar.bz2       # if you have the tar.bz2 version
  • If you would prefer that your site URL be along the lines of "www.yoursite.com/enano/index.php?/Whatever", type "chmod 666 enano/config.php". Otherwise, type "mv enano/* enano/.htaccess ./ && rm -fr enano" to clean up the temporary Enano directory, then do "chmod 666 config.php".
  • You're done with the uploading stage

Installing the database

Now we're ready for the final step - installing the database schema.

  1. Point your web browser to the "install.php" file on your website in the directory where you uploaded the Enano files
  2. You should be presented with a license agreement. Read through it (or at least the "human readable" part) and hit Continue.
  3. Next you will find yourself at the system requirements page. Enano checks your server out to make sure that it can handle the various components of Enano. Most servers will give you at least one warning, that's OK and expected.
  4. If there are any errors on the requirements page, correct them, then hit refresh to have the installer script re-examine your server.
  5. Now you will find yourself at the database information page. Enter the database host, name, username, and password provided by your webhost, then hit Test Connection to verify that everything works. If you're running your own server, you can skip the process of creating the database and user by letting the installer do it, by entering the username "root" under the Database Administrative Login field. That field requires a password to be typed in, just as a precaution to keep you from not setting a password for your MySQL root user (very dangerous!).
  6. Click continue, and you will be presented with some basic configuration options for your site. You can change the name, site description, and copyright from the administration panel at any time.
  7. The configuration page will also ask you what you want the page URL scheme to be.
    • The first option make the URLs rather ugly, but it works unconditionally on all servers: http://www.example.com/index.php?title=Whatever
    • The second option requires that your server be running Apache. It makes the URLs a little prettier: http://www.example.com/index.php/Whatever
    • The third option is what you see on this site: it uses Apache's mod_rewrite to make your URLs look really cool. Using this option requires the Windows Compatibility Patch to be installed if your server runs Apache 2.2 or later on Microsoft Windows. Example: http://www.example.com/Whatever
  1. The next page allows you to set the initial username and password for your site. The credentials you enter here will be used to give you administrative rights to your website, so don't forget the login information you enter here!
  2. Finally you are ready to install the database. You will be presented with a confirmation page that will let you overview your settings. If everything looks OK then click Install Enano, and the database will be installed. Hopefully now you will be taken to your new website.
  3. That's all there is to it!
Previous Section 2.1 - Installing Enano on your server Next
Design principles Up one level Logging in and administering your site