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… Continue reading Another MySQL daemon already running with the same unix socket.
Category: Command Line
How 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… Continue reading How to verify matching private key with a certificate
List all mysql databases on server
List all mysql databases on server root@srv1 [~]# mysql -bse “show databases”
How 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.… Continue reading How to Disable Telnet access on server
OpenSSL 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… Continue reading OpenSSL Tricks
Rebuilding 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… Continue reading Rebuilding the initial ram disk (initrd)
Register 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… Continue reading Register to Red Hat Network
Adding 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… Continue reading Adding IP aliases in FreeBSD
Crontab 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.… Continue reading Crontab basics
Uninstall 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… Continue reading Uninstall APF