Making a shortcut of xampp

luuk12345678905

New Member
Joined
Dec 7, 2022
Messages
14
Reaction score
2
Credits
114
i just installed linux but i want to use xampp cause i always did on windows but you have to always open it trough the terminal cause you need to open it as root but i tought i could make my own script so that i would be able to open xampp by just pressing the shortcut on my desktop but i can't figure it out, i hope you can help me out with extensive explanation because i am not yet wel known with everything about linux (fedora 37).
Screenshot from 2022-12-07 21-31-26.png
 


If it was me, I would start it with a systemd service file.
Create this file, /usr/lib/systemd/system/xampp.service

Code:
[Unit]
Description=This starts the xampp stack.

[Service]
ExecStart=/usr/bin/bash /opt/lampp/manager-linux-x64.run

[Install]
WantedBy=multi-user.target

Then type this...

sudo systemctl enable xampp
sudo systemctl start xammp

If that works, there are more options you an add.
 
Anything you'd install with XAMPP can be installed manually - or sometimes as a package, depending on your distro.
 
Anything you'd install with XAMPP can be installed manually - or sometimes as a package, depending on your distro.

KGIII is right.
xammp doesn't come with Fedora by default. You have to manually download it, install it, and set it up.

To get the equivalent setup...

sudo dnf install httpd
sudo dnf install php php-cli php-pdo


I notice xammp uses mysql/mariadb. The trend over the last few years for Fedora has been to use postgresql.
mysql is slightly faster, but postgres is more scalable if you have a large number of users.

sudo dnf install php-pgsql
(the php bindings for postgresql)

sudo dnf install postgresql postgresql-contrib postgresql-plperl postgresql-pltcl postgresql-server

sudo systemctl enable httpd

su - postgres
initdb -D /var/lib/pgdata

sudo systemctl enable postgresql


Then reboot.
There won't be an icon on your desktop for you to click on to start it.
It's just a process that runs all the time in the background. In Linux we call these daemons.

To view a webpage on your webserver, just open up a browser and go to..


If you want to make sure the php bindings are loaded...

create this file under /var/lib/www/html/index.php

Code:
<php?
    phpinfo();
?>

Open your browser again to...


If you want to view this from another computer, you'll have to open up the firewall.

firewall-cmd --add-service=http
firewall-cmd --add-service=http --permanent
 
@dos2unix i already have installed xampp and it works fine when i do
sudo /opt/lampp/manager-linux-x64.run

but i don't want to type this command in everytime i want to open xampp and i thought that there could be a way to create a shortcut or a script so that i can just run that on the desktop to open xampp.
 
i also tried this but it also doesn't work, it does show the icon.
You need to set the following to true because this binary seems to need a shell to launch.
Code:
Terminal=true
If you don't want to type a sudo password when it launches you need to create a sudo definition to allow the /opt/lampp/manager-linux-x64.run command with sudo without asking for a password. Which would look like this.
Code:
username ALL=(root) NOPASSWD: /opt/lampp/manager-linux-x64.run
 
Last edited:
@dos2unix i already have installed xampp and it works fine when i do
sudo /opt/lampp/manager-linux-x64.run

but i don't want to type this command in everytime i want to open xampp and i thought that there could be a way to create a shortcut or a script so that i can just run that on the desktop to open xampp.
Thanks!!! it works!
well i don't get what i am supposed to do with this
username ALL=(root) NOPASSWD: /opt/lampp/manager-linux-x64.run
but setting the terminal to true makes the shortcut work!!
i am so happy right know!
 
Thanks!!! it works!
well i don't get what i am supposed to do with this
username ALL=(root) NOPASSWD: /opt/lampp/manager-linux-x64.run
You add that to you sudo configuration replacing username with your actual username, but if you don't mind typing a password everytime you click it than you can just ignore that.
 
Last edited:


Top