Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, April 4, 2011

want a shell command to Download a Package, but it has a Redirecting Link... CURL it down

One of the things happened to me several time is when I'm writing an automated script for set of utilities to get downloaded from Internet (then installed and configured) on the Linux Box, so that I don't have to go through monotonous set of boring algorithm to set-up an environment again and again.

But, one or more links in that set of packages required ain't available via Package Manager's generosity... so it's required to script it's download from any repository or remote download locations.
If it's a direct download link... the most used utility is 'wget'.

In that process several times I get stuck with download links like that we get at (superb open-source content) website similar to SourceForge.net, where even if you copy the final redirected link and paste it in your script that wouldn't work after some moments.

So, you require a shell-command/utility which can be used very easily to download the resource after following the redirected link at the time of execution... and the savior is our same old CURL.


|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

How-To Use It

+ To download a resource on your storage using 'curl'
   |=+ Command: # curl -o file_name Link_Of_Resource
   |
   |=+ Example:
#curl -o GaneshaAarti.rar http://sites.google.com/site/abhikumar1632/Ganesha_Aarti2006lowsize.rar

+ To download a resource from a redirecting link using 'curl', it gets a new switch '-L' for job
  |=+ Command: #curl -L -o file_name Link_Of_Resource
  |
  |=+ Example:  
#curl -L -o http://sourceforge.net/projects/n00brat/files/n00bRAT_v0.5beta.tar.gz/download
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

If you know the required Resource has an online svn/git/hg/bzr/* repository... and you make sure your environment has the respective repository client, then you can even go for cloning the repository instead of downloading from redirecting link... as it might need a little tweaking with change in Resource availability in website (links).

Tuesday, August 3, 2010

{Deploy} Installing RED5 Server on CentOS, Fedora, RedHat

Installing RED5 Server on CentOS, Fedora, RedHat

it's an Open Source Flash Server written in Java for Multimedia Streaming Web/Network Application

[] it requires Java 1.6 to be pre-installed
#yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
#yum -y install java-1.6.0-openjdk-javadoc java-1.6.0-openjdk-src

[] Setup 'Apache ANT', required to build Red5
#cd /usr/src
#wget http://apache.sunsite.ualberta.ca/ant/binaries/apache-ant-1.8.1-bin.tar.bz2
#tar jxvf apache-ant-1.8.1-bin.tar.bz2
#mv apache-ant-* /usr/local/ant

[] Settimg up ENV variables as per required
#export ANT_HOME=/usr/local/ant
#export JAVA_HOME=/usr/lib/jvm/java
#export PATH=$PATH:/usr/local/ant/bin

[] Download & Install RED5
#cd /usr/src
#svn co http://red5.googlecode.com/svn/java/server/trunk red5server
#mv red5server /usr/local/
#cd /usr/local/red5server
#ant prepare
#ant dist
#cp -r dist/conf ./
#./red5.sh

[] To use RED5 Server
- checking if it works
    browse 'http://RED5-Server-IP:5080/'
- to install your RED5 Server based applications
    copy them to dir '/usr/local/red5server/webappz'
    suppose you copy them to '/usr/local/red5server/webappz/myFlash'
    so they will be accessible at 'http://RED5-Server-IP:5080/myFlash/'
- to make it run at port 80 like any HTTP Server
    edit '/usr/local/red5/conf/red5-origin.xml' and '/usr/local/red5/conf/red5.properties'
    by replacing all instances of Port# 5080 by simply Port# 80

Wednesday, June 4, 2008

VLC media player [yum install]

VLC media player [yum install]

$> su
password:
//enter root password
#> rpm -ivh http://rpm.livna.org/livna-release-8.rpm
//the italicized number above should be Fedora Core # like its 8 for Core8
#> yum install vlc
#> yum install python-vlc mozilla-vlc
(optional)