LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2010, 05:08 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
Help required Unix and Web page Integration.


HI guys ,

I want to create a simple website which can communicate with unix server.
For example i want to run some command on a unix server through a website.

What will be the best approach to do the same.

Kindly help .
 
Old 03-08-2010, 05:24 AM   #2
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
What commands does the website need to execute on the remote Unix server?
 
1 members found this post helpful.
Old 03-08-2010, 05:36 AM   #3
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Thanks for the reply,
any command that a normal person can run on terminal.
I just want the website to interpret the output and display the content based on the output.
 
Old 03-08-2010, 05:50 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You can use PHP scripts to run unix command. But you need to be specific about your needs. Your question is very vague.
 
1 members found this post helpful.
Old 03-08-2010, 05:56 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Common ways to do this are using java and/or php. I am sure you can even find pre-made applets in places like hotscripts.com for this purpose.
 
1 members found this post helpful.
Old 03-08-2010, 06:08 AM   #6
Mistro
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Rep: Reputation: 1
I believe webmin has a section that let you do that. I think it was a java applet or something. If I remember (I haven't used Webmin in a few years) Webmin also has (had?) a few security flaws. I'm assuming they'd have fixed them by now since it's been a few years and should be more mature, but try googling around just in case.

http://www.webmin.com

Also, remember to set your root password to something strong if you will be exposing this interface to the world.

Last edited by Mistro; 03-08-2010 at 06:09 AM. Reason: Typos
 
1 members found this post helpful.
Old 03-08-2010, 06:30 AM   #7
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
As others have pointed out, you can achieve this using a scripting language such PHP or Perl. The caveat is this;
If the server is remote to the webserver hosting the website you'll need to set something up to listen to (and authenticate, cleanse and rate control) the requests. There are probably several ways to do it, but I'd probably go for setting up a lightweight server on the Unix box with an ACL limiting access and a bunch of 'helper' scripts to do what you want.

It's somewhat easier if the webserver *is* the same server as the unix box you want to run the commands on as you dispense with helper scripts and make the calls directly (after ensuring security of course).
 
1 members found this post helpful.
Old 03-08-2010, 11:01 PM   #8
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Thanks all for your reply and support for my question.

As i m completely unaware of PHP language .Can u please list out good some website to start with PHP from scratch.
 
Old 03-08-2010, 11:03 PM   #9
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by linuxlover.chaitanya View Post
You can use PHP scripts to run unix command. But you need to be specific about your needs. Your question is very vague.
We are running Oracle virtual servers on our environment .We are running some virtual machines inside virtual servers.
For starting and stopping the machines we have to manually log into the server and run the command.
I just want to automate the work by giving web interface for the user.
 
Old 03-08-2010, 11:51 PM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You can use php web page to do that but you will need a running web server. And use that php script for running the commands that you need. That should not be too hard.
 
Old 03-09-2010, 12:54 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,300

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
You'll need this http://www.php.net/docs.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 9 02-28-2015 12:07 AM
FreeRadius Server Configuration and Integration with LDAP help required swati_sharma Linux - Newbie 3 10-06-2008 03:09 PM
FreeRadius Server Configuration and Integration with LDAP help required swati_sharma Linux - General 2 10-06-2008 03:05 PM
FreeRadius Server Configuration and Integration with LDAP help required swati_sharma Linux - Networking 3 10-06-2008 03:01 PM
FreeRadius Server Configuration and Integration with LDAP help required swati_sharma Linux - Distributions 2 10-04-2008 10:05 AM


All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration