473,385 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

OT: managing a webserver through php

I have a lamp webserver that I'd like to simplify managing. This has
webmin, but webmin is so inscrutable that it is easier to manage this
through an SSH shell, which I'm hardly proficient at.

My needs are simple add a domain to apache.conf, create a mysql
database and user, setup a postgress (I think) email account and add an
FTP user and set some permissions and owners along the way.

So, what is the difference between system, exec, and shell_exec? And
surely there must be an easier light weight way to do this.

Jeff
Aug 11 '08 #1
4 1077
On Aug 11, 4:13 am, Jeff <jeff@spam_me_not.comwrote:
I have a lamp webserver that I'd like to simplify managing. This has
webmin, but webmin is so inscrutable that it is easier to manage this
through an SSH shell, which I'm hardly proficient at.

My needs are simple add a domain to apache.conf, create a mysql
database and user, setup a postgress (I think) email account and add an
FTP user and set some permissions and owners along the way.

So, what is the difference between system, exec, and shell_exec? And
surely there must be an easier light weight way to do this.

Jeff
If you don't know how to RTFM you're going to have lots of problems
implementing this: don't try and put this in a web page - but by all
means set up a script runable from an ssh session.

C.
Aug 12 '08 #2
C. (http://symcbean.blogspot.com/) wrote:
On Aug 11, 4:13 am, Jeff <jeff@spam_me_not.comwrote:
> I have a lamp webserver that I'd like to simplify managing. This has
webmin, but webmin is so inscrutable that it is easier to manage this
through an SSH shell, which I'm hardly proficient at.

My needs are simple add a domain to apache.conf, create a mysql
database and user, setup a postgress (I think) email account and add an
FTP user and set some permissions and owners along the way.

So, what is the difference between system, exec, and shell_exec? And
surely there must be an easier light weight way to do this.

Jeff

If you don't know how to RTFM you're going to have lots of problems
implementing this: don't try and put this in a web page - but by all
means set up a script runable from an ssh session.
I was hoping there was a library of utilities that I hadn't found. As
far as system, exec and exec_shell it appears to me that for my purposes
that they are identical, but some have options to pipe results elsewhere
that I won't need.

I have some familiarity of handling some of these tasks in perl, but
my desire is to switch to php, even though I know much less.

Jeff
>
C.
Aug 12 '08 #3
Jeff ha scritto:
C. (http://symcbean.blogspot.com/) wrote:
>On Aug 11, 4:13 am, Jeff <jeff@spam_me_not.comwrote:
>> I have a lamp webserver that I'd like to simplify managing. This has
webmin, but webmin is so inscrutable that it is easier to manage this
through an SSH shell, which I'm hardly proficient at.

My needs are simple add a domain to apache.conf, create a mysql
database and user, setup a postgress (I think) email account and add an
FTP user and set some permissions and owners along the way.

So, what is the difference between system, exec, and shell_exec? And
surely there must be an easier light weight way to do this.

Jeff

If you don't know how to RTFM you're going to have lots of problems
implementing this: don't try and put this in a web page - but by all
means set up a script runable from an ssh session.

I was hoping there was a library of utilities that I hadn't found. As
far as system, exec and exec_shell it appears to me that for my purposes
that they are identical, but some have options to pipe results elsewhere
that I won't need.

I have some familiarity of handling some of these tasks in perl, but my
desire is to switch to php, even though I know much less.

Jeff
>>
C.
I concurr with symcbean: if you have the time and skill to write such a
script in php then write it in bash and use it via ssh. It's much safer.

Consider also that if you use fucntions such as shell_exec then you
should anyway issue the commands, so it's very much more efficient to
put them in a bash script.
You can find tons of tutorial regarding bash scripting. It's easy and
can be fun :)

A different solution could be to install Plesk
Aug 13 '08 #4
Motosauro wrote:
Jeff ha scritto:
>C. (http://symcbean.blogspot.com/) wrote:
>>On Aug 11, 4:13 am, Jeff <jeff@spam_me_not.comwrote:
I have a lamp webserver that I'd like to simplify managing. This has
webmin, but webmin is so inscrutable that it is easier to manage this
through an SSH shell, which I'm hardly proficient at.

My needs are simple add a domain to apache.conf, create a mysql
database and user, setup a postgress (I think) email account and add an
FTP user and set some permissions and owners along the way.

So, what is the difference between system, exec, and shell_exec?
And
surely there must be an easier light weight way to do this.

Jeff

If you don't know how to RTFM you're going to have lots of problems
implementing this: don't try and put this in a web page - but by all
means set up a script runable from an ssh session.

I was hoping there was a library of utilities that I hadn't found. As
far as system, exec and exec_shell it appears to me that for my
purposes that they are identical, but some have options to pipe
results elsewhere that I won't need.

I have some familiarity of handling some of these tasks in perl, but
my desire is to switch to php, even though I know much less.

Jeff
>>>
C.

I concurr with symcbean: if you have the time and skill to write such a
script in php then write it in bash and use it via ssh. It's much safer.

Consider also that if you use fucntions such as shell_exec then you
should anyway issue the commands, so it's very much more efficient to
put them in a bash script.
You can find tons of tutorial regarding bash scripting. It's easy and
can be fun :)

A different solution could be to install Plesk
Plesk is too controlling. And it uses a mail client that is nearly
impossible to parse the mail logs if you need to.

I'll try the bash scripting route.

Jeff
Aug 13 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Torsten Wiebesiek | last post by:
Hi, I am currently working on a computer vision system. At the moment I'm adding support for firewire cameras. Since there is only one firewire system on a computer, I have writen a firewire...
7
by: tgh003 | last post by:
I would be interested to hear how others are managing their javascript (.js) files from the original code vs the obfuscated version they publish to their site/webapp. I currently manage 2 files,...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
15
by: David | last post by:
Hi, I have built a web application that will be a very high profile application. We had tested it, demonstrated it and shown that it all works. On a dress rehearsal run through, it failed...
2
by: fariba123 | last post by:
i have designed an employee information site. there is an option to generate pay slip. how can i show the employee related data based on the drop down list. i have found code example for...
0
by: Mohamed Muneer Selim | last post by:
I have found an application named "webmin", of course it has adifferent naming under Linux, that I don't know which is better to use, that manages webservers I don't know how good is this or how to...
1
by: swissclash79 | last post by:
Good morning everybody I have a question regarding configuring mappings in the development webserver. I am currently implementing a proxy server that is lied between the clients and a customer's...
1
by: Tina | last post by:
At my old company we used to put the IIS web server, containing our asp and asp.net websites, in the DMZ and the database on a machine that was behind the firewall. In this scenario we knew we...
1
by: mpc | last post by:
hello, how does one run a PHP page with a python webserver? Lets say i have a simple python web server running /path/webserver.py #!/usr/bin/env python from BaseHTTPServer import HTTPServer...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.