Forums MAMPStack

ctlscript.sh in Terminal?

Subscribe to ctlscript.sh in Terminal? 4 post(s), 4 voice(s)

 
Avatar bitnewbee 1 post

Hi All,

True to my name sake, I am a TOTAL newbie; I do want to learn, and firmly believe in RTFM. But, after reading the mampstack.pdf I am not clear as to where to “RUN” the ctlscript.sh. I opened the “use_mampstack” Terminal in the “mampstack-1.0-beta-4” directory and get the following:

Last login: Sat Oct 11 21:51:02 on ttys000
/Applications/mampstack-1.0-beta-4/use_mampstack ; exit;
BigMac:~ home$ /Applications/mampstack-1.0-beta-4/use_mampstack ; exit;
bash-3.2$

Then I type or paste:

$ /Applications/mampstack-1.0-beta-4/ctlscript.sh start apache (I also only type “ctlscript.sh”) and get the following:

bash-3.2$ ctlscript.sh start apache
bash: ctlscript.sh: command not found

If I add “Sudo” or “root” I get the same thing (except it warns me about not using “Sudo” properly) . Luckily, I am using the BitNami Control Panel to start and stop these services; but, I am more concerned that either this is a “USER ERROR” or I am missing something here.

Also, I could not find the MAMPctl.sh utility: mentioned in the “Readme.txt” file…

Any thoughts or input would be greatly appreciated.

Thanks,

Newbee in training

 
Avatar antonio Administrator 621 post(s)

Hi bitnewbee,

On Unix systems (like OS X and Linux), to execute a file you have to use either an absolute or relative path. If you try to execute the control script by just typing

ctlscript.sh start

as you did, the operating system is looking for it in the folders that are defined in the PATH environment variable. To prevent it, you just call it using a relative path, ie, if you are in the very same directory in which the script is located (<installdir>/scripts), you need to call it by

./ctlscript.sh

as the dot is a symbol meaning “current directory”.

About the README.txt issue, that is likely to be a problem of not having updated the documentation accordingly, as that was changed a long time ago, thanks for reporting.

Don’t hesitate to post if you need more help, we’ll be glad to be useful :)

Cheers

 
Avatar Kim McGraw 1 post

Hi there—

There are a few threads on this, but I also need help. I too am getting mysql startup errors—running as root or with sudo….I also tried just kicking off mysql itself with a similar error….. I get the page ‘wiki! has a problem’.... Is there a solution>

kim-mcgraws-macbook-pro:MediaWiki kimmyquay$ ./ctlscript.sh start
Starting mysqld.bin daemon with databases from /Users/kimmyquay/Sites/MediaWiki/mysql/data
/Users/kimmyquay/Sites/MediaWiki/mysql/scripts/ctl.sh : mysql could not be started
Syntax OK
/Users/kimmyquay/Sites/MediaWiki/apache2/scripts/ctl.sh : httpd started at port 8080
kim-mcgraws-macbook-pro:MediaWiki kimmyquay$ STOPPING server from pid file /Users/kimmyquay/Sites/MediaWiki/mysql/data/kim-mcgraws-macbook-pro.local.pid
090128 11:23:03 mysqld ended

kim-mcgraws-macbook-pro:MediaWiki kimmyquay$ ./ctlscript.sh stop
Syntax OK
/Users/kimmyquay/Sites/MediaWiki/apache2/scripts/ctl.sh : httpd stopped
/Users/kimmyquay/Sites/MediaWiki/mysql/scripts/ctl.sh : mysql not running
kim-mcgraws-macbook-pro:MediaWiki kimmyquay$ sudo ./ctlscript.sh start
Password:
Starting mysqld.bin daemon with databases from /Users/kimmyquay/Sites/MediaWiki/mysql/data
STOPPING server from pid file /Users/kimmyquay/Sites/MediaWiki/mysql/data/kim-mcgraws-macbook-pro.local.pid
090128 11:28:59 mysqld ended

/Users/kimmyquay/Sites/MediaWiki/mysql/scripts/ctl.sh : mysql could not be started
Syntax OK
/Users/kimmyquay/Sites/MediaWiki/apache2/scripts/ctl.sh : httpd started at port 8080
kim-mcgraws-macbook-pro:MediaWiki kimmyquay$

 
Avatar beltran Administrator 864 post(s)

Hi,

It seems that MySQL can not be started. Could you post the mysql/data/mysqld.log file? About to execute using the regular user or root user, you should use the regular user if you have installed the stack as non root user.

Cheers.

Forums MAMPStack