By go4christian
I followed every step in this tutorial till the last one: https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-6#StepEight—SetUpAutostart
When I tried to execute the commands I got an issue that “chkconfig is currently not installed”. After installing it with “sudo apt-get install chkconfig” and executing the commands I get the following error message “Unknown option: levels”.
Are these commands necessary and if so, how do I execute them. One last information: I have created a user with root privileges (I followed this excellent tutorial: https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04).
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The exact “Unknown option: levels” output leads me to believe one out of two possible scenarios: <br> <br>1) You missed the – before the “levels” option. That would completely invalidate the syntax. <br>2) You have mistyped the order of arguments for the command, since what usually happens is that we forget of those arguments along the way and then the chkconfig command just invalidates the whole line. <br> <br>See examples: <br> <br>sudo chkconfig --levels 235 mysqld on <br>sudo chkconfig --levels 235 nginx on <br>sudo chkconfig --levels 235 php-fpm on <br> <br>From the tutorial you linked runs completely fine in my box. <br>But when I tried to issue a chkconfig command on my own (before looking at the tutorial.) I had typed: <br> <br>chkconfig --levels 235 mysqld <br> <br>Which brought me to: <br> <br>“only one runlevel may be specified for a chkconfig query”. Because I had forgotten to add the “on” argument at last. Remember: <br> <br>chkconfig --levels <levels you want> <service name> <on/off> <br> <br>That should always be the syntax, in that order, or it will fail. Also, most linux/unix commands are case sensitive, in a way that “chkconfig --levels” and “chkconfig --LEVELS” might lead to two completely different outputs or expected behavior. <br>From your description I’m inclined to believe you forgot the – suffix for the “levels” option, which is a must when arguments take more than one letter (i.e: “netstat -h” / “netstat --help” which would output exactly the same.). <br> <br> <br>Hope it helps! :)
Omg, I’m sorry, I totally overlooked the “CentOS 6” part, I have a LEMP environment setup on Ubuntu, no wonder this didn’t work. <br> <br>So sorry for wasting your time and thank you for your detailed explanation, hopefully this answer will help someone in the future.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.