Shell Script to install xampp

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
saugatad

Shell Script to install xampp

Post by saugatad »

Hello everyone
I have created a small shell script that will automatically download the xampp, install it on the pricise location and arrange the permission for htdocs. The script will handle everything with the initialization of the script. It can be downloaded here--> https://dl.dropbox.com/u/17475393/xampp.sh

More information at : http://freshtutorial.com/xampp-linux/

I would love to hear feedback and suggestion.
Enjoy :P
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sagirfahmid3

Re: Shell Script to install xampp

Post by sagirfahmid3 »

This script is not impressive at all, no offence--and not only that, you have set up some dangerous permissions as well.
All you did was basically copy whatever they had on the XAMPP site's instructions, pasted it in a blank file and made it a script.

What WOULD make it more impressive is if you gave users more control over their XAMPP. Something including Zenity ("man zenity" in terminal) and a few toggle (radio button) switches that would start/stop/restart XAMPP. Basically, a GUI script.

But this script? It's not good enough, you need to put more effort into it. Learn some more BASH scripting--there's tons of free pdfs for that.
Also, I have a problem with "chmod 777 -R /opt/lampp/htdocs" someone with physical access to your computer can delete everything.

Code: Select all

#!/usr/bin/sh


#Script to install Xampp in your Linux System

####################################################
#						   #
#	      freshtutorial.com			   #
# 						   #
#						   #
####################################################

#Download XAMPP
wget -O xampp-linux-1.8.0.tar.gz http://sourceforge.net/projects/xampp/files/BETAS/xampp-linux-1.8.0.tar.gz/download

#Extract XAMPP in /opt 
tar xvzf xampp-linux-1.8.0.tar.gz -C /opt

#Change the perission of htdocs
chmod 777 -R /opt/lampp/htdocs

User avatar
Oscar799
Level 20
Level 20
Posts: 10405
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: Shell Script to install xampp

Post by Oscar799 »

Moved here by moderator
Image
Locked

Return to “Scripts & Bash”