Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Xampp English

Lyes Saadi edited this page Apr 20, 2018 · 3 revisions

In case of problem through the installation, open an issue !

Installation with Xampp

1. Installing the web server

Download Xampp

You can start by installing the web server (we'll install Apache here, if you want to install another web server, follow the manual installation), go here and choose the most recent version (warning, the most recent version when I write these lines is in the bottom of the list, then, look carefully to the version number)!

Installing Xampp

You'll have a .run file, weird extension, isn't it? To launch the installer, open the terminal of your distribution / desktop environment and execute this:

$ cd # Path where there's your .run file
# ./xampp-linux-x64-XXX-0-installer.run # Replace XXX by your Xampp version

Then, install Xampp, by specifying what and where to install, I recommend to install all things and to let the default path!

Launch Xampp

Let's launch Xampp! It's really easy, you just have to execute this:

$ /opt/lampp/lampp start

Note that if you didn't let the default path, modify /opt/lampp/ by your path!

Use the command "stop"... to stop Xampp!

Now, if you go to localhost/ a home page will render, that's mean that the installation work, else, if there's a problem, open an issue! We'll help you!

2. Installing Composer

Great, we have installed the web server! Now, you just have to install a little program for dependencies! Go here and follow the instructions by copying the lines in your terminal!

Then add this command:

# mv composer.phar /usr/bin/composer

You can also install composer with your distribution's package manager, which I advise!

3. Installing Git

If you're using GitHub, you surely use Git, but, in doubt, I'll learn you how to install Git! You just have to execute the command that correspond to your distribution here! Isn't easy?

Note that you have to be in super user to execute most commands!

4. Download the project

Copy these commands :

$ cd /opt/lampp/htdocs/ # Change /opt/lampp with your path if you didn't choose the default path!
$ git clone https://github.com/TheOpenMedium/HAY.git

That's all 😄!

5. Installing the dependencies

Now, we'll use composer to install dependencies by executing this:

$ cd /opt/lampp/HAY/
$ composer install

This will take a moment, but after that, Symfony is ready to use, to launch Symfony Server, write this... Why, are you looking to me like that? Why did we make all that to use a Symfony server? For a simple reason, installing PHP, MariaDB (or MySQL if you want) and Apache easily! But using a Symfony server is better! Great, Execute this now:

$ cd /opt/lampp/HAY/
$ php bin/console server:run

Great, if you have no error, Symfony work! For stopping it, do ctrl + c. Else, open an issue, we'll help you!

You can also go to localhost:8000/ to see the project, but you'll have a beautiful exception! Why? Because, we didn't have configured Symfony yet, we'll see that now!

6. Tips

Add your tips by opening an issue 👍!

Creating a shortcut in start menu

To do that, go to usr/share/applications and create a new file with the .desktop extension and edit it to copy these lines:

[Desktop Entry]
Categories=Network;Development;
Exec=php /opt/lampp/HAY/bin/console server:run
Path=/opt/lampp/HAY/
Icon=/opt/lampp/HAY/public/ressources/HAYlogo.png
Terminal=false
Type=Application
Name=HAY
Comment=HAY Project

Modify /opt/lampp by your path if you didn't choose the default path!

If you want to launch Xampp instead of the Symfony server, change Exec with this command /opt/lampp/lampp start, Path with /opt/lampp, Icon to the path of a Xampp icon that you can download here.

Go now to your start menu to launch it like an application, and surprise! There's a HAY "application" that launch the Symfony web server! Note: HAY is in the submenus "Internet" / "Network" and "Programming" / "Development".