Egrove systems >> Egrove System Articles >> Web Server :

Archive for the ‘Web Server’ Category

December 21st, 2011

SVN Subversion

Subversion is a Software versioning and a Revision control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older

versions of your data or examine the history of how your data changed

SVN Commands:

  1. SVN Checkout / co:

This command is used to check out the project from the server (http://127.0.0.1/repos/test/). You should only need to do this once.

Command:

svn checkout “url” (or) svn co “url”

Example:

svn checkout http:// 127.0.0.1/repos/test

àIf need to checkout 32 Revision files means

Command:

svn checkout –r 32 http:// 127.0.0.1/repos/test

option -r à Revision no

  1. SVN Status:

This command prints the status of working directories and files. If you have made local changes

A: File to be added

C: Conflicting changes

D: File to be deleted

G: File to be merged with updates from server

M: File has been modified

R: File to be replaced

G: File to be merged

X: Resource is external to repository

?: File/directory not under version control

!: File/directory missing

~: Versioned item obstructed by some item of a different kind.

Command:

svn staus

  1. SVN Revert/Switch:

To overwrite local file(s) with the one in the repository, do an “svn revert”–you would do this if you want to go back to the version of the file in the repository (you will lose all changes you had made since the last commit)

Command:

svn revert filename

  1. SVN Commit:

Recursively sends your changes to the SVN server. It will commit changed files, added files, and deleted files. Note that you can commit a change to an individual file or changes to files in a specific directory path by adding the name of the file/directory to the end of the command. The -m option should always be used to pass a log message to the command. viagra don’t use empty log messages (see later in this document the policy which governs the log messages).

Command:

svn commit –m “log message” filename (or) svn ci –m

  1. SVN Delete:

Delete file from repository. The UNIX command, “rm file-name” must perform a “commit” to update the repository and local working directory with the changes

Command:

svn delete filename(or)directory

also : del, remove or rm

then,

svn commit –m “log msg”

  1. SVN DIFF:

Shows file difference between SVN repository and your file changes.

Command:

svn diff filename

svn diff -r rev1:rev2 filename

  1. SVN Log:

Show the SVNlog messages for a set of revision(s) and/or file(s) and/or all directory contents in repository. Includes list of all files in change Shows the file changes associated with revision number.

Command:

svn log filename

svn log url

eGrove Systems Corporation is the leading Web Design and Development firm having a wide range of experience in all vertices like wordpress development, joomla development and we are expertise in developing full featured websites


October 1st, 2011

How to Install and configure PostgreSQL on Centos/RHEL

Install PostgreSQL and PostgreSQL-server packages

[root@egrovechn]# yum install postgresql postgresql-server postgresql-contrib

Configure PostgreSQL Database Server

Initialize the cluster first with initdb command:

[root@egrovechn]# service postgresql initdb

(or)

[root@egrovechn]# /etc/init.d/postgresql initdb

Edit /var/lib/pgsql/data/postgresql.conf file:

[root@egrovechn]# vi /var/lib/pgsql/data/postgresql.conf

Set PostgreSQL server to listen all addresses and Change PostgreSQL port (default is 5432). Add/Uncomment/Edit following lines:

listen_addresses = ‘*’

port = 5432

Edit /var/lib/pgsql/data/pg_hba.conf file:

[root@egrovechn]# vi /var/lib/pgsql/data/pg_hba.conf

Add (example) your local network with md5 passwords:

# Local networks

host       all           all           xx.xx.xx.xx/xx   md5

# Example

host       all           all           10.20.4.0/24       md5

# All Network

host       all           all           0.0.0.0/0 trust

Start/Restart PostgreSQL Server:

[root@egrovechn]# service postgresql start

(or)

[root@egrovechn]# /etc/init.d/postgresql start

Change to postgres user:

[root@egrovechn]# su postgres

Create test database (as postgres user):

createdb test

Login test database (as postgres user):

psql test

Create new “pguser” Role with Superuser and Password:

CREATE ROLE pguser WITH SUPERUSER LOGIN PASSWORD ‘password’;

Open PostgreSQL Port (5432) on Iptables Firewall (as root user again)

Edit /etc/sysconfig/iptables file:

[root@egrovechn]# vi /etc/sysconfig/iptables

Add following line before COMMIT:

-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5432 -j ACCEPT

-A INPUT -p tcp -m tcp –sport 1024:65535 –dport 5432 -j ACCEPT

-A OUTPUT -p tcp -m tcp –sport 1024:65535 –dport 5432 -j ACCEPT

Restart Iptables Firewall:

[root@egrovechn]# service iptables restart

(or)

[root@egrovechn]# /etc/init.d/iptables restart

Test remote connection:

[root@egrovechn]# psql -h dbserver -U testuser test

eGrove Systems corporation is the leading web application development company in New Hampshire. Our Professionals are experts in Joomla development, Drupal development, Magento development, Worpdress development, HTML5 development, Android development and Python development etc.