Another MySQL daemon already running with the same unix socket.
After upgrading MySQL binaries mysqld will not start at all any more and shows below error : CT-1977-bash-4.1# service mysqld start Another MySQL daemon already running with the same unix socket. Starting mysqld: [FAILED] CT-1977-bash-4.1# MySQL service does not shut down gracefully during the OS reboot, leaving the old /var/lib/mysql/mysql.sock such that mysqld will not start up. Some people were able to reproduce this error on a CentOS 6.5 KVM guest virtual system by rebooting the host CentOS 6.5 system. […]
Read MoreHow to verify matching private key with a certificate
The private key contains a series of numbers. Two of those numbers form the “public key”, the others are part of your “private key”. The “public key” bits are also embedded in your Certificate (we get them from your CSR). To check that the public key in your cert matches the public portion of your private key, you need to view the cert and the key and compare the numbers. To view the Certificate and the key run the commands: […]
Read MoreList all mysql databases on server
List all mysql databases on server root@srv1 [~]# mysql -bse “show databases”
Read MoreHow to Disable Telnet access on server
Telnet should be disabled on all web servers, and you should use SSH which is more secure. Telnet sends password in plain text passwords and usernames through logins, and ‘crackers/hackers’ can obtain these passwords easily as compared to SSH. TELNET server listens for incoming messages on port 23, and sends outgoing messages to port 23. 1. Login to your server through SSH and su to root. 2. Type pico /etc/xinetd.d/telnet 3. Look for the line: disable = no and replace […]
Read MoreOpenSSL Tricks
Create a strong CSR and private keyopenssl req -new -nodes -newkey rsa:2048 -out server.crt -keyout server.key Parsing out the data within a certificateopenssl asn1parse -in server.crt Checking a certificate/key modulus to see if they correspondopenssl rsa -in server.key -modulus -noout | openssl md5openssl x509 -in server.crt -modulus -noout | openssl md5 Convert a key from PEM -> DERopenssl rsa -inform PEM -in key.pem -outform DER -out keyout.der Convert a key from DER -> PEMopenssl rsa -inform DER -in key.der […]
Read MoreRebuilding the initial ram disk (initrd)
Installing new hardware may mean that new kernel need to be loaded when your server boots up. There’s a two step process to making a new initrd file: First, add the appropriate line to your /etc/modules.conf or /etc/modprobe.conf which corresponds to your new kernel module. Next, rebuild the initial ram disk after making a backup of the current one: # cp /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img.bak# mkinitrd -f initrd-`uname -r`.img `uname -r` Reboot the server now and make sure the […]
Read MoreRegister to Red Hat Network
rhn_register that will register your server over at RHN. Well if you want to upgrade your kernel… you’ll have to edit the config to NOT skip the kernel up2date –configuretype 24and then type C and hit enterand then hit enter again Type:up2date -pthat will update the packages your server to reflect the packages available to update over at RH. Then typeup2date -uand it will install any updates that are available But remember you’ll have to setup an account over […]
Read MoreAdding IP aliases in FreeBSD
One question I hear quite often is “how do I add IP aliases in FreeBSD?” It’s not terribly intuitive, but you can follow these steps: Example:Server’s primary IP: 192.168.1.11 Additional IP’s to add: 192.168.1.12, 192.168.1.13, and 192.168.1.14 Boot-time configuration:Add it to /etc/rc.conf first (so you don’t forget). In this example, we have a Realtek card called rl0:ifconfig_rl0=”inet 192.168.1.11 netmask 255.255.255.0″ifconfig_rl0_alias0=”inet 192.168.1.12 netmask 255.255.255.0″ifconfig_rl0_alias1=”inet 192.168.1.13 netmask 255.255.255.0″ifconfig_rl0_alias2=”inet 192.168.1.14 netmask 255.255.255.0″ IMPORTANT NOTE: Start with the number 0 (zero) any time […]
Read MoreCrontab basics
cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris. Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times. Crontab syntax A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval. […]
Read MoreUninstall APF
Sometimes we may require to remove APF from the server. Here is a guide which shows how to remove APF completely from the server. Stop the firewall first service apf stop /bin/rm -rfv /etc/apf Remove the cron for APF /bin/rm -fv /etc/cron.daily/fw /bin/rm -fv /etc/init.d/apf lastly disable at startup chkconfig apf off This should remove APF completely from the server as we removed the APF daemon, cron and files.
Read More