FFmpeg error

FFmpeg error

After installing FFMpeg , when you execute the command : ffmpeg or ffmpeg -v, you may receive an error.

ffmpeg: error while loading shared libraries: libavformat.so.50:

Resolution :

Execute the following command :

export LD_LIBRARY_PATH=/usr/local/lib:LD_LIBRARY_PATH

But this value will be cleared once you log off that session.

So it is better to save this value in bashrc.

vi .bashrc
LD_LIBRARY_PATH=/usr/local/lib

Disable direct root login via ssh

Please follow the given steps to disable direct root login access to the server via shell prompt.

STEP 1: Create a user and add it to the wheel group

SSH into your server as root and follow the below commands to create a user.

$ groupadd test
$ useradd test -gtest
$ passwd test

You can create any user instead of “test”.

STEP 2: Add user to wheel group

You can add the user at the end of the ‘group’ file.

$ grep wheel /etc/group
wheel:x:10:root

Add the user test:

wheel:x:10:root,test

For CPanel Servers, do the following.

1. Log into your WHM and click on “Manage Wheel Group Users”.

2. Select the user (Here it is “test”) and click ‘Add to group’.

3. Before disable the root access, check if the user can login and su – to gain root privileges.

SSH into your server as ‘test’

Login as: test

Password : enteryouruserpasswordhere

su –

password: enter root password here

STEP 3: Disable Direct Root Login

1. Copy and paste this line to edit the file for SSH logins

$ vi /etc/ssh/sshd_config

2. Find the line

Protocol 2, 1

3. Uncomment it (Remove #) and change it to look like

Protocol 2

4. Next, find the line

PermitRootLogin yes

5. Uncomment it (Remove #) and make it look like PermitRootLogin no

6. Save the file.

Now, no one will be able to login to root with out first logging in as ‘test’ and ’su -’ to root.


Yum errors

Yum errors

While running ‘Yum update’, if we get the following error,

downloading Packages:

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID ed00d312

Public key for syslog-ng-2.0.0-1.el4.i386.rpm is not installed

We can fix the error by installing GPG public key.

There are few kind of RPMs e.g atrpms, dag..

You can see the RPM types using the command,

yum list

Below are the ways to install RPM GPG keys for atrpms and dag,

wget http://ATrpms.net/RPM-GPG-KEY.atrpms

rpm –import RPM-GPG-KEY.atrpms

wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
rpm –import RPM-GPG-KEY.dag.txt

Turn on DMA mode on a hard drive

Direct memory access (DMA) allows certain hardware subsystems within the computer to access system memory for reading and/or writing independently of the central processing unit. It uses a procedure called cycle stealing, where the central processor memory access cycles are delayed for very short times to intersperse DMA controller memory access cycles. DMA is used for transferring data between the local memory and the main memory.

You can turn On DMA mode on a hard drive

You can check whether DMA is enabled on a hard drive for the IDE harddrive.

hdparm -iv /dev/hd

If DMA is on, the output should contain the following line,

using_dma = 1 (on)

If it is off you can enable it as follows,

hdparm -d /dev/hd

This will toggle the value of “using_dma” (It will turn off the value of “using_dma” if it was already on).

Change priority of swap files

You can check the current priority of the swap file from /proc/swaps.

$ cat /proc/swaps

Inorder to change the priority of the swap partitions, you need to edit the “fstab” and append the new priority. If you have the fstab entry for your swap file /swap1 as:

/swap1 swap swap defaults 0 0

then append the following:

/swap1 swap swap pri=x,defaults 0 0

where x is the new priority you have set.

You can re-mount it by using ‘mount -a’ command.

« Prev - Next »