Tag: centos

step 8: install mongodb

first create a repository file for the 10gen repo:

# vi /etc/yum.repos.d/10gen.repo

press the "i" key to go into edit mode

paste the following content into the editor

name=10gen Repository

step 6: install and configure php5, php-fpm and apc

php-fpm logo

We have just installed Nginx and now we want to host the php application we made. This is when php-fpm comes into play. Since the day i started playing around with php-fpm i loved it. You install php-fpm and then using the powerful configuration files you can setup multiple vhost on a single machine. Each php-fpm pool, can have it's own socket or run on it's own port, you can setup a different user and group for each pool and put as many ftp-users in that group as you want. You can even chroot the directory you as nginx public web directory, have an own php-ini per vhost and therefore also setup a different sessions folder for each pool.

install php5 and php-fpm:

php-fpm (PHP fastCGI process manager) is available in the remy repo which depends on the epel repo:

I wanted the remi repo "Enterprise Linux 6 (with EPEL)" package, you may have to use another one depending on your OS and version, i used centos6 and therefore choosed to use the following commands:

step 5: install and configure nginx

Nginx logo

NGINX is much more then just a server like Apache, that's probably why it gained so much market share over the few last years if you trust the Netcraft server market share statistics.

NGINX has two advantages over Apache, first one is super fast, second one it's consumes less resources then Apache. Those are two important wins in two areas that really matter when having to decide which server to choose when getting started. Nginx is so fast because it's event driven. You may already have seen how javascript uses events and asynchronous loading of data. Nginx is similar to this, it emits a request, but doesn't wait all the time for a response keeping the connection open. Nginx requests something, then closes the connection and does something else. But in the request is a callback. So when the requested data is ready the nginx callback gets called and the response is send through a new connection to nginx. This is why nginx can handle such a lot of connections.

But as i said NGINX is more then just a server. The powerful configuration mechanism lets you setup NGINX to be a proxy server for one or multiple apache servers. You can use it as load balancer for multiple node.js instances or "just" use it as normal server to host your php website. If it's a php website you want to host.

Linux server / centos commands


list files and directories and show their permissions

ls -l

to also list hidden files, use:

ls -la

find all files changed at least one day ago but within three days ago

find . -ctime +1 -a -ctime -3

step 2: ensure that your server software is up to date

A tool used on CentOS to update packages is yum. You will use this tool a lot during the next hours, to update packages already installed, download and install new packages. A very nice feature is that yum will automatically resolve dependencies of the packages you want to install and install the dependencies required by the package you have choosen.

  • First
  • Previous
  • 1
  • Next
  • Last