Jump to content

How to automate bash commands and execute with a simple click of a button?


greenace92

Recommended Posts

For example the command to make a directory mkdir which php has a command for that... but other functions that may need to be ran through bash but I would like to be triggered by a button.

 

To install a lamp server, I have to run a bunch of commands...

 

apt-get install php5

apt-get install mysql-server

apt-get install phpmyadmin

 

etc...

 

I'm aware that you can condense that into a single line, but how can I trigger this single line code that runs in bash, by clicking a button?

 

I was told of some "tools?" that automate server commands, can't recall at the moment.

Link to comment
Share on other sites

Why do you want this?

 

Executing administrative tasks with PHP or even running the script itself as root is generally the absolute last thing you want. The security of many PHP scripts is already scary enough, but a script with root privileges is orders of magnitudes worse. You need a damn good reason to take that risk.

Link to comment
Share on other sites

Probably laughable to say but this is for my own hosting "business" (laughs at himself for ineptitude).

 

When I had setup a Wordpress folder/installation for somebody, I had them point their domain to my server's ip address, I then had to create a directory for their domain, a new virtual host, then run the commands to install Wordpress. After that, I told them to go to their domain/wp-admin and that was that.

Automate this process after payment. That's what I'm looking to do.

 

Probably in over my head.

 

(You a dummy boy!) 

 

Yeah, so that's why I'm asking.

Link to comment
Share on other sites

Probably in over my head.

 

With all due respect: Yes.

 

Acting as a commercial hoster requires a professional infrastructure and a very solid security concept. Wordpress in particular is infamous for all kinds of vulnerabilities, so if you let random people install and manage their own Wordpress site on your server, that's nothing less than suicidal.

 

I strongly recommend you stay away from this. At best, I'd host a few sandboxed, manually installed Wordpress installations for close friends. Anything beyond that is unrealistic.

Link to comment
Share on other sites

To what extent is "commercial hoster" ?

 

What if when developing sites for persona/family-owned businesses, I also hosted those sites?

 

Thanks for the suggestion on sandboxing, I'll have to research on that.

 

I'm still working on the file upload process list you provided.

 

What about hosting in general as far as hosting the websites I built... perhaps "management" is allowed edits where I have built in editing functions in pages almost like a blog.

 

What does it take to not be unrealistic? More than one person? Years of experience?

 

I am looking to rent public cloud server(s) (cheap) to use as overflow/backup that would be automated.

 

I'm just wondering if I offer to develop websites then turn around say "Well, go find a host" and if they're in general not very well informed of the web, I would think that I could throw it on as a directory/new virtual host.

I wouldn't say to the extent of reseller hosting... but anyway, thanks for your time.

Edited by greenace92
Link to comment
Share on other sites

Honestly the vanilla wordpress versions are not something want piles to be managing across your server. Can enable the wordpress multisites and have an enormous amount of more control with some very important additional plugins.

 

When talking "professional hosting"...something like a virtualization manager using KVM, OpenVZ, Xen or VMWare.

Hosting virtual OS, virtual dedicated servers, virtual private servers. Account management, help tickets and support, cpu, memory, bandwidth, storage limitations. Client picks an OS, installs own server or turnkey package

Client can only have access their own containers

 

Waaaay back I hosted using hypervm and kloxo. Required centos.

Was never an easy thing to do then or even now, be prepared to get schooled with all this.

Hard to find the perfect for everything and flaw free solution.

Link to comment
Share on other sites

people suggested to use reseller hosting account(s) where the people I rented from could offer help as well.

 

The professional hosting stuff is beyond me now. At this point I'd be happy to have a few clients that I designed/built their websites and hosted them. The Wordpress was potential cheap/easy businesses as far as hosting something that I don't have to deal with much.

 

This seems to be how it is with OVH when I rent my VPS from them, complete freedom. Until something goes down... they also have 24/7 call support that's pretty nuts.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.