Recover MySQL root password

YOU CAN RECOVER A MYSQL DATABASE SERVER PASSWORD WITH THE FOLLOWING FIVE EASY STEPS: Stop the MySQL server process. Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for a password. Connect to the MySQL server as the root user. Set a new root password. Exit and restart the MySQL server. Here are the commands you need to…

Read More

Getting the size of a directory on the command line?

Here is a function for  .bash_aliases (vi ~/.bash_aliases) # du with mount exclude and sort function dusort () { DIR=$(echo $1 | sed ‘s#\/$##’) du -scxh $(mount | awk ‘{print $3}’ | sort | uniq \ | sed ‘s#/# — exclude=/#’) $DIR/* | sort -h } source vi ~/.bash_aliases  sample output: $ dusort / … 0 /mnt 0 /sbin 0 /srv 4,0K /tmp 728K /home…

Read More

Kernel Tuning of Linux web server

Config  /etc/sysctl.conf # Configuration file for runtime kernel parameters. # See sysctl.conf(5) for more information. # See also http://www.nateware.com/linux-network-tuning-for-2013.html for # an explanation about some of these parameters, and instructions for # a few other tweaks outside this file. # Protection from SYN flood attack. net.ipv4.tcp_syncookies = 1 # See evil packets in your logs. net.ipv4.conf.all.log_martians = 1 # Discourage Linux from swapping idle server…

Read More

optimize and speed up linux server

Its a common meditation – think of us that hardware upgrade is the best way to speed up a server. Its like more memory, or cpu cant deliver vetter performance. Hardware upgrades are only a temporary fix. if services / application are not optimized. Online applications are hosted/running on a web server front-end & db servers in the back-end. Over time these services tend to…

Read More

Remove packages including unused dependencies on Linux

Very often we install a package just for short usage. Most of the time do these packages install a lot of dependencies along with it. After you don’t require the package anymore you remove it but the dependencies are not removed. Every unused package increases the security risk and it also needs some space. A good example is an environment for compiling from sources. $>…

Read More

Vmware template creation : Centos 7

# some variables export ADMIN_USER=“admin” export ADMIN_PUBLIC_KEY=“your public ssh key” # install necessary and helpful components yum –y install net–tools nano deltarpm wget bash–completion yum–plugin–remove–with–leaves yum–utils # install VM tools and perl for VMware VM customizations yum –y install open–vm–tools perl # Stop logging services systemctl stop rsyslog service auditd stop # Remove old kernels package–cleanup –y —oldkernels —count=1 # Clean out yum yum clean…

Read More

Sentora install with NginX and Varnish for performance optimization

Sentora, comes with Apache 2.2 and I feel that it’s a bad solution when there are many good solutions already for using as web server e.g. Litespeed, NginX, Lighttpd etc. Litespeed is a paid service. If you have the ability to pay for it, you should use it as it is very good Benchmark test results. The person, like me, should go through the most of…

Read More

Requirement of Linux Security Engineer

Linux System ●  Building and administrating Red Hat Enterprise Virtualization for Servers ●  Building and administrating Red Hat Enterprise Linux Servers ●  Using GFS2, KVM, and clustering Linux systems ●  Patching and building servers using Red Hat Network Satellite Server ●  Configuring HP Blade Systems and Virtual Connects ●  Managed storage on HP EVA and MSA storage systems ●  Configured zones on HP/Brocade Fiber Switches…

Read More

AWS Database Types

RDS OLTP SQL Oracle MariaDB PostgreSQL MySQL Aurora DynamoDB – No SQL RedShift- OLAP Elasticache- In memory caching Memcached redis   The following table shows the IOPS and storage range for each database engine. Range of Provisioned IOPS Range of Storage Range of IOPS to Storage (GB) Ratio MySQL 1000 – 30,000 IOPS 100 GB – 6 TB 3:1 – 10:1 MariaDB 1000 – 30,000…

Read More