Sometimes as developers we have to perform some simple sysadmin tasks, such as installing a basic LAMP
or LEMP
stack, basic securing of the server and so on. So what I decided to do is to just gather links to various helpful resources on how to setup Nginx + PHP 5.4 + MySQL + memcached on CentOS 6. I chose this installation since its the one I happen to use the most and I personally believe the optimal one. An alternative might be Apache + mod_php + Varnish + memcached
.
Basic SSH setup and hardening:
- http://wiki.centos.org/HowTos/Network/SecuringSSH
- http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/
- https://help.github.com/articles/generating-ssh-keys
- https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
- http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html
- http://rackerhacker.com/2010/10/12/securing-your-ssh-server/
Basic firewalls and IpTables:
- http://wiki.centos.org/HowTos/Network/IPTables
- http://ifzenelse.net/en/secure-centos6-server-part1-start-iptables-firewall
- http://www.cyberciti.biz/faq/rhel-fedorta-linux-iptables-firewall-configuration-tutorial/
- http://www.cyberciti.biz/faq/centos-rhel-shorewall-firewall-configuration-setup-howto-tutorial/
- http://www.tecmint.com/install-configserver-security-firewall-csf-in-rhel-centos-fedora/
Nginx, PHP and PHP-FPM
- http://www.lifelinux.com/how-to-install-nginx-and-php-fpm-on-centos-6-via-yum/
- https://www.mellzamora.com/install-nginx-php-5-4-php-fpm-on-centos6/
- http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-on-centos-6.0
- https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-6
- http://www.lurch.org.uk/2012/06/installing-and-using-nginx-php-fpm-on-centos-6/
- http://black-pixel.net/nginx-with-php-on-centos-6.html
- http://www.tecmint.com/install-lemp-linux-nginx-mysql-php-on-rhel-centos-5-6-fedora-12-17/
- http://www.lifelinux.com/how-to-optimize-nginx-for-maximum-performance/
MySQL
- http://www.server-world.info/en/note?os=CentOS_6&p=mysql
- http://centoshelp.org/servers/database/installing-configuring-mysql-server/
- http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
- http://dev.mysql.com/doc/mysql-security-excerpt/5.1/en/
- http://www.mysqlperformanceblog.com/
- http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/
Memcached and Redis
- http://www.if-not-true-then-false.com/2010/install-memcached-on-centos-fedora-red-hat/
- http://blog.codesherpas.com/on_the_path/2010/08/securing-memcache-in-2-minutes.html
- http://www.saltwebsites.com/2012/install-redis-245-service-centos-6
Lastly, I dont use any FTP on my servers, but you can easily roll out a fairly secure SFTP connection: http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/
which will be supported by most decent FTP clients. Let me know if you have any other good resources in the comments.