Monday, March 11, 2013

pure-ftpd: relocation error: pure-ftpd: symbol my_make_scrambled_password, version libmysqlclient_15 not defined in file libmysqlclient.so.15 with link time reference



There are several solutions to this.. for me following worked: 

yum install mysql-devel


Running an Infinite loop in Bash



#!/bin/bash
for (( ; ; ))
do
   echo "infinite loops [ hit CTRL+C to stop]"
done

Alert: the_dns_template_doesnt_exist


Have not been able to find any solution for this... 

Thursday, March 7, 2013

How to check your CentOS version


Easiest way is to use command line.. 

cat /etc/centos-release
Or
cat /etc/redhat-release

CentOS version history follows that of Red Hat
If you want to know more details on your kernel etc.. use the below command: 
uname -a
Sample Output
Linux sample.com 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 13:35:30 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

There you could be newer kernels installed on your CentOS server but not actually running. You can list the installed kernels using yum or rpm. You can then see which kernel is set to start on boot by checking your /etc/grub.conf.

Another great way to get all this information would be to use lsb-release..: 


lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final


How to view Events of a MySql Schema

To see various events that are there in MySql Schema use the below command:

show events; 

If you want to see events on a particular schema include the From clause..

show events from MySchema; 


Saturday, February 23, 2013

How to Create New User Account in Ubuntu Linux from command line?


Use useradd command create a new user or update default new user information from command line.

useradd testuser
passwd testuser

The above command will create a user named testuser and set its password to testuser. 

Some important files that define various properties etc for this user: 


  • /etc/passwd - User account information.
  • /etc/shadow - Secure user account information such as password.
  • /etc/group - Group account information.
  • /etc/default/useradd - Default values for account creation.
  • /etc/skel/ - Directory containing default files.
  • /etc/login.defs - Shadow password suite configuration.


Above command useradd will not create a home directory for this user. To create those try the below command that will create the user as well as home directory for it. 

sudo useradd -m -k /etc/skel -d /home/testuser testuser

This will create a user named test user with a home directory /home/testuser and will have the same files and settings as in /etc/skel.

To delete the user follow command: 

sudo userdel testuser




Thursday, February 21, 2013

"Too many connections" - Error when trying to connect to Mysql


If you get "Too many connections" error when trying to connect to Mysql Server that means all available connections have been allocated and used by other clients.


Actually the number of connections is limited by max_connections variable. To whatever value this variable is set, that many connections can be opened by clients to mysql. In actual it is set to max_connections + 1. The +1 is actually reserved for the Super User so that they can login to mysql and troubleshoot problems even if the usable connections have exhausted. 

The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform, the amount of RAM available, how much RAM is used for each connection, the workload from each connection, and the desired response time.