How to disable core dumps on Linux Servers

To disable core dumps on Linux Servers

Core dump is a memory or a storage dump which records the memory state of a computer program when it was terminated by the operating system due to various error behavior. In this article Hostdens will give you how to disable core dumps on Linux Servers.

disable-core-dumps-on-Linux-Servers

Please follow the steps to disable core dumps for all users : 

Step 1 :  Edit /etc/security/limits.conf and use the following command.

vi /etc/security/limits.conf

Step 2:  Make sure the following config directive exists by using following command. 

hard core 0

Step 3 : Disable core dumps for setuid programs by using following command.

echo ‘fs.suid_dumpable = 0’ >> /etc/sysctl.conf
sysctl -p

Step 4 : Now, Set a soft limit to stop core dumps being created by using following command.

echo ‘ulimit -S -c 0 > /dev/null 2>&1’ >> /etc/profile

That’s it!

Read More

“ffmpeg: error while loading shared libraries: libavdevice.so.52:”

Error While installing FFMPEG on CentOS server “ffmpeg: error while loading shared libraries: libavdevice.so.52:”

After installing FFMPEG on one of my client server, the above error apears whenrunning ffmpeg for the first time.

 

Error :

 

“ffmpegffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory”

 

Error-and-Solution

 

Solution :

 

It is very simple step to solve your error.

Only Change your library path by running following command :

 

root@hostdens[~]# export LD_LIBRARY_PATH=/usr/local/lib/

.
.
.
.

Its done!

 

 

Read More

How to install ioping in linux server ?

This tool lets you monitor I/O latency in real time. It shows disk latency in the same way as ping shows network latency.

Login to SSH.

Go to the folder where you want to download it.

cd /usr/local/src

Download the installation file.

https://ioping.googlecode.com/files/ioping-0.6.tar.gz

Extract that file using below command.

tar -xzvf ioping-0.6.tar.gz

Go inside that folder.

cd ioping-0.6

compile it using below command.

make ioping

 

Read More

How to configure Idera R1Soft backup agent ?

r1soft

First, create a YUM .repo file with the R1Soft repository information.

Open the new file with a text editor such as vi or nano:

# cd /etc/yum.repos.d

vi r1soft.repo

Insert the following text into the file and save the file:

[r1soft]
name=R1Soft Repository Server
baseurl=http://repo.r1soft.com/yum/stable/$basearch/
enabled=1
gpgcheck=0

Once done run below command.

yum clean all

Now install cdp agent

yum install r1soft-cdp-enterprise-agent
yum install kernel-devel kernel-headers
yum upgrade kernel

install r1soft kernel binaries

r1soft-setup –no-binary

Restart r1soft agent after binaries are done.

Check connectivity

r1soft-setup –test-connection

Insert key using below command

serverbackup-setup –get-key http://IP

Restart the server. Once server is online check cdp-agent is running or not. If not then start that service.

Sometimes you will face connectivity issue at that check port is opened on server firewall. Default port is 1167

iptables -I INPUT -p tcp –dport 1167 -j ACCEPT

Save iptables and restart it and test it again.

Front end task done. Now backend  task

Login to backend admin panel of r1soft

Click on servers.

Add server It will ask for server name VM hostname, IP address things insert it and click on create button.

Then click on Users.

username: customer-name >> password >> email

then click on server tab add the new server you created for the customer. Give full control. No volumes.

Then click on disks safes.

name same as servers name :  on server drop down arrow search for the servers you added earlier, volume pick volume1. click on Limits. Put recovery points and archive to 3.

Quota on disk size : soft 48 hard quota 50. Click on create.

Policy make the policy to backup weekly, merge weekly, disk verification weekly, exclude files you don’t want to backup to avoid using all disk space.

then when finish give client his R1SOFT credentials.

Read More

How to add a domain without control panel on server ?

First, add the user on server.

useradd hostdens

Then go to the home folder and search the user.

cd /home/

ls -ld hostdens

Then go to the user by giving the below command.

cd hostdens

Create the public_html folder under that user.

mkdir public_html

Provide proper ownership and permission to public_html folder.

chown hostdens. public_html

chmod 750 public_html

 

Now, add manual entries of virtual host at the end of httpd.conf. Before that take the copy of httpd.conf

cd /etc/httpd/conf/

cp httpd.conf httpd.conf-bak

vi /etc/httpd.conf

ex
—————————-
<VirtualHost 192.99.205.115:80>
ServerAdmin webmaster@hostdens.com
DocumentRoot /home/hostdens/public_html
ServerName hostdens.com
ErrorLog logs/hostdens.com-error_log
CustomLog logs/hostdens.com-access_log common
</VirtualHost>

change the document root path, server name, error logs and custom logs
save the files and restart the apache. First, check the apache syntax is correct.

httpd -t

/etc/init.d/httpd restart

Then create the DNS entry of the domain

Go to named path

cd /var/named/

Copy the entry of another domain

cp hostdens1.com.db hostdens.com.db-bak

mv hostdens.com.db-bak hostdens.com.db

Open that file now.

vi hostdens.com.db

Accept name server replace the domain name with your main domain name.

$TTL 14400
hostdens.com. 86400 IN SOA ns1.hostdens.com. support.hostdens.com. (
2010020703 ;Serial Number
86400 ;refresh
7200 ;retry
3600000 ;expire
86400 ;minimum
)
hostdens.com. 86400 IN NS ns1.hostdens.com.
hostdens.com. 86400 IN NS ns2.hostdens.com.
hostdens.com. 14400 IN A 192.99.205.115
hostdens.com. 14400 IN MX 0 hostdens.com.
mail 14400 IN CNAME hostdens.com.
www 14400 IN CNAME hostdens.com.
ftp 14400 IN A 192.99.205.115

save and quit the file.

Open named.conf file and the entery of that domain, First create the backup file of named.conf

cd /etc/

cp named.con named.conf-bak

vi /etc/named.conf

Copy the entry of another domain and replace the other domain with your domain name.

zone “hostdens.com” {
type master;
notify no;
file “hostdens.com.db”;

};

Once done then restart the named service.

/etc/init.d/named restart

Restart the ftp service to connect to the server via FTP now.

Read More