Posted on Leave a comment

Install Transmission Client to RHEL / CentOS 6

Torrent Guide – Install Transmission Client to RHEL / CentOS 6

transmission

Transmission Bittorrent Client

Transmission is an open source and extremely lightweight Bittorrent client. It is available for any OS and comes with it’s own GUI interface.

Although Transmission is not as popular as rTorrent/ruTorrent for seedboxes, it is still a strong solid choice as it does not require a web server to be deployed on the OS and has a light memory footprint allowing for it to run in very-low ram VPS environments.

Installing Transmission-BT to CentOS 6

For this guide I will be using CentOS 6, but any RHEL distro should work with similar commands.

Transmission can be installed quite easily through the repositories, however it is not part of the default Red Hat repositories. First we will need to install the EPEL repository to our server:

You can find the lastest EPEL repositories here:

https://fedoraproject.org/wiki/EPEL

For simplicity sake you can always just following my guide with version as of time of this writing, as it will be updated when you do an upgrade anyways.

1
2
wget http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm

Now with this repository added we can install Transmission via yum

1
2
yum -y update
yum -y install transmission transmission-daemon

Then start the process:

1
service transmission-daemon start

Test Transmission

Transmission uses port 9091 by default, try it now using your server’s IP or FQDN.

You will either see Transmission load, or you will see an error like this:

Transmission_-_2014-04-21_14.36.17

The reason for this error is because Transmission is setup by default to only accept connections from localhost. If you get this error proceed to the next step…

Configure Transmission For Remote Access

Before we modify the configuration we’ll want to stop the service. This is important!! Transmission will write it’s setting files on shutdown, so if we edit the settings now and “restart” Transmission then our changes just get overwritten.

1
service transmission-daemon stop

Now we can make changes to the settings.json file. Transmission will automatically write it’s config to the user’s home directory. By default the daemon process will be using “Transmission” user which is set to /var/lib/transmission rather then using the /home folders.

If you have trouble finding your settings.json you can always use the findcommand:

1
find / -name settings.json

Edit the settings.json file once you’ve located it:

1
nano /var/lib/transmission/.config/transmission/settings.json

Find the following lines:

    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": true,

Change this according to your preferences. When a “White List” is set it means only those IP addresses can access the software. If you want to use the White List then set the appropriate IP addresses here. Otherwise we can just set the whitelist to false like so:

    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": false,

Start our service back up:

1
service transmission-daemon start

And test:

Transmission_Web_Interface_-_2014-04-21_14.44.55

Success!

Posted on Leave a comment

Android Studio – Rename Package

(1)

Open the file:

app >> manifests >> AndroidManifest.xml

enter image description here

Highlight each part in the package name that you want to modify (don’t highlight entire package name) then:

  • Mouse right click >> Refactor >> Rename >> Rename package
  • type the new name and press (Refactor)

Do these steps in each part of the package name

enter image description here

(2)

Open (Gradle Script) >> (build.gradle(Modul:app))

and update the applicationId to your package name

enter image description here

(3)

open the menu (build) and choose (Rebuild Project)

Posted on Leave a comment

How to install ffmpeg, ffmpeg-php on CentOS 6/7 (Cpanel Server)

FFmpeg

For EL6:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

Install FFMpeg from ATRPMS Repository:

yum -y install ffmpeg ffmpeg-devel

How to check if FFMPEG is working?

Verify the ffmpeg version:

ffmpeg -version
[root@centos:~]ffmpeg -version
ffmpeg version 2.2.1
built on Apr 13 2014 13:00:18 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping
libavutil      52. 66.100 / 52. 66.100
libavcodec     55. 52.102 / 55. 52.102
libavformat    55. 33.100 / 55. 33.100
libavdevice    55. 10.100 / 55. 10.100
libavfilter     4.  2.100 /  4.  2.100
libswscale      2.  5.102 /  2.  5.102
libswresample   0. 18.100 /  0. 18.100
libpostproc    52.  3.100 / 52.  3.100

Check the supported formats:

ffmpeg -formats

Test converting videos. Here’s an example from mp4 to h264:

cd /usr/local/src
wget https://archive.org/download/WoodstockFestivalTrailer/Woodstock_Festival_Trailer.avi
ffmpeg -i Woodstock_Festival_Trailer.avi -vcodec libx264 Woodstock_Festival_Trailer-H264.avi

After done, you should see the new H264 file:

-rw-r--r-- 1 root root 20M May 4 2006 Woodstock_Festival_Trailer.avi
-rw-r--r-- 1 root root 15M Jan 30 10:01 Woodstock_Festival_Trailer-H264.avi

How can I work with ffmpeg using PHP?

Simple.  Just install php-ffmpeg extension. First, install REMI repo in order to get your php-ffmpeg package as below:

Let’s download the RPM file for CentOS 5.x and CentOS 6.x:

EPEL repo for  Centos 5.x

wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5*.rpm

EPEL repo for Centos 6.x

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh  epel-release-6*.rpm

EPEL repo for Centos 7.x

wget http://download.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
rpm -Uvh  epel-release-6*.rpm

That command will install the EPEL repo inside your /etc/yum.repos.d directory.

then

Manually, install FFmpeg-Php
        cd /usr/local/src
        wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
        tar jxvf ffmpeg-php-0.6.0.tbz2
        cd ffmpeg-php-0.6.0
        phpize
        ./configure
        make
If you get (error make: *** [ffmpeg_frame.lo] Error 1) do this commands.
sed -i 's/PIX_FMT_RGBA32/PIX_FMT_RGB32/g' ffmpeg_frame.c
 OR
 vi ffmpeg_frame.c
 :%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
:wq
Then rerun "./configure && make" and if all went fine make install make install If no error skil to step 5. Step 5. Now adding to php.ini echo 'extension=ffmpeg.so' >> /usr/local/lib/php.ini Step 6. Now test php with ffmpeg php -r 'phpinfo();' | grep ffmpeg

-i | grep ffmpeg -i

/etc/php.d/ffmpeg.ini,
ffmpeg
ffmpeg-php version => 0.7.0
ffmpeg-php built on => Jan  1 2013 09:50:55
ffmpeg-php gd support  => enabled
ffmpeg libavcodec version => Lavc53.61.100
ffmpeg libavcodec license => GPL version 3 or later
ffmpeg libavformat version => Lavf53.32.100
ffmpeg libavformat license => GPL version 3 or later
ffmpeg swscaler version => SwS2.1.100
ffmpeg swscaler license => GPL version 3 or later

When you run command ./configure if you get error: configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the –enable-shared option. Check some library with command:

rpm -ql ffmpeg-devel

In On CentOS 6/7 with nux-dextop installed ffmpeg-devel

locate avio.h avformat.h avcodec.h
/usr/include/ffmpeg/libavcodec/avcodec.h
/usr/include/ffmpeg/libavfilter/avcodec.h
/usr/include/ffmpeg/libavformat/avformat.h
/usr/include/ffmpeg/libavformat/avio.h
/usr/share/doc/ffmpeg/libavcodec.html
/usr/share/doc/ffmpeg/libavformat.html

Now  do command:

[root@centos ffmpeg-php-0.6.0]# strace -f -o /ffmpeg-strace ./configure --with-php-config=/usr/bin/php-config --with-ffmpeg=/usr --includedir=/usr/include/ffmpeg

Then:

cat /ffmpeg-strace | egrep 'avio.h|avformat.h|avcodec.h'

Looks like ffmpeg-devel installed headers at

  • /usr/include/ffmpeg/libavcodec/avcodec.h
  • /usr/include/ffmpeg/libavfilter/avcodec.h
  • /usr/include/ffmpeg/libavformat/libavformat.h
  • /usr/include/ffmpeg/libavformat/avio.h

Problem is specific to avcodec.h, avformat.h, avio.h and swscale.h – so what about symlinking them

ln -s /usr/include/ffmpeg/libavcodec/avcodec.h /usr/include/ffmpeg/avcodec.h
ln -s /usr/include/ffmpeg/libavformat/libavformat.h /usr/include/ffmpeg/libavformat.h
ln -s /usr/include/ffmpeg/libavformat/libavformat.h /usr/include/ffmpeg/libavformat.h
ln -s /usr/include/ffmpeg/libswscale/swscale.h /usr/include/ffmpeg/swscale.h

Then configure and make again:

./configure && make
Posted on Leave a comment

How To Install And Run VLC On CentOS 6/7 As Root

VLC media player (commonly known as VLC) is a portable, free and open-source, cross-platform media player and streaming media server written by the VideoLAN project. VLC media player supports many audio and video compression methods and file formats, including DVD-Video, video CD and streaming protocols. It is able to stream media over computer networks and to transcode multimedia files.

The default distribution of VLC includes a large number of free decoding and encoding libraries, avoiding the need for finding/calibrating proprietary plugins. Many of VLC’s codecs are provided by the libavcodec library from the FFmpeg project, but it uses mainly its own muxer and demuxers and its own protocols implementations. It also gained distinction as the first player to support playback of encrypted DVDs on Linux and OS X by using the libdvdcss DVD decryption library.

For EL7:

Install  EPEL   from   http://www.unixmen.com/install-epel-repository-centos-rhel-7/
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

For EL6:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

Now:

yum update
yum  install vlc

vlc

There are not so many ways to make VLC Player work as root, and I have found this way is very easy and fast to make VLC Player Work as root.

Let me make one thing more clear that VLC is not only media player it can do so many things and Running VLC as root is very very risky. So think many times before you run VLC as root.

I have only tested that VLC can open using root user, have not tested other features. So take a note of this.

DO IT AT YOUR OWN RISK.

Before starting it let me tell you that please take a backup of original VLC file so you can recover if anything worst.

Perform following steps to Run VLC Player as root

 

 

1) Install Hexedit Package for your System

[root@vps ~]# yum install hexedit

2) Now Execute Following command take backup of Original VLC Command :-

[root@vps ~]# cp -p /usr/bin/vlc /usr/bin/vlc_original_bin

3) Now Open /usr/bin/vlc into hexeditor, Execute Following command :-

[root@vps ~]# hexedit /usr/bin/vlc

4) Now Press “TAB” Key.

5) Now Press “CTRL + s” to search ASCII String.

6) In Search Box, Now Type “geteuid” and Replace it with “getppid”

7) Now Press “CTRL + x” to Save the file.

8) That’s it. Now You can Open VLC using Command and From Menu too.

 

Posted on Leave a comment

WHM/CPANEL: Setting up ImageMagick on a dedicated server

ImageMagick logo

The following assumed you have root access to your cpanel server.  ImageMagick is one of the most requested add-ons that allows for image manupulation.  Always try to use GD first, if it is available, as it can be compiled from easyapache instead directly.

CHECK IF ITS INSTALLED FIRST:

from root ssh
/scripts/checkimagemagick

INSTALLATION
/scripts/installimagemagick
Installation will take a couple minutes as it will install other packages needed by ImageMagick. After the installation, check that it is installed again and it should state the version.
/usr/bin/convert --version

It will give you something like:
Version: ImageMagick 6.4.8, etc


Imagick
Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button – that’s all.  Restart Apache.

Uninstall:

If you decide to uninstall it’s as easy as the installation process:
ImageMagick: /scripts/cleanimagemagick
Imagick: WHM -> Software -> Module Installers -> PHP Pecl (manage). Click on Uninstall button for Imagick

CHECKING WHERE ImageMagick is located:
from ssh use
whereis convert
should give you the directory

Posted on Leave a comment

[TUT] How to Solve Rar/Unrar Problem in Rapidleech

Welcome to my tutorial about Rapidleech.

I noticed numerous threads about people getting errors and find it difficult to install rar / unrar on their server and make that function work in Rapidleech. I found a solution and I want to share it with us all.

Step 1 : Download zip file from http://safeurl.asia/EUQuJ
Step 2 : Extract and upload to /rar directory with binary mode

Both the rar folder and the files it contain should be Chmod to 777

Posted on Leave a comment

How To Fix GALAXY Specials Error In Samsung Seller Office

Recently Samsung seller office has done some changes, if you simply upload APK like Google play store it will throw error,

“The registered binaries do not meet the category conditions for GALAXY Specials. The GALAXY Specials category can be selected only if at least one binary supports GALAXY Specials. You can go to ‘Binary>Advanced Mode>Binary Details’ to check the supported GALAXY Specials options.”

There is no option to disable Galaxy specials in seller office, so the simple and easy way to fix this problem is just add a permission in your manifest file i.e,


<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY"/>


Thats all, now export your APK in release mode and upload it in Samsung seller office, a confirmation message appears, just confirm it.

Now APK will be successfully uploaded to Samsung app store.

Posted on Leave a comment

Mobile Ad for WordPress & Joomla – Earn more revenues from mobile

Mobile Ad for WordPress by AdsOptimal – DOUBLE MOBILE RPM WITH ADSOPTIMAL

Earn top dollar for your mobile web traffic! Promote mobile offers on your WordPress site and get up to $15 RPM or $4 per download by just installing the plugin.

Features

  • Choose from 9 different ad experiences, such as banner, interstitial, pop-up, and more.
  • Control how frequent user can see the ad. You can make sure you don’t bug user too many times.
  • Select to show the ad only when user finish reading your content.
  • Take only minutes to install. See your revenue in real time.
  • Receive a payout via Paypal or Check.
  1. adsoptimal screenshot 1Choose ad experience that fit with your WordPress site.
  2. adsoptimal screenshot 2Preview of our mobile ad. App-Store-like experience.
  3. adsoptimal screenshot 3Preview of our mobile ad. Standard banner format.
  4. adsoptimal screenshot 4Preview of our mobile ad. Contextual style.
Posted on Leave a comment

Amazon IAM user creation for single S3 bucket access

Login to AWS Management Console and from there select IAM:

1

From the IAM Console, click on the “Create new users” button in the toolbar, enter the name of the new user(You can give it any name like I gave it mymysqlbktos3) and then click “Create” button on the bottom of that form:

2

It will present you with the message “Your 1 User(s) has been created successfully“, Click “Download Credentials” button on the bottom to download the Security Credentials for that user, after that close the message box :

3

Select the new user and switch to the “Permissions” tab on the bottom, then click “Attach User Policy” button on that tab:

4

Select the “Custom Policy” and press “Select“:

5

Enter the Policy Name (Whatever you want, like I have entered the mysqlbktos3-policy) and Paste the following text as the Policy Document (Please change the Bucket Name, on which you want to give access to the following user, in my case the bucket name is mymysqlbk) and click “Apply Policy“:

{
 "Statement": [
 {
 "Effect": "Allow",
 "Action": ["s3:GetBucketLocation", "s3:ListAllMyBuckets"],
 "Resource": "arn:aws:s3:::*"
 },
 {
 "Effect": "Allow",
 "Action": ["s3:ListBucket" ],
 "Resource": [ "arn:aws:s3:::mymysqlbk"]
 },
 {
 "Effect": "Allow",
 "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject"],
 "Resource": [ "arn:aws:s3:::mymysqlbk/*"]
 }
 ]
}

6

Hope this will help you!

Posted on Leave a comment

How to Install the latest version of s3cmd tool on Linux

Please install the required packages before installing the s3cmd tool and download the source zip from github:

sudo yum install unzip python-pip
wget https://github.com/s3tools/s3cmd/archive/master.zip

7

Unzip the downloaded source zip file and move to the unzipped directory:

unzip master.zip
cd s3cmd-master/

8

Once you have moved to the unzipped directory then just run this command:

sudo python setup.py install

9

Install the dateutil module, which is powerful extensions to the datetime module that is available in the Python standard library:

sudo pip install python-dateutil

10

Check the installed version of s3cmd tool:

s3cmd --version

s3cmd version

After installation, run the following command in order to configure the s3cmd tools using your AMAZON ACCESS KEY and SECRET KEY.

s3cmd --configure

11

Enjoy