Posts

Showing posts from 2018

Win 10 Modifying the Automatic Installation of Updates

 Open the Run command (Win + R), in it type: gpedit.msc and press enter Navigate to: Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update Open it and change the Configure Automatic Updates setting to ‘2 - Notify for download and notify for install’ Open the Settings app (Win + I) and navigate to -> Update and Security -> Windows Updates. Click ‘Check for updates’ which applies the new configuration setting. Restart system

How to delete 'n' number if commands executed from bash history

For deleting 'n' number of commands frm bash history, first type history command in shell, #history for example if you need to delete commands from line 520 to line 637 . execute the command as follows. #for h in $(seq 520 637 | tac); do history -d $h; done thats it.

Permission denied: user=root, access=WRITE, inode="/user/root":hdfs:hdfs:drwxr-xr-x

If you are running the hive command as root and still recieve the same error, do the following root@hadoop_server:~# sudo -u hdfs hadoop fs -mkdir /user/root root@hadoop_server:~# sudo -u hdfs hadoop fs -chown root:root /user/root this should fix the problem and you will be able to run the hive command line.

IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect

If  trying isql from server gives the following error, IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect Then check the results of following commands in servers odbcinst -q -s odbcinst -q -d if you find any error means that the server is unable to read both odbc.ini and odbcinst.ini files. To resolve this configure the environment variable of server as  export ODBCSYSINI=/etc/ export ODBCINI=/etc/odbc.ini this should fix the error.

How to add an environment variable permanent in Redhat Linux

You can add an environment variable using the export command. But you can see that once you logout, the parameters you added wont be there. So inorder to add those variables permanently after adding the variable using export command, for example [root@server ~]# export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:/usr/lib:/usr/lib64:  we need to add the same command line in the file /etc/profile or /etc/bashrc  so that it will make the variable permanent for all users. If the change is neeed only for the current user annd the command in the .bashrc file inside the home folder of the current user.

Mysql deleted logs consuming physical server space

If you find that the server is using excess amount of physical disk space; try a df -h and find out the partition where the disk usage is getting higher. root@server:~# df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda1       242G  194G   36G  85% / udev             10M     0   10M   0% /dev tmpfs           6.3G   41M  6.3G   1% /run tmpfs            16G     0   16G   0% /dev/shm tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs            16G     0   16G   0% /sys/fs/cgroup root@server:~# Gere we can see that the / partition is using much space than it should be. confirm the situation by changing intho the / partition and do a 'du' root@server:#  du -sch /* 11M     /bin 30M     /boot 0       /dev 5.5M    /etc 24K     /home 24K     /tmp 1.2G    /usr 23G     /var 0       /vmlinuz 25G     total Here we can see that the total space used by / partition is just 25 GB and not 194GB as per

Reinstall steps for mysql in debian server

apt-get remove -y mysql-* apt-get purge -y mysql-* Once finished, rm -rf /var/lib/mysql rm -rf /etc/mysql* apt-get install mysql-client mysql-server mysql-common

Change file and folder permission recursively

To Change file and folder permission recursively, use the following command. Here we are using the folder /var/www as example sudo find /var/www -type d -print0 | xargs -0 chmod 755 sudo find /var/www -type f -print0 | xargs -0 chmod 644