How to automatically start zend server after boot on my mac

468 Views Asked by At

Ok I am Noob I don't know much about servers, commands etc. I am reading a book and I installed zend server on my mac using the .dmg file after that I have set up zend account. Then, I did few edits as suggested by the book:

sudo nano /usr/local/zend/bin/zendctl.sh

After entering your password you will now be in the Nano text editor, so move the cursor down a few lines using the down cursor key, and where you see the line that reads MySQL_EN="false", change the word false to true. Now scroll down some more until you find these two lines:

     case $1 in
           "start")

Below that, you’ll see an indented line that reads:

     $0 start-apache %

Just after this line, insert a new one that reads as follows:

     $0 start-MySQL %

This will allow MySQL to start, but now you need to scroll down a little more until you get to the section that starts with:

     "stop"

The same way I added the stop commands. But after I reboot my computer localhost:10088 doesn't work. The browser shows and error that: can't find the server. Everytime I have to type in the command in terminal to start zendserver:

     sudo /Library/StartupItems/ZendServer_init/zendctl.sh restart

to run the server back. I want to the server to start automatically after boot.

1

There are 1 best solutions below

0
On

I think the port you should be accessing is 10081, meaning your local url might look more like:

http://localhost:10081 instead of http://localhost:10088

If you were running Zend Server 7 on Yosemite (OS X 10.10) you might have run into this issue which was documented in the Zend Forums about a month after you posted here.

I installed Zend Server 8 on my Yosemite OS X 10.10 MacBook a few weeks ago and there were two parts to starting up on my system:

  1. zendctl.sh (this was edited already in Zend Server 8 for me though it might not have been in earlier versions)
  2. There was an entry in my cron job queue which executed this script on startup.

To see what's in your cron settings, open a terminal and run the following command:

$ crontab -l

You should see at least one entry for the script above, though you may see one each for zend server, apache, and MySQL. If not add them as documented in the article linked above or if you're using a different version of Zend Server as documented in the Installation Guide.