Pages

Saturday, June 7, 2014

Turbo Start : Symfony + Nginx + CentOS

Hel...
[vagrant@centos65 ~]$ cat /etc/centos-release
CentOS release 6.5 (Final)
Install nginx :
[vagrant@centos65 ~]$ sudo yum install nginx
[vagrant@centos65 ~]$ sudo chkconfig nginx on
[vagrant@centos65 ~]$ sudo service nginx start
Install php-fpm :
[vagrant@centos65 ~]$ sudo yum install php-fpm
[vagrant@centos65 ~]$ sudo chkconfig php-fpm on
[vagrant@centos65 ~]$ sudo service php-fpm start
Install PHP :
[vagrant@centos65 ~]$ sudo yum install php
[vagrant@centos65 ~]$ sudo yum install php-pdo
[vagrant@centos65 ~]$ sudo yum install php-xml
[vagrant@centos65 ~]$ echo i like postgresql
[vagrant@centos65 ~]$ sudo yum install php-pgsql
Set PHP timezone :
[vagrant@centos65 ~]$ sudo vim /etc/php.ini
...

Tuesday, June 3, 2014

How to create a CentOS 6.5 Vagrant box (with VirtualBox)

This guide is inspired from the Vagrant official documentation.

Versions

  • Vagrant: 1.6.2
  • VirtualBox: 4.3.12

Creation and configuration of the virtual machine

CentOS 6.5 installation

Launch VirtualBox and create a new VM with:
  • CPU: 1 core
  • Memory: 512 MB
  • Storage : 200 GB (dynamically allocated)
  • No audio, no USB

Sunday, June 1, 2014

Tips for ~/.ssh/config file

You can add SSH client configurations that can ease your life a little bit. Here are some tips you could put in your ~/.ssh/config file.

Host *
HashKnownHosts no

Host *.example.com
ServerAliveInterval 300
ForwardX11 no
User me


Host *.example2.com
ServerAliveInterval 300
User anotherme

Installing PostgreSQL 9.3 on CentOS 6.5

PostgreSQL Installation

Basically, to install the latest version of PostgreSQL (9.3 as I write), you can follow the instructions in the PostgreSQL Wiki.

Post-installation commands

Initialize

Here is a difference from the wiki: I customize the call to the PostgreSQL script initdb (adapt the paths if needed):