Quick links: Content - sections - sub sections
EN FR

This chapter explains how to install an existing application developed with Jelix. Let's imagine we want to install an application named 'testapp'.

Files installations

Depending of the project, you may have an archive (zip or tar.gz) which contains all files. Or you may have to retrieve files from a source code repository (git, mercurial, subversion...). Or you are using modern tools to deploy sources to the server.

Whatever the solution you are using, you get a directory named 'testapp' for example, and you may want to install this directory into the /srv/ directory of your server. Here the directories you have:


  /srv/testapp/     application directory
      install/      script to install the application
      modules/      modules of the application
      plugins/      plugins of the application
      app/responses/  common responses for the application
      app/system/    static configuration files of the application
      temp/         where temporary files will be stored
      var/          contain all the files created or that can be modified by Jelix during execution
         config/    configuration files of the application depending of the environment
         log/       log files of jelix and of the application
      www/          root of the site of the application (document root)

You may have a lib/ directory too, provided into the source code. If not, you may have to run Composer to retrieve Jelix, or download an archive of Jelix.

The tree structure of the sources is by default organized in order to install the application on a server on which you can specify the public root directory of the site (document root). This directory is /srv/testapp/www .

You will of course be able to move the content of www/ to an other directory, but be sure other files are not accessible from a browser, for security reasons.

Renaming configuration files

In testapp/var/config, you may have *.dist files. Rename them by removing this .dist suffix. You have certainly some things to modify in this new files, like database configuration in profiles.ini.php etc. We will see how exactly below.

Configuring the server

You have to configure the web server (virtual host, with a document root..), and to configure certainly a SQL database.

Read the corresponding chapter before continuing.

Launching the installer of Jelix

There is three ways to install the application, depending what is providing with your application.

With a wizard

If there is a testapp/www/install.php script, this is certainly a script, a wizard, to launch with your browser. So open your browser, and go to the url of this script, for instance http://www.mysite.com/install.php. Follow instructions and that's it. The wizard will probably modify configuration file for you (database access etc), after asking you informations about it. The installation is then done.

It is recommended to remove the install.php file (save it in a protected folder), so it is not accessible anymore from the web.

With the application installer

Launch the script testapp/install/configurator.php to configure the application. Some modules configurators may change some things into configuration files and may ask you some informations.

Perhaps there will be parameters to set by hand. Fill all needed parameters in profiles.ini.php and in localconfig.ini.php (read the documentation of the application to know what exactly you have to change).

Then launch the testapp/install/installer.php script, it will install the application, create tables in the database and so on.

After this script, the application should work correctly.

If the installation system is deactivated into the configuration

In some project, especially on internal projects where the installation process is very specific, a choice has probably be made to deactivate the installation system (disableInstallers=on). In this case, no need to launch the application installer or the jelix installer. However, you have to install all things needed by the application, "by hand", or by your own scripts of your installation process.