Jump to content

Recommended Posts

Posted

hi

 

when we reboot our ubuntu server we have to manually run the following to start the web service.

 

sudo /opt/lampp/lampp start

 

followed by the password.

 

Can someone tell me how to get this to start the service with the password to run the service as ubuntu boots up like you can with a windows service.

 

Thanks

 

Mark

Posted

Edit the file /etc/init.d/rc.local and append the line:

 

/opt/lampp/lampp start

 

You need to edit it as root, if that doesn't mean anything to you try sudo gedit /etc/init.d/rc.local

Posted

you cant get an action to run in "sudo" without a password.

 

i assume lampp is xmapp for linux? because apache/mysql can be set as system services if they are installed manually.

 

its been a while scince i used ubuntu for anything but doesnt it have an init script? which has a list of things to be run as it enters each run level.

Posted
you cant get an action to run in "sudo" without a password.

 

/etc/init.d/rc.local is run during init as root, so this is irrelevant.

 

i assume lampp is xmapp for linux? because apache/mysql can be set as system services if they are installed manually.

 

The point of lampp is that you don't have to install them manually, everything gets put in this black box that you don't have to worry about. I'm not advocating this approach, but for simplicity and an easy intro it's an acceptable one.

 

its been a while scince i used ubuntu for anything but doesnt it have an init script? which has a list of things to be run as it enters each run level.

 

/opt/lampp/lampp is the init script, and that's why you call it from rc.local in the init system.

Posted
you cant get an action to run in "sudo" without a password.

 

Technically you should be able to, by editing /etc/sudoers to something like:

 

jsmith ALL=NOPASSWD:/opt/lampp/lampp

 

Meaning jsmith can run /opt/lampp/lampp without having to enter a password.

Posted
Technically you should be able to, by editing /etc/sudoers to something like:

 

True, but I didn't mention it because it's not a recommended thing, certainly not if you're unfamiliar with the consequences.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...