Category Archives: Bash

LOG-ROTATE AND Throw backups into AWS S3.

Every restaurant has a base sauce ready for different dishes, the same way I am sharing a base shell script to log-rotate custom logfiles and push archives into S3. You can modify the script as per the taste (^_-) To begin with, you must install s3cmd on your server first and configure it then create a tmp directory inside your

Read more

How to free PHP-fpm Memory at Server

  Often when you are running PHP with any web server (Apache or Nginx), the FastCGI process manager eats up a lot of your RAM, by forking multiple subprocesses for every request, which in turn leads to memory leakage. To avert this, it is desirable to schedule a shell script and reduce this memory leakage. Save the below command as

Read more

Source – UNIX, Destination – Windows Cygwin (SSH Password-less Authentication)

On Windows Server In windows cygwin create user, say MyUser, locally and also create user in cygwin cd C:\cygwin Cygwin.bat   Administrator@MYWINDOWSHOST ~ $ /bin/mkpasswd -l -u MyUser >>/etc/passwd MyUser@MYWINDOWSHOST ~ $ ls MyUser@MYWINDOWSHOST ~ $ ls -al total 24 drwxr-xr-x+ 1 MyUser        None    0 Mar 17 12:54 . drwxrwxrwt+ 1 Administrator None    0 Mar 17 12:54 .. -rwxr-xr-x  1

Read more

Hack #1 -> Define CD Base Directory Using CDPATH

If you are frequently performing cd to subdirectories of a specific parent directory, you can set the CDPATH to the parent directory and perform cd to the subdirectories without giving the parent directory path as explained below. # pwd /home/ramesh # cd mail -bash: cd: mail: No such file or directory [Note: The above cd is looking for mail directory

Read more

MySQL – Enterprise – Installation – Linux

Phase #1 –  PreRequisites MAKE SURE A MOUNT POINT /MySql IS CREATED BEFORE RUNNING THIS SCRIPT………………………… Creating the symbolic soft link for parallel database updations ln -s /data /MySql/mysqldb ln -s /data /MySql/mysql_db Soft Links Created. User and Group Adding. groupadd -g27 mysql echo ‘System Group mysql created with GID 27.’ useradd -m -d /var/lib/mysql -g mysql -G mysql -p

Read more
« Older Entries