Pages

Friday, August 15, 2014

Gather linux system information with inxi

I've discovered this great command-line to gather system information:
inxi -F
And here is the output:
System:    Host: xxxx Kernel: 3.13.0-24-generic x86_64 (64 bit) Desktop: N/A Distro: Linux Mint 17 Qiana
Machine:   System: Dell product: Inspiron 5423
           Mobo: Dell model: N/A version: A13 Bios: Dell version: A13 date: 05/18/2013
CPU:       Dual core Intel Core i5-3337U CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) 
           Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 800.00 MHz 4: 1801.00 MHz
Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller 
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz 
           GLX Renderer: Mesa DRI Intel Ivybridge Mobile GLX Version: 3.0 Mesa 10.1.0
Audio:     Card: Intel 7 Series/C210 Series Chipset Family High Definition Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-24-generic
Network:   Card-1: Intel Centrino Wireless-N 2230 driver: iwlwifi 
           IF: wlan0 state: up mac: xx:xx:xx:xx:xx
           Card-2: Qualcomm Atheros AR8162 Fast Ethernet driver: alx 
           IF: eth0 state: down mac: xx:xx:xx:xx:xx:xx
Drives:    HDD Total Size: 532.1GB (2.9% used) 1: id: /dev/sda model: ST500LT012 size: 500.1GB 
           2: id: /dev/sdb model: LITEONIT_LMT size: 32.0GB 
Partition: ID: / size: 30G used: 8.8G (32%) fs: ext4 ID: /boot size: 453M used: 45M (11%) fs: ext4 
           ID: /home size: 450G used: 5.7G (2%) fs: ext4 ID: swap-1 size: 8.59GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   None detected - is lm-sensors installed and configured?
Info:      Processes: 205 Uptime: 1:00 Memory: 1994.9/5836.1MB Client: Shell inxi: 1.8.4 

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):

Saturday, May 31, 2014

Mount a Nexus 4 on Ubuntu 12.04 LTS

Install the package mtpfs:
sudo apt-get install mtpfs
Create a directory somewhere (eg: "android"):
mkdir android
Mount :
sudo mtpfs -o allow_other android
Unmount :
sudo umount android