Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DigitalOcean Community Blog:
How To Set Up a Two Node LEPP Stack on CentOS 7
Mar 25, 2015 @ 16:52:30

On the DigitalOcean community blog they've posted a guide to setting up a LEPP server (Linux, Nginx, PHP and PostgreSQL) on a CentOS 7 instance (not specific to their own platform either, can be applied anywhere).

In this tutorial, we will create a simple web application in a two-tier architecture. Our base operating system for both nodes will be CentOS 7. The site will be powered by an Nginx web server running PHP code that talks to a PostgreSQL database. Instead of adopting a "top-down" approach seen in other LAMP or LEMP tutorials, we will use a "ground-up" approach: we will create a database tier first, then the web server and then see how the web server can connect to the database. We will call this configuration a LEPP (Linux, Nginx, PHP, PostgreSQL) stack.

They create a two-tier setup that involves the use of two CentOS systems (with examples from their own hosting options) and walk you through:

  • Installing PostgreSQL
  • Configuring PostgreSQL
  • Updating the Database Server Firewall
  • Creating and Populating the Database
  • Installing Nginx
  • Updating the Web Server Firewall
  • Configuring Nginx
  • Installing PHP
  • Configuring PHP
  • Creating the Web Application

It seems like a lot of steps but all of the necessary commands and configuration updates are included in each step so it's basically a copy and paste kind of walk-through.

tagged: tutorial centos leep linux nginx php postgresql walkthrough

Link: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-two-node-lepp-stack-on-centos-7

Hasin Hayder:
Upgrading PHP to 5.5 in a CentOS 6 server with Vesta CP
Jun 04, 2014 @ 14:22:31

In his latest post Hasin Hayder shares some instructions for upgrading CentOS to PHP 5.5 (a server with Vesta CP) via the Remi repository.

Vesta CP comes with PHP 5.4 by default. If you want to upgrade it to 5.5, follow these steps.

He's broken it up into five simple steps:

  • Stop Apache and Remove current PHP
  • Add remi repository
  • Enable Remi Repository (for yum)
  • Install PHP 5.5
  • Cleanup, linking and finishing

These instructions aren't really just for the CentOS install either. They could be used for any platform that makes use of "yum" to work with installed packages (with a few tweaks here and there).

tagged: upgrade php55 centos vestacp yum remi

Link: http://hasin.me/2014/06/03/upgrading-php-to-5-5-in-a-centos-6-server-with-vesta-cp/

BinaryTides.com:
Install Nginx + Php FPM + APC on CentOS 6.4
Nov 11, 2013 @ 16:10:50

On the BinaryTides site a new tutorial has been posted walking you through all the steps to getting Nginx, PHP FPM and APC working on a CentOS installation, complete with all commands and configuration updates you'll need.

A lamp server runs Nginx web server along with Php and Mysql or MariaDB on a Linux system. Nginx is increasing becoming popular because of its lightweight structure and ability to handle large amounts of traffic in an optimum manner. Mariadb is the replacement for mysql because mysql is not very free anymore. In this tutorial we shall be setting up Nginx with Php FPM on CentOS. The instructions to instal MariaDB shall be covered in another post.

The rest of the post helps you:

  • Install and configure Nginx
  • Create a virtual host
  • Install PHP and FPM (and set up Nginx to use it)
  • Install APC (the "Alternative PHP Cache")
tagged: install nginx phpfpm centos apc tutorial configure

Link: http://www.binarytides.com/install-nginx-php-fpm-centos/

Snipe.net:
Sending Mail Using PHP and Amazon SES on Centos/AWS Linux
Mar 27, 2013 @ 15:56:53

In this new post to her site Alison shows how to send emails through the Amazon Simple Email Service (SES) from a CentOS instance (an AMI in this case).

If you find yourself using Amazon SES for sending outgoing emails in a PHP web app, getting everything set up is much simpler than it may seem. In my case, this was on an AWS Linux image, but it will work on any Fedora/CentOS AMI. You can, of course, set up sendmail and use a proper MTA to send email from your web app, but in this case, I had inherited the requirement to set up an environment for code that was already written to use SES for outgoing email and Google Apps for incoming emails, so the actual mechanics weren’t up for debate.

She includes screenshots showing how to configure the SES system with your site's domains and DNS as well as the email addresses you're planning on using. She links over to the MSMTP software you'll need to install on your instance to make the connection and what you'll need to do to get it configured for PHP's use. A sample email script is also included to test the connection (and where to look to make sure everything worked correctly).

tagged: amazon ami ses email send centos tutorial

Link:

Mike Purcell's Blog:
CentOS - PHP - Install Memcached (with a d) Stack
Jun 20, 2012 @ 14:13:59

In this new post to his blog Mike Purcell gives you the full instructions to getting a CentoOS 6 system up and running with Memcached and PHP.

Recently I started retro-fitting the MeLikeDrinks.com drink website to cache frequently used data to improve performance, as such I wrote a light, custom cache API which sits on top of PHP’s Memcached API. [...] If you opt to use PHP Memcache, and because this article assumes you are using CentOS, you can simply have YUM install the entire stack for your via `yum install php-memcache`.

He describes some of the differences between the two memcache APIs available to PHP developers (memcache and memcached) and includes the instructions to get both versions installed. "Memecache" is as easy as installing the package, while "Memcached" takes a bit more work - installing dependencies, configuring and compiling a few things specific to your system.

tagged: memcached install centos package compile tutorial

Link:

Chris Hartjes' Blog:
Build PHP 5.4 on CentOS With Vagrant
Apr 16, 2012 @ 15:02:02

In a new post to his blog Chris Hartjes shows you how to get PHP 5.4 installed on a CentOS machine (virtual machine) with the help of Vagrant.

I like the idea of using Vagrant to create virtual machines for my development work. Doing things this way I think keeps the host machine cleaner and allows you the ability to distribute those VM’s to other people as well. My old boss Ben Ramsey did a very informative post on getting PHP 5.4 configured on CentOS so I decided to one-up him by taking his instructions and creating a Puppet manifest so you could do this using Vagrant or on any server that you can provision using Puppet.

He example is based off of the publiclly available Vagrant setup and provides the contents of the Vagrantfile that he uses to set up the machine. From there, Puppet takes over and uses his configuration (also included) to set up things like the Apache server, some configurations for it, a list of PHP extensions and, of course, PHP itself.

tagged: centos virtualmachine vagrant puppet provision

Link:

Ben Ramsey's Blog:
Build PHP 5.4 on CentOS 6.2
Mar 06, 2012 @ 15:58:38

In this latest post to his blog Ben Ramsey shows you how to, inside of a virtual machine, set up a server with PHP 5.4 installed (using CentOS 6.2).

In case you haven’t heard the news, the PHP project released version 5.4.0 last Thursday. Naturally, I decided it was time to install and give it a try. I chose to install to a clean and bare-bones CentOS 6.2 virtual machine using VirtualBox. I did this for two reasons: 1) I wanted a clean environment for the build, and 2) I wanted to play with CentOS. At the time of this writing, there are not yet any official CentOS RPMs for PHP 5.4, so I had to build PHP from source. What follows are the notes I took during the installation and build process. I hope you find them helpful.

His instructions cover the full process:

  • Installing the CentOS operating system
  • Creating a non-root user
  • Setting up the network for local access
  • Installing the packages for PHP (via yum)
  • Grab PHP 5.4 and compile it
  • Testing out the web server with a sample phpinfo file

He includes a lot of extensions in his installation, some you may not need like pspell, tidy, calendar, ftp or xsl.

tagged: virtual machine virtualbox centos install process tutorial

Link:

Joshua Thijssen's Blog:
Setting up a development environment
Feb 06, 2012 @ 15:27:41

In a new post to his blog Joshua Thijssen gives a guide to how he usually sets up his development environments when working in PHP. It includes working with virtual machines, configuring DNS and setting up his tools to work with it all.

Doing development on multiple projects can be a burden from time to time. One project would be running on PHP 5.3, while another still needs 5.1. Sometimes you need a MySQL server, while on other occasions, you need a NoSQL solution like couchDB or MongoDB together with all kind of gearman functionality. This article shows you how I’ve setup such a development platform that allows you to quickly create new projects, and still maintain flexibility when you need it.

He uses VirtualBox with either a Debian or CentOS installation as a base platform. He uses Vagrant to set up and configure the machines to make setup almost automatic. He still has to go in and configure a few things like the VirtualHost and DNS settings for the site/application he's working on. Next up is setting up the tools he uses, specifically XDebug and setting up his editor of choice (PHPStorm) for remote debugging.

tagged: development environment virtualbox debian centos mysql vagrant xdebug phpstorm dns virtualhost

Link:

Bollysite Blog:
Upgrading php 5.1 to php 5.3 with xcache rebuild on Centos 5
Aug 09, 2010 @ 18:09:08

In this quick tutorial on the Bollysite blog showing how to upgrade your CentOS install of PHP from 5.1 to 5.3 along with xcache.

CentOS 5 comes with php 5.1 version. There is no official PHP 5.2+ release for upgrade since last 3 years. [...] As a result, Developer had to implement alternative functions to integrate twitter, myspace OAuth API. Today wordpress has officially said bye bye to php 4 and mysql 4. So finally, I gathered some courage to mess with my current php installation. I followed the following steps to upgrade php 5.3 on centos 5.

The update requires adding the webtatic repository to your yum setup and using the "enablerepo" to pull directly from that. Once that's installed, you'll need to rebuild xcache to match the version (commands included).

tagged: centos yum ubuntu xcache webtatic

Link:

Richard Thomas' Blog:
PHP and Centos, a step towards automating your server builds
Apr 26, 2010 @ 13:33:10

Richard Thomas has posted a script that could be used to set up a complete PHP-enabled instance of CentOS from a basic install. He's posted about it on his blog.

I compile php all the time, I am constantly installing the latest versions on my own servers for various reasons. After doing this the first dozen or so times I started creating little batch files. [...] The other day someone asked something about my setup and I had to pull open the script to remember what I had going on and he asked for a copy and hence I figure others might be interested as well.

He's shared out the file here and it installs all the usual tools you might need including MySQL support with PHP being the only thing compiled from scratch.

tagged: centos server build automated

Link:


Trending Topics: