First lets do an update before we start installing PostgreSQL
$ yum update
You can install PostgreSQL from CentOS Base repo or can do a search for the latest version and install it based on your needs. Method 1 describes manual setup and Method 2 indicates an install from CentOS base repo Continue Reading…
$ fdisk -l /dev/sda
Device Boot Start End Blocks Id System
/dev/sda1 * 1 128 1024000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 128 383 2048000 83 Linux
Partition 2 does not end on cylinder boundary.
This is not a problem and is commonly seen in new systems. Continue Reading…
In earlier systems, passwords were stored in the file /etc/passwd and they were not encrypted.
After the user is created, an entry gets recorded in /etc/passwd with ‘x’ in the second column instead of the acutal password.
$ useradd timmy
$ cat /etc/passwd
For security reasons, passwords are now stored in the file /etc/shadow and they are encrypted. Password was not set initially, when the user was created. This is indicated by !! mark (in RedHat, ! – Debian)
$ cat /etc/shadow
PEAR should be already installed in the system before configuring the phpseclib channel.
PHPSecLib installation is very simple.
PHPSecLib is a library of optional PHP extensions which comes in handy if the application were to be packaged as a solution for deployment to the end user.
Step 1: Register the channel
c:\> pear channel-discover phpseclib.sourceforge.net
Files created in windows when moved to linux will have ^M character at the end of lines when you open the files in Vi editor.
To remove the strange characters open the file in Vi editor and type
Linux supports many file system types like Ext2, Ext3, Ext4, NFS, FAT16, FAT32, NTFS etc. To find out what type of file systems are mounted in your system, issue the command
$ df -T
Output from the command
Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/sda1 ext4 94088076 9090252 80218356 11% / udev devtmpfs 1023536 4 1023532 1% /dev
List the listening ports and check if mysql is listed on it.
$ netstat -tln | grep mysql
If you cannot find the port number for mysql view my.cnf file to see if you can find the port number. If you see a line “skip-networking” try commenting out the line and then restart mysql daemon.
$ vi /etc/my.cnf[mysqld] set-variable=local-infile=0
$ service mysqld restart
Fail2ban is a software used to ban IP’s which shows strange behavior. It can be configured to reject IP’s for a certain amount of time.
To install Fail2ban we need to download the application from the source. Login as the root user and go to /opt
$ cd /opt
$ wget http://downloads.sourceforge.net/project/fail2ban/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2?use_mirror=transact
Next unzip the downloaded file
$ tar -xf fail2ban-0.8.4.tar.bz2
$ cd fail2ban-0.8.4
To setup Rails on windows after Ruby and Rails setup,
i) Edit hosts file in windows environment and set the server name in the hosts file to
In this example, i have used “myrails” as the server name for the project.
ii) Edit httpd configuration setting on WAMP to make sure proxy and proxy_http module is turned on (check if it those lines are not commented out)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
For this tutorial we will be using Ruby 1.9.3 and Rails 3.2.1
First thing update
$ sudo apt-get update
Next, we are going to install git, RVM which is essential for the build
$sudo apt-get install build-essential git-core curl
RVM stands for Ruby Version Manager that is used for installing and managing multiple versions of Ruby at one point of time.