Shell Script to install xampp

Forum rules
Before you post please read how to get help

Shell Script to install xampp

Postby saugatad on Wed Aug 29, 2012 1:54 pm

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
saugatad
Level 1
Level 1
 
Posts: 1
Joined: Wed Aug 29, 2012 1:51 pm

Linux Mint is funded by ads and donations.
 

Re: Shell Script to install xampp

Postby sagirfahmid3 on Wed Aug 29, 2012 4:39 pm

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
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Re: Shell Script to install xampp

Postby Oscar799 on Thu Aug 30, 2012 3:32 am

Moved here by moderator
Image
"Don't fix it if it ain't broken,don't break it if you can't fix it" Husse
Registered Linux User #511789
User avatar
Oscar799
Level 18
Level 18
 
Posts: 8967
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 2 guests