June 13, 2012

Beginner

How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6

Tagged In: Nginx, Cent Os, My Sql, Php

About Lemp


LEMP stack is a group of open source software to get web servers up and running. The acronym stands for Linux, nginx (pronounced Engine x), MySQL, and PHP. Since the server is already running CentOS, the linux part is taken care of. Here is how to install the rest.

Step One—Install the Required Repositories


We will be installing all of the required software with Yum. However, because neither nginx nor php-fpm are available straight from CentOS, we need to download two extra repositories to our virtual private server first.
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Step Two—Install MySQL


The next step is to begin installing the server software on the virtual private server, starting with MySQL and dependancies.
 sudo yum install mysql mysql-server

Once the download is complete, restart MySQL:
sudo /etc/init.d/mysqld restart

You can do some configuration of MySQL with this command:
sudo /usr/bin/mysql_secure_installation
The prompt will ask you for your current root password.

Since you just installed MySQL, you most likely won’t have one, so leave it blank by pressing enter.
Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Then the prompt will ask you if you want to set a root password. Go ahead and choose Y and follow the instructions.

CentOS automates the process of setting up MySQL, asking you a series of yes or no questions.

It’s easiest just to say Yes to all the options. At the end, MySQL will reload and implement the changes.
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y                                            
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Step Three—Install nginx


As with MySQL, we will install nginx on our virtual private server using yum:
sudo yum install nginx

nginx does not start on its own. To get nginx running, type:
sudo /etc/init.d/nginx start

You can confirm that nginx has installed on your virtual private server by directing your browser to your IP address. You can run the following command to reveal your server’s IP address.
ifconfig eth0 | grep inet | awk '{ print $2 }'

Step Four—Install PHP


The php-fpm package is located within the REMI repository, which, at this point, is disabled. The first thing we need to do is enable the REMI repository and install php and php-fpm:
sudo yum --enablerepo=remi install php-fpm php-mysql

Step Five—Configure php


We need to make one small change in the php configuration. Open up php.ini:
 sudo vi /etc/php.ini

Find the line, cgi.fix_pathinfo=1, and change the 1 to 0.
cgi.fix_pathinfo=0

If this number is kept as a 1, the php interpreter will do its best to process the file that is as near to the requested file as possible. This is a possible security risk. If this number is set to 0, conversely, the interpreter will only process the exact file path—a much safer alternative. Save and Exit.

Step Six—Configure nginx


Open up the default nginx config file:
sudo vi /etc/nginx/nginx.conf

Raise the number of worker processes to 4 then save and exit that file.

Now we should configure the nginx virtual hosts. In order to make the default nginx file more concise, the virtual host details are in a different location.
sudo vi /etc/nginx/conf.d/default.conf

The configuration should include the changes below (the details of the changes are under the config information):
#
# The default server
#
server {
    listen       80;
    server_name example.com;

   
    location / {
        root   /usr/share/nginx/html;
        index index.php  index.html index.htm;
    }

    error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           /usr/share/nginx/html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}


Here are the details of the changes:

  • Add index.php within the index line.

  • Change the server_name to your domain name or IP address (replace the example.com in the configuration)

  • Change the root to /usr/share/nginx/html;

  • Uncomment the section beginning with "location ~ \.php$ {",

  • Change the root to access the actual document root, /usr/share/nginx/html;

  • Change the fastcgi_param line to help the PHP interpreter find the PHP script that we stored in the document root home.

Save and Exit

Open up the php-fpm configuration:
sudo vi /etc/php-fpm.d/www.conf

Replace the apache in the user and group with nginx:
[...]
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;	will be used.
; RPM: apache Choosed to be able to access some dir as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx
[...]

Finish by restarting php-fpm.
sudo service php-fpm restart

Step Seven—RESULTS: Create a php info page


Although LEMP is installed, we can still take a look and see the components online by creating a quick php info page

To set this up, first create a new file:
sudo vi /usr/share/nginx/html/info.php

Add in the following line:
<?php
phpinfo();
?>

Then Save and Exit.

Restart nginx so that all of the changes take effect:
sudo service nginx restart

Finish up by visiting your php info page (make sure you replace the example ip address with your correct one): http://12.34.56.789/info.php

It should look similar to this.

Step Eight—Set Up Autostart


You are almost done. The last step is to set all of the newly installed programs to automatically begin when the VPS boots.
sudo chkconfig --levels 235 mysqld on
sudo chkconfig --levels 235 nginx on
sudo chkconfig --levels 235 php-fpm on




By Etel Sverdlov

Share this Tutorial

Vote on Hacker News

Try this tutorial on an SSD cloud server.

Includes 512MB RAM, 20GB SSD Disk, and 1TB Transfer for $5/mo! Learn more

Create an account or login:

98 Comments

Write Tutorial
  • Gravatar keepitcoder over 1 year

    Why does it install httpd (apache) when I try to install PHP-fpm?

  • Gravatar Etel Sverdlov over 1 year

    Apache is a dependency of PHP and gets installed at the same time. You can remove it from your server later with the command: "sudo yum remove httpd"

  • Gravatar Etel Sverdlov over 1 year

    I have updated the article—you should now be able to complete it without Apache installing.

  • Gravatar celson.simon over 1 year

    Before restart the service php-fpm, is necessary change in the file /etc/php-fpm.d/www.conf: of: user = apache group = apache to: user = nginx group = nginx

  • Gravatar Etel Sverdlov over 1 year

    Thank you for the tip! I have added it to the article.

  • Gravatar erickvogeler over 1 year

    PHP_FPM configuration file location is /etc/php-fpm.conf Also does this works on 32 and 64 bit?

  • Gravatar erickvogeler over 1 year

    How do you add domains?

  • Gravatar Etel Sverdlov over 1 year

    This tutorial should work on both 32 and 64 bit systems. The php-fpm configuration continues in the /etc/php-fpm.d/www.conf file. You can see how to set up VIrtual Hosts (server blocks) here: https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-centos-6 And how to set up a host name here: https://www.digitalocean.com/community/articles/how-to-set-up-a-host-name-with-digitalocean

  • Gravatar Darek over 1 year

    Followed all of above steps, but when I try to open http://12.34.56.789/info.php, getting "No input file specified." always. Any clues?

  • Gravatar Darek over 1 year

    In my above comment, when I said http://12.34.56.789/info.php, I already have changed 12.34.56.789 to my IP xx.xx.xx.xx.. Just clarification :)

  • Gravatar Etel Sverdlov over 1 year

    I ran through this tutorial this morning on a fresh CentOS droplet, and it was completed without issues. Is it possible that not all of the required changes were made in the nginx configuration file? (This, I think, would be place where the most errors may occur). Be sure that you have modified all of the required lines in the nginx configuration file, including making the needed changes in the location ~ \.php$ section. If you're still having a problem paste us your nginx config and we can help go through it. Thanks.

  • Gravatar Jonathan Tittle over 1 year

    http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm The 6-7 release is no longer active via the link in the first section of this post. Just a heads up in case someone encounters a 404 when attempting to install the RPM.

  • Gravatar Etel Sverdlov over 1 year

    Thank you! I have updated it.

  • Gravatar deepakszone over 1 year

    Great tutorial! It seems like my VM is not able to process info.php file as I get a save file pop up window that says "You have chosen to open Info.php which is a BIN file from http://localhost Would you like to save this file?" I followed all the steps above with success. Please help.

  • Gravatar deepakszone over 1 year

    Found the answer!! Modified "server_name _;" to "server_name localhost;" on nginx configuration and restarted nginx. worked like a charm!!

  • Gravatar Etel Sverdlov over 1 year

    That's a good point. I updated the configuration to include a domain in the server_name.

  • Gravatar Ahmad Kholishul Fikri over 1 year

    IMHO the writer in not OP server but she is a professional journalist :D

  • Gravatar Mark Miller over 1 year

    Got my SCO Unix certification in 1984... First Droplet - First Try. This was as easy as could ever be hoped for. Not a single error message. Thanks for the great (and accurate) instructions.

  • Gravatar mountainvibe about 1 year

    I've a problems with No input file specified. Here in my: nginx.conf http://pastebin.com/8hfBZ7p5 default.conf http://pastebin.com/Kn4amsuz

  • Gravatar Moisey about 1 year

    Check your error log output for more details and also you can do a quick check on your php.ini to see if "open_basedir" is set to point to your document root, if its not, try updating to that and see if that helps. Otherwise also please provide the error log output as that will help us troubleshoot.

  • Gravatar jedn about 1 year

    Thank You!!!!!

  • Gravatar lm30012 about 1 year

    Wow.. thank you for the instructions.. saved a bunch of time. No doubt it took a while for you to write and get it perfect.. thanks again

  • Gravatar about 1 year

    I have the same problem as above where when I goto the info.php file firefox starts a download of the php file. I did the fix listed above and entered a domain name, tried my IP, and tried localhost in the nginx conf file with no change.

  • Gravatar Manos Kantzanos about 1 year

    In order to avoid TCP/IP overhead make PHP-FPM Use A Unix Socket instead of network: 1)vi /etc/php-fpm.d/www.conf ;listen = 127.0.0.1:9000 listen = /tmp/php5-fpm.sock 2)/etc/init.d/php-fpm reload 3)vi /etc/nginx/conf.d/default.conf fastcgi_pass unix:/tmp/php5-fpm.sock; 4)/etc/init.d/nginx reload Create a phpinfo() page and verify configuration.

  • Gravatar ernesto_vargas about 1 year

    If you do what celson.simon then you will have the change the permissions of /var/lib/php/session to nginx.nginx too. Otherwise you app will not save sessions.

  • Gravatar bilal 12 months

    Should I do more than the tutorial to make it online? I tried twice, but I couldn't reach to server via browser. I couldn't see even nginx test page.

  • Gravatar Kamal Nasser 12 months

    @bilal What the article says is enough to get your website online. Make sure nginx is up and running and is listening on port 80 (run netstat -plutn to verify).

  • Gravatar bilal 12 months

    Hi @Kamal, thanks for reply. Nginx is running, I check it via "service nginx status". I saw one line which is related to nginx when I run "netstat -plutn": Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3180/nginx.conf

  • Gravatar xdoki26 11 months

    I have the php info problem as well. Tried changing to localhost/domain name, both didn't work.

  • Gravatar Kamal Nasser 11 months

    @xdoki26 can you please explain your problem in details? @bilal What happens when you try to browse to your droplet's IP?

  • Gravatar arisdario 11 months

    Any solution for "No input file specified." ? Thanks

  • Gravatar Kamal Nasser 11 months

    @arisdario what does ("tail /var/log/php5-fpm.log") output?

  • Gravatar transport_ma 11 months

    Does anyone know how to remove mysql, so that i can install a fresh copy of it? Thank you.

  • Gravatar Kamal Nasser 11 months

    @transport_ma Take a look at http://venakis.blogspot.co.il/2011/12/completely-wipeout-mysql-from-centos-to.html

  • Gravatar commerce 11 months

    in the section for /etc/nginx/conf.d/default.conf what do I have to do here... "Change the root to access the actual document root, /usr/share/nginx/html;"

  • Gravatar commerce 11 months

    also not sure what to do here... "Change the fastcgi_param line to help the PHP interpreter find the PHP script that we stored in the document root home."

  • Gravatar Kamal Nasser 11 months

    @commerce that list explains what has been changed in the config file - you only have to replace your copy with the one in the article.

  • Gravatar shenwei356 10 months

    I installed LEMP stack following the guide. But error happened when i install phpmyadmin, it may due to adding of epel and remi repositories. -------------------------------------------------------------------- Error: Package: php-cli-5.3.3-22.el6.i686 (base) Requires: php-common(x86-32) = 5.3.3-22.el6 Installed: php-common-5.4.16-1.el6.remi.i686 (@remi) php-common(x86-32) = 5.4.16-1.el6.remi Available: php-common-5.3.3-22.el6.i686 (base) php-common(x86-32) = 5.3.3-22.el6

  • Gravatar shenwei356 10 months

    problem solved by: sudo yum --enablerepo=remi install phpmyadmin

  • Gravatar Sean.Kerner 10 months

    For the Ubuntu 12.04 tutorial on this same LEMP type of setup there is also a section on getting Varnish (and wordpress too); Wordpress bits are easy - but how do i get Varnish running?

  • Gravatar Kamal Nasser 10 months

    @Sean.Kerner do you want to get Varnish running on Centos or are you talking about the other article for Ubuntu 12.04?

  • Gravatar support 10 months

    How can i use php-fpm 5.3 instead of 5.4 Most of my Software does not support 5.4 at the moment.

  • Gravatar Kamal Nasser 10 months

    @support PHP 5.4 is mostly backwards compatible with PHP 5.3 so you should be fine.

  • Gravatar support 10 months

    Not really. I used PHP 5.4 before. Most of my Sites are not working with PHP 5.4. vBulletin and Woltlab latest Versions are not supported with PHP 5.4

  • Gravatar Kamal Nasser 10 months

    @support: Take a look at this article: http://blog.jtlabs.net/downgrading-php-5-4-to-5-3-on-ubuntu-12-10-quantal

  • Gravatar mhfd014 10 months

    Hi, I followed every steps, and I didn't find any error. But when I tried to browse to my server or check the phpinfo, all I got is network error, or sometimes 403 forbidden. any idea why? thanks

  • Gravatar rc 9 months

    I went through this tutorial and seemed to have a successful installation. Now I'm trying to install ISPConfig 3 and I am getting this error: -bash: php: command not found Any idea why the php command is not recognized? I have restarted all services with no success. Any help is much appreciated.

  • Gravatar Kamal Nasser 9 months

    @mhfd014: Check nginx's error logs, it should tell you why it's returning a 403 forbidden error. @rc, did you install the php-cli package?

  • Gravatar rc 9 months

    I will check the logs. If the php-cli package was not part of the above tutorial, then I did not install it. If that's the case, how do I install?

  • Gravatar rc 9 months

    I just read that php-cli is not part of CentOS. Should it be necessary to install it for executing php on the command line? I'm not sure what to do to clear this up...

  • Gravatar Kamal Nasser 9 months

    @rc: Try running /usr/bin/php - does that work?

  • Gravatar rogerhnn 9 months

    Hi, everything worked. Now how can I install phpmyadmin and access it through localhost/phpmyadmin?? I am using centos6. Thank you for this excelent tutorial!

  • Gravatar kwiecien.kamil 9 months

    @Manos you saved my day! Thank you!

  • Gravatar jmcgdz 9 months

    For this example, need to set short_open_tag=On in php.ini also

  • Gravatar Kamal Nasser 9 months

    @rogerhnn: See this article: http://tecadmin.net/how-to-install-phpmyadmin-on-centos-using-yum/

  • Gravatar broc77 9 months

    I was getting "Cannot load from mysql.proc. The table is probably corrupted." errors in mysql. The following fixes that: sudo mysql_upgrade -u root -p You will be prompted for the mysql root password. Also, I edited /etc/my.cnf (the mysql configuration file) to add: max_allowed_packet=16M max_long_data_size=16M in the [mysqld] section. By default, these are 1 MB each, which is too small for some purposes.

  • Gravatar tejaswi33 8 months

    Thanks for the helpful tutorial - works like a charm! :)

  • Gravatar jonrobrt 8 months

    Here is a repository for the 64 bit: rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm And if you are using Centos minimal on your server and accessing your nginx from a remote desktop to run the info.php script you will have to disable your firewall - just an FYI!

  • Gravatar virtualgeek 8 months

    With LEMP on CentOS6: If you get the error Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. with phpMyAdmin. mkdir /var/lib/php/session chown nginx:nginx /var/lib/php/session chmod 777 /var/lib/php/session Error should go away and allow you to login.

  • Gravatar jpitman 8 months

    I'm getting this error when restarting nginx [root@vps ~]# sudo service nginx restart Stopping nginx: [FAILED] Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] still could not bind() [FAILED] Any ideas? Everything else passes and is ok

  • Gravatar Kamal Nasser 8 months

    @jpitman: Another process is already listening on port 80, probably a stuck nginx process: Make sure lsof is installed:

    yum install lsof
    And kill all processes that are listening on port 80:
    lsof -i tcp:80 | awk 'NR!=1 {print $2}' | xargs kill
    Finally, restart nginx:
    sudo service nginx restart

  • Gravatar ssayrax 7 months

    No input file specified I solved next In php.ini change doc_root = /usr/share/nginx/html

  • Gravatar Anoop Naik 7 months

    @Kamal just a tip! As droplets would be used my many small businesses, it would be better to optimize. Using socket would be better instead of TCP for forwarding req nano /etc/php-fpm.d/www.conf Replace listen = 127.0.0.1:9000 with listen = /dev/shm/php-fpm-www.sock For nginx conf: location ~ \.php$ { fastcgi_buffers 8 256k; fastcgi_buffer_size 128k; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/dev/shm/php-fpm-www.sock; } Correct me if i am wrong! Best, Anoop

  • Gravatar Kamal Nasser 7 months

    @anoopnaik: That is correct, it's better to use a socket than to listen on a TCP port.

  • Gravatar yaufaniadam 7 months

    Getting error like this: "No input file specified."? Try check location ~ \.php$ { } on your default.conf and compare to default.conf show above

  • Gravatar Sohail Ahmed 6 months

    This article finally got me up and running with nginx with php. I tried to do it before could not get it working. Although I got help from comments and a few other websites but thank you so much. Here is a good article to reduce memory usage by php-fpm that helped me with my small VPS. http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/

  • Gravatar cskumarswamy10 6 months

    step two: sudo yum install mysql mysql-server but it shows:- No package mysql available No package mysql-server available

  • Gravatar Kamal Nasser 6 months

    @cskumarswamy10: Have you installed the epel/remi repos?

  • Gravatar ccortina 6 months

    No input file specified. while browsing my vps

  • Gravatar ernesto 6 months

    If you want to install the version of PHP5.3? as you do?

  • Gravatar bbochicchio 6 months

    @ccortina I resolved my No Input File error when I realized I missed the change this line was referring to.. "Change the fastcgi_param line to help the PHP interpreter find the PHP script that we stored in the document root home." Look carefully at this line in the default.conf: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Actually look carefully at all the changes. That just happens to be what I overlooked. Thanks for this great tutorial. It would be great if that line could be more clear as to what is changing like the other instructions.

  • Gravatar md.imtiazmahbub 6 months

    I'm a complete newbie to UNIX. Followed this article and installed everything as instructed here. Now how can I transfer my php files to the server using ftp or sftp? Can you please direct me to a useful guide for that?

  • Gravatar Kamal Nasser 6 months

    @md.imtiazmahbub: See https://www.digitalocean.com/community/articles/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps

  • Gravatar iceoner 6 months

    Maybe useful to add the following to /etc/php.ini to avoid filling up your /var/log/nginx/error.log to avoid letting fill up like crazy with these messages: [error] 2097#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. Change the date.timezone from: ;date.timezone = to (in my case) date.timezone = Europe/Amsterdam If you have a busy site, the /var/log/nginx/error log can grow fast and might easily fill up your root filesystem if you don't have a lot of diskspace.

  • Gravatar Cesare 6 months

    Thanks. :)

  • Gravatar Prasenjit 4 months

    For those who are facing the problem of the info.php file being downloaded: server_name example.com www.example.com; It might work for some servers.

  • Gravatar Ezra Sharp 4 months

    following those steps I cant access nginx on my IP or domain name :(

  • Gravatar Kamal Nasser 4 months

    @Ezra: Is nginx running?

    sudo netstat -plutn

  • Gravatar nq49zk 4 months

    CentOS 6.5 x32 Just repeated all steps. Cant access nginx on my IP.

  • Gravatar nq49zk 4 months

    nginx is running http://i.imgur.com/r4zyvTL.png

  • Gravatar nq49zk 4 months

    Repeated with CentOS 6.4 x32 now "Test Page for the Nginx HTTP Server on EPEL" works. Fix this instruction for CentOS 6.5 x32

  • Gravatar martin 4 months

    On CentOS 6.5, I had to open the http in iptables. $ vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT $ /etc/init.d/iptables restart

  • Gravatar Ezra Sharp 4 months

    @Kamal, nvm :P iptables was blocking access to everything, thanks :)

  • Gravatar Ezra Sharp 4 months

    Yeah, looks like CentOS 6.5 enabled iptables by default. A revision of the tutorial is in order. :)

  • Gravatar alandoyle95 4 months

    I have centOS 6.5 and i followed this tutorial, 5 times, all fresh installs... no problems installing, but it will not load any page, not even nginx default site.. any idea why its not working ?

  • Gravatar alandoyle95 4 months

    @Ezra Sharp you are correct, just stopped iptables and everything started to work :) just need to find a better solution :P

  • Gravatar Asif Kibria 4 months

    I can't access phpmyadmin. Everything is fine except this. installed successfully, probably some virtual host problem. how to redirect my user/share/phpmyadmin to server_ip/phpmyadmin

  • Gravatar welcome 3 months

    Thank you very much for the walk-through! I can see the info.php page, so php is working. but the php command is not recognised by my command line though

  • Gravatar welcome 3 months

    Sorry got it working! sudo yum --enablerepo=remi install php-5.4.24-1.el6.remi.x86_64

  • Gravatar techspecx 3 months

    This was not working - I received the below error when I sudo /etc/init.d/nginx start Starting nginx: nginx: [emerg] unexpected "}" in /etc/nginx/conf.d/default.conf:51 If you look at the instructions in the default.conf file you have listed } } There should only be one } Thank you for your time. Have a good day.

  • Gravatar layanto 2 months

    This installs PHP 5.4.x. How do I install PHP 5.5 with opcache instead? Thanks.

  • Gravatar yash about 1 month

    i want to upgrade to MySQL 5.6, should i follow below article? https://www.digitalocean.com/community/articles/how-to-install-mysql-5-6-from-official-yum-repositories

  • Gravatar darquiza about 1 month

    Hi i cant able to see welcome message for nginx,. Can't connect to my local ip. I'm using Virtual Box.

  • Gravatar yazirarafath about 1 month

    Everything is fine up to reading info.php in the browser. I downloaded and extracted WordPress in to /usr/share/nginx/html/ When I pointed my browser to the domain, install.php is downloading instead of getting installed. :D

  • Gravatar Kamal Nasser about 1 month

    @yazirarafath: Does your nginx server block contain the location ~ \.php$ block? Have you tried restarting nginx?

  • Gravatar makbangka about 1 month

    how can I fix this? Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] still could not bind() [FAILED]

  • Gravatar Kamal Nasser about 1 month

    @makbangka: See my answer above ("Another process is already listening on port 80" ...)

  • Gravatar billing 8 days

    File input not specified error - this fixed it for me: Replacing the default: fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; With the following: fastcgi_param SCRIPT_FILENAME $request_filename; in /etc/nginx/conf.d/default.conf Restarted nginx, and voila! Bob's your uncle.

Leave a Comment

Create an account or login:
Ajax-loader