Friday, June 28, 2013

How to Install FFMPEG Auto Installer on CentOS



Opensource ffmpeg installer





ffmpeginstaller is a free software completely written in bash shell script. The purpose of this script is to build a video streaming platform in your Gnu/Linux server. So you can start video streaming websites and avoid the cost of installations. This script not only install ffmpeg but also all its friends packages. You can chose this script for building platform for most of the youtube clone software like clip-shre, sharemixer,shareigniter,etc,.

Project Home Page :  http://ffmpeginstaller.com



What packages ffmpeginstaller install in your server?


Please see the complete list of packages below.




  • FFmpeg : FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video

  • MPlayer And Mencoder : MPlayer is a movie player.It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim, and Win32 DLL codecs.

  • A52decoder : Are you a hosting company and you like to sell PCI DSS compliance servers to your clients with support ? If so this is your plan

  • Amrnb and Amrwb : The Adaptive Multi-Rate (AMR) audio codec is a patented audio data compression scheme optimized for speech coding

  • Latest Codecs : Install latest codecs libs

  • Faad2 : FAAD2 is an open source MPEG-4 and MPEG-2 AAC decoder

  • FAAC : FAAC is an MPEG-4 and MPEG-2 AAC encoder.

  • Flvtool2 : FLVTool2 is a manipulation tool for Macromedia Flash Video files (FLV )

  • Lame MP3 Encoder : LAME is a high quality MPEG Audio Layer III (MP3) encoder

  • Liba52 : liba52 is a free library for decoding ATSC A/52 streams

  • Libogg : Ogg Lib collections

  • OpencoreAMR : Library of OpenCORE Framework implementation of Adaptive Multi Rate Narrowband and Wideband speech codec

  • Theora : Theora is a free and open video compression format

  • Vorbis tools : Vorbis is a completely open, patent-free, professional audio encoding and streaming technology with all the benefits of Open Source

  • Libwmf : libwmf is a library for reading vector images in Microsøft's native Windøws Metafile Format (WMF)

  • MP4Box : MP4Box is a MP4 multiplexer

  • X264 : x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC format

  • Xvid :   Open-source compression codec based on MPEG-4 ISO format



 

How to Install FFMPEG Auto Installer on CentOS


Seeing as FFMPEG Auto Installer do not give clear instructions on how to install their packages I have produced a easy guide which hopefully should be of some use to server admins and novices alike.

Firstly SSH into your server.

Now run the following commands:
mkdir ~/ffmpeg-packages 
cd ~/ffmpeg-packages
wget http://mirror.ffmpeginstaller.com/old/scripts/ffmpeg7/ffmpeginstaller.7.4.tar.gz
tar -xvzf ffmpeginstaller.7.4.tar.gz
cd ffmpeginstaller.7.4

Im using version ffmpeginstaller.7.4 for this installation, make sure you edit your command to coincide with the current package.

Next run the install command:
./install.sh

That's it.

Tuesday, June 25, 2013

Watch Hulu Streaming Videos Anywhere in the World

Hulu.com is popularly known as a free online video service that offers hit TV shows including Family Guy30 Rockthe Daily Show with Jon StewartLostThe Tonight Show with Conan o BrienThe Simpsons, Naruto Shippuden etc. etc. etc.

It says there FREE! yes absolutely BUT only if you reside within the United Sates of America (USA). If you really like TV shows like these and you happen to be residing outside America then poor you, Hulu won’t allow you to stream their videos period.

A typical content message when you try to watch hulu videos outside US would be this:
We’re sorry, currently our video library can only be streamed within the United States. For more information on Hulu’s international availability, click here.

Over the past month, Hotspot Shield has become the main application to sneak and bypass IP filtering of Hulu but unfortunately, that didn’t last long. Hulu finally blocked users who are using Hotspot Shield to stream their videos and left us nothing again. Sure you can use third party VPN but how much are you willing to pay for their service? Wouldn’t be nice that everything in your internet would be free (specially watching TV shows)?

Ok, enough said. After Hotspot Shield, I have discovered that an application of AOL called AOL Desktop can let you stream Hulu videos in any part of the world. What it does is, it changes your IP address into a US IP address and that in return will make Hulu videos accessible right away.

Here’s how we can Watch Hulu Video using AOL Desktop

1. First, create a free email of AOL, get it here: https://new.aol.com/productsweb/?promocode=825330

2. Download AOL Desktop and install it on your PC. Mac users, click here.

3. Open AOL Desktop and click sign-in at the upper right hand of the screen.

4. Check if you’re email is working by logging in using the username and password that you have created in step 1.

5. Once you have successfully logged in, sign out of AOL.

6. Sign in again, but this time BEFORE you click the “sign-in button” click on “connection options” first.

7. Now under connect options, select advanced broadband settings (see picture).

Watch Hulu Streaming Videos Anywhere in the World

8. Click continue and create a new broadband profile (see picture) and then choose Home Network under Connection Type and save.

Watch Hulu Streaming Videos Anywhere in the World

Watch Hulu Streaming Videos Anywhere in the World

 

 

 

 

 

 

9. You will now have an AOL connection on your system tray (beside the time). Sign in with your username and password and choose the profile you created under connection. (see picture)

Watch Hulu Streaming Videos Anywhere in the World

10. Once connected, check your IP address using http://whatismyipaddress.com/. If you see a screenshot like this:

Watch Hulu Streaming Videos Anywhere in the World

11. Fire up your favorite browser (Firefox or Internet Explorer) and log in to Hulu.com and watch unlimited Hulu streaming videos all day, all night for FREE. Enjoy!

Thursday, June 20, 2013

Install Google Chrome with YUM CentOS 6.4


Enable Google YUM repository




## Enable Google YUM repository ##
nano /etc/yum.repos.d/chromium-el6.repo




Add following to /etc/yum.repos.d/chromium-el6.repo file:


[chromium-el6]
name=CentOS-$releasever - Chromium EL6
baseurl=http://people.centos.org/hughesjr/chromium/6/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Testing-6



Ctrl + O to save file, Ctrl + X to close file

 

Install Google Chrome with YUM (as root user)




## Install Google Chrome Stable version ##
yum install chromium

Monday, June 17, 2013

How to configure Postfix to send mail via Google Apps

In this tutorial, we’ll configure Postfix to send an email through Google’s SMTP on Ubuntu 12.04 LTS Server for Google Apps. We can use the exact same setup for Gmail account also:

google-apps

Install Postfix and command line mail utility using the following command:
sudo apt-get install postfix mailutils

1

Backup the default configuration file for postfix:
sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.bk

1a

Edit the /etc/postfix/main.cf file:
sudo nano /etc/postfix/main.cf

2

Delete everything from main.cf file and add this:
smtp_sasl_security_options = noanonymous
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/googleapps/password

3

Create a directory googleapps under /etc/postfix:
sudo mkdir /etc/postfix/googleapps

4

Move to the /etc/postfix/googleapps directory:
cd /etc/postfix/googleapps/

5

Create a file named password inside /etc/postfix/googleapps directory:
sudo nano password

6

Add the following contents to the password file:
[smtp.gmail.com]:587 arbab.nazar@rbgeek.com:password

7

Note: arbab.nazar@rbgeek.com is a Google apps mail address of mine with false password, you can use your original Google apps email address and password here.

Change the permission on password file:
sudo chmod 600 password

8

Transform the password file into a hashed table:
sudo postmap password

9

Copy CA root certificates to postfix directory:
sudo cp /etc/ssl/certs/ca-certificates.crt /etc/postfix/cacert.pem

10

Restart the postfix service:
sudo /etc/init.d/postfix restart

11

Test the postfix server by sending an email to another account:
echo "Testing" | mail -s "Email from tendo" arbabnazar@ymail.com

12

Check the destination email account:

13

Hope this will help you!

How to connect to an EC2 instance using Putty

You created an EC2 instance and got private key (with PEM extension)from Amazon. Now, how you can login to your instance with PuTTY? For this, you need to convert the .PEM to .PPK format using Puttygen.

Run Puttygen:



Click on the Load button:



Locate your PEM file that you want to convert:



Putty will convert the .PEM to .PPK format:



Select “Save Private Key” (passphrase is not required):



Launch Putty and enter the Instance IP address:



Navigate to Connection -> SSH -> Auth, Click “Browse” and select the .PPK file and Click “Open“:



When connection comes up enter username (default is ubuntu for Ubuntu and root for CentOS):



Hope this will help you!

How to Mount EC2 EBS Storage To EC2 Linux Instance

Login to your AWS management console,click on EC2 in the list of AWS products and from there, identify the correct region of EC2 instance because EC2 EBS volume must be in the same location as the EC2 instance:



Click Volumes located under Elastic Block Store then click on Create Volume button, which will launch the EBS volume creation wizard, Simply fill in the details and click Yes,Create:



Note: EBS volume that is created in us-east-1a, will only be mounted to a EC2 instance located in us-east-1a.

Right clicking on the EBS volume that we have just created and select Attach Volume from the menu:



Select the Instance that you want to attach with EC2 EBS volume:



Then click the Yes, Attach button to attach the EBS volume:



Next login to the AWS instance where you attached the EBS volume and type:
sudo fdisk -l



Where xvdf is our newly added EBS!

To create the partition on the second EBS, use the following command and follow the “on screen” instructions:
sudo fdisk /dev/xvdf



Use the partprobe command to update the kernel with the changes:
sudo partprobe /dev/xvdf

Note: Where /dev/xvdf is my device name, you can use your’s!

Now we need to format our newly created parition using the following command:
sudo mkfs /dev/xvdf1 -t ext4



Verify the newly created partition:
sudo fdisk -l



Next you need to create a directory for a mount point:
cd /mnt/
sudo mkdir 2ndEBS



Next, mount the newly created xvdf1 parition into 2ndEBS directory:
sudo mount /dev/xvdf1 /mnt/2ndEBS -t ext4



Configure the permission on 2ndEBS directory:
sudo chmod 0777 /mnt/2ndEBS/



Now, we make a test that we can write a file on to the new drive:
touch /mnt/2ndEBS/test.txt
ls /mnt/2ndEBS/*



Next time, when we will reboot the computer, it will be gone. If we want to mount new EBS permanently then we need to edit the fstab file:
sudo nano /etc/fstab



Add this line at the end of the fstab file(you can adjust it according to your requirement):
/dev/xvdf1 /mnt/2ndEBS ext4 defaults 0 0



Use this command or else reboot your computer:
sudo mount –a



Hope this will help you!

Apache Virtual Hosts in Ubuntu

In this tutorial, I’ll show you the steps to configure 3 Apache virutal hosts running on a single EC2 Ubuntu Instance. The three domains, that I’ll use in this tutorial are:
1) linuxsoft.tk
2) rbgeek.tk
3) tendo.tk

DNS setting for these 3 domains are as follows:







Create three folders inside the /var/www folder, they will host these new sites:
sudo mkdir /var/www/tendo
sudo mkdir /var/www/rbgeek
sudo mkdir /var/www/linuxsoft



Copy the /etc/apache2/sites-available/default file with the name same as the new sites:
cd /etc/apache2/sites-available/
sudo cp default tendo
sudo cp default rbgeek
sudo cp default linuxsoft



Edit the new config files for each site:
sudo nano linuxsoft



Add the line ServerName with the name of your domain/site and change both DocumentRoot and Directory that point to your new site:



Repeat these steps for other new sites same as above:
rbgeek.tk




tendo.tk





To enable the each virtual host, simply type:
sudo a2ensite tendo
sudo a2ensite rbgeek
sudo a2ensite linuxsoft
sudo a2dissite default



Finally, restart the Apache service:
sudo service apache2 restart



Test all the sites:

http://www.tendo.tk



http://www.rbgeek.tk



http://www.tendo.tk



Troubleshooting:





Hope this will help you!