Siddesh BG's Build Release Config mgmt Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, 5 September 2012

Firewall configuration. How to open a port on Linux?

Posted on 22:01 by Unknown
When we install CentOS, the default configuration will be hardened and hence most of the unneeded ports will be blocked.
I configured Perforce proxy server in a centOS, which needed port 1666 to be opened. Since it is blocked, none of the other machines were able to contact perforce proxy server.  It used to give below error
$ p4 info

Perforce client error:
        Connect to server failed; check $P4PORT.
        TCP connect to xxx.xxx.com:1666 failed.
        connect: xxx.xxx..com:1666: WSAETIMEDOUT


To configure Firewall, we can use ipconfig command in Linux.
Here is the iptables command to open it
  iptables -t filter -A INPUT -p tcp --dport 1666 -j ACCEPT
where
   --table       -t table        table to manipulate (default: `filter')
   --append  -A chain            Append to chain
   --proto     -p proto        protocol: by number or name, eg. `tcp'
   --jump      -j target         target for rule (may load target extension)


Then save the configuration
   service iptables save
Next reload the configuration
  service iptables reload
Check the status
  service iptables status
O/P:
   Table: filter
   Chain INPUT (policy ACCEPT)
    num  target     prot opt source               destination
   1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:1666
As shown above, now the port 1666 is opened.

Other options 
  iptables -L    
      where 
        --list    -L [chain [rulenum]]         List the rules in a chain or all chains
        --flush   -F [chain]          Delete all rules in  chain or all chains

Read More
Posted in iptables, linux, Perforce | No comments

Tuesday, 26 June 2012

rsync - Syncing soft-link's as soft-link

Posted on 02:58 by Unknown
We were running rsync between 2 repositories (created on Linux OS) from many days. But we missed to handle soft-links properly. The option 'l' provided by rsync will update the soft-links in the destination server accordingly. If this option is not provided, in the destination, the directory pointed by source will be created with the soft-link name and it will be never updated at all !


Here is a usage of rsync
/usr/bin/rsync -avuzl --stats /export/kits/dpm/builds/dev/rkm root@us-repo.org:/export/kits/dpm/builds/dev


Where the options
 -a, --archive               archive mode;
 -v, --verbose               increase verbosity
 -u, --update                skip files that are newer on the receiver
 -z, --compress              compress file data during the transfer
 -l, --links                 copy symlinks as symlinks
Read More
Posted in linux, rsync | No comments

Tuesday, 17 April 2012

Using wget to download files recursively from https site

Posted on 07:52 by Unknown
wget is a command used mostly in Linux to download files from web links (http, https or ftp). To download a file, a simple invocation of wget like
  wget http://mylibrary.com/build-kits/rel-2.7.1/prod1/prod1-2.7.1.10.tar
will download prod1-2.7.1.10.tar to the current directory.

To download set of files (ex .tar files) from a secured https site, we need to provide several options to it
  wget --no-check-certificate -r -l1 --no-parent -A.tar http://mylibrary.com/build-kits/rel-2.7.1/prod1/
where
  --no-check-certificate: don't validate the server's certificate
  -r or --recursive: specify recursive download
  -l1 or --level=NUMBER: maximum recursion depth (inf or 0 for infinite).
 --no-parent: don't ascend to the parent directory
 -A or --accept=LIST:  comma-separated list of accepted extensions.
 -nd or --no-directories: don't create directories.

Read More
Posted in linux, unix, wget | No comments

Monday, 15 February 2010

Linux system logs management using logrotate

Posted on 21:39 by Unknown
You can rotate log file using logrotate software and monitor logs files using logwatch software.

Working on it, will update soon


How to truncate all the log files under /var/log? (I don't want to delete them)
bash# for x in `ls -l /var/log|grep "^-r"|awk '{print $9}'`; do >$x; done
Read More
Posted in linux | No comments

Wednesday, 14 October 2009

How to access CD from LINUX installed in VMWare Virtual machine?

Posted on 07:26 by Unknown
In VMware workstation click on VM -> Settings -> CD-ROM.
Make sure check boxes "Connected" and "Connect at power on" are ticked.
Then restart the Linux machine availble in VM.

After this you need to mount CDROM to one of your local location.
Find out in your machine where CDROM device is available.
>>> dmesg|grep -i cdrom
hdc: Vmware Virtual IDE CDROM Drive, ATAPI CD/DVD-ROM drive

From above output, in my machine it is available in /dev/hdc.

Now mount it to a local location "/mnt/cdrom". Make sure this directory is already created.

>>> mount /dev/hdc /mnt/cdrom
mount: block device /dev/hdc is write-protected, mounting read-only

Thats it. Now you can access the CD contents from /mnt/cdrom.
Read More
Posted in linux | No comments

Thursday, 4 December 2008

How to know a Unix/Linux system is a 32/64 bit architecture?

Posted on 03:20 by Unknown
To know whether given Unix/Linux machine is of type 32/64 bit architecure, use the command

getconf LONG_BIT

It outputs correspondingly 32 or 64 bit.

For AIX machine use "bootinfo -K" command for same purpose

Reference: http://www.unixguide.net/unixguide.shtml
Read More
Posted in AIX, linux, Solaris | No comments
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Installing and configuring Fortify on Linux and Windows machines
    Installing Fortify on Linux (RHEL 5 32 bit) Download Fortify archive Fortify-360-2.6.5-Analyzers_and_Apps-Linux-x86.tar.gz and extract it to...
  • AIX: make: 1254-055 Dependency line needs colon or double
    We get this compilation issue "make: 1254-055 Dependency line needs colon or double" while compiling C/C++ code in AIX machines. I...
  • fortifyclient uploadFPR An internal error has occurred
    When you try to upload a .fpr file to Fortify 360 server and you get the below mentioned error. Then, this blog provides one of the route ca...
  • Posting a JIRA bug using Perl Mechanize
    Perl provides modules which can be used as command line browser to automate tasks dependent on web pages. Among them LWP and mechanize are i...
  • Solution to Project Euler Problem 10 - Find the sum of all the primes below two million
    http://projecteuler.net/problem=10 Problem The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two mi...
  • Perforce - can't edit exclusive file already opened
    In perforce, whenever a binary file like doc, xls or ppt files are checked out, it is opened in exclusive lock mode. So no other person can ...
  • What is Apache Hadoop?
    Newbies can get a clean and simple introduction to Hadoop from the following Pivotal blog posts 1)  Demystifying Apache Hadoop in 5 Pictures...
  • Tweak single instance of tinderbox to work on two different perforce servers
    Tinderbox is a tool developed by Mozilla, which collects build logs and presents the logs and the result it in a nice, clear and concise way...
  • How to know architecture of a AIX machine?
    We can easily know the architecture type in Linux or Solaris systems with the help of "uname" command. But uname command in AIX do...
  • Few words about windows service
    What is windows service? it's a program that runs invisibly in the background. But can't the same thing be said for a number of prog...

Categories

  • AIX
  • AIX ssh
  • ANT
  • apache
  • appliance
  • awk
  • branching
  • build-failures
  • cgi-perl
  • code-signing
  • commands
  • continuous Integration
  • cvs
  • cygwin
  • DNS
  • Drupal
  • EPM
  • euler
  • Fortify
  • hadoop
  • hpux
  • html
  • InstallShield
  • iptables
  • iso
  • jenkins-hudson
  • Jira
  • kiwi
  • linux
  • Makefile
  • maven
  • Miscellaneous
  • mysql
  • nexus
  • NFS
  • package
  • Perforce
  • Perl
  • php
  • rbuilder
  • rpath
  • rpm
  • rsync
  • Solaris
  • ssh
  • SuseStudio
  • tinderbox
  • unix
  • Visual studio 2008
  • vmware
  • war
  • webserver
  • wget
  • windows
  • xterm

Blog Archive

  • ▼  2013 (12)
    • ▼  December (1)
      • How to restart windows from command line ?
    • ►  July (2)
    • ►  April (2)
    • ►  March (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2012 (43)
    • ►  December (2)
    • ►  November (1)
    • ►  October (4)
    • ►  September (7)
    • ►  August (5)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (3)
    • ►  February (1)
    • ►  January (7)
  • ►  2011 (23)
    • ►  December (4)
    • ►  November (9)
    • ►  October (4)
    • ►  September (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2010 (15)
    • ►  December (2)
    • ►  November (1)
    • ►  September (3)
    • ►  April (1)
    • ►  February (6)
    • ►  January (2)
  • ►  2009 (28)
    • ►  November (5)
    • ►  October (3)
    • ►  September (2)
    • ►  August (1)
    • ►  July (1)
    • ►  June (5)
    • ►  May (3)
    • ►  April (1)
    • ►  February (2)
    • ►  January (5)
  • ►  2008 (20)
    • ►  December (6)
    • ►  November (3)
    • ►  October (1)
    • ►  September (1)
    • ►  July (8)
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile