Error (d3dcompiler_47.dll is missing)

If you find the error,  d3dcompiler_47.dll is missing while installing any packages / applications in Windows Server 2008 R2, here is the following solution…

4.png

  • Download  .. Update for Windows Server 2008 R2 x64 Edition (KB4019990) and install
  • Issues resolved and you can install applications and other packages.

How to modify privileges of normal user as ‘root’

ROOT is an administrative account without the restrictions that are present on normal users. Users can execute commands with “super-user” or “root” privileges in a number of different ways. There are few commands to switch user to “privileged-as-root” account.

$sudo useradd ramesh

[sudo] password for sadmin: xxxxxxxxxx

sudo – is a command configured through a file in /etc/sudoers

$sudo visudo

[sudo] password for sadmin: xxxxxxxxxx

#Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
–if we want to provide full root privileges to specific user, we can specify as below

sadmin ALL=(ALL:ALL) ALL

(2) SUDO is a group, having full administrative privileges, if we add any user to this group, it will get full administrative powers

$sudo usermod -aG sudo
#example., $sudo usermod -aG sudo sadmin

(3) Alternatively, we can also use below command

$sudo gpasswd -a sadmin sudo

On CentOS, we can add users to wheel group, which is having super privileges

$sudo gpasswd -a sadmin wheel

 

 

Shell commands in Linux

$echo $HISTSIZE                                     (  — To find out history size, by default it will be 1000)

histsize

$echo $USER                                           ( — To find out user logged in)

user

$echo $BASH                                          (– To find full path name of BASH cmd)

bash

$echo $HISTFILE                                   (– To find file location of history of current user)

history

$echo $HISTCMD                                (– To find number of history contents of current user)

histcmd

$echo $MAIL                                         (– To find out location of mail-folder of current user)

mail

 

 

How to configure DNS Server in Ubuntu 14.04 LTS

To configure DNS server in Ubuntu 14.04

After installing ubuntu 14.04 LTS and check the hostname, while installing itself, we can give preferred hostname or else post installaton also, we can change as follows,

$ sudo cat /etc/hostname

Ubuntuclient

change the system  by following executing following commands

$ sudo vi /etc/hostname

ns1.example.com

$ sudo vi /etc/hosts

192.168.5.100 ns1.example.com

$ sudo apt-get update

(system will update it’s repositories through terminal)

$ sudo apt-get install bind9 bind9utils bind9-doc

(We need to install bind9, bind9utils, bind9-doc packages)

$ sudo vi /etc/default/bind9

(We need to set IPV4 mode to  bind and to do the same , edit following bind9 file using vi editor , change in following line)

OPTIONS=”-4 -u bind”

SAVE and EXIT file

Now, bind has been installed and need to configure Primary DNS Server

$ sudo vi /etc/bind/named.conf.options

(Insert following lines in named.conf.options file at the end of the file – creating access list “trusted”)

====================================================================

acl “trusted” {
192.168.5.100; # ns1 – can be set to localhost
192.168.5.101; # ns2
};

====================================================================

options {
directory “/var/cache/bind”;

recursion yes;                                # enables resursive queries
allow-recursion { trusted; };    # allows recursive queries from “trusted” clients
listen-on { 192.168.5.100; };     # ns1 private IP address – listen on private network only
allow-transfer { none; };           # disable zone transfers by default

forwarders {
8.8.8.8;
8.8.4.4;
};

====================================================================

Locate following file /etc/bind/named.config.local

$ sudo vi /etc/bind/named.conf.local

zone “ns1.example.com” {
type master;
file “/etc/bind/zones/db.ns1.example.com”; # zone file path
allow-transfer { 192.168.5.101; }; # ns2 private IP address – secondary
};

zone “5.100.in-addr.arpa” {
type master;
file “/etc/bind/zones/db.5.100”; # 192.168.5.100/24 subnet
allow-transfer { 192.168.5.101; }; # ns2 private IP address – secondary
};

$ sudo mkdir /etc/bind/zones

(Create folder named ‘zones’ inside /etc/bind directory)

$ sudo vi /etc/bind/zones/db.ns1.example.com
$TTL 604800
@ IN SOA ns1.example.com. admin.ns1.example.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; name servers – NS records
IN NS ns1.example.com.
IN NS ns2.example.com.
; name servers – A records
ns1.example.com. IN A 192.168.5.100
ns2.example.com. IN A 192.168.5.101
sudo vi /etc/bind/zones/db.5.100
$TTL 604800
@ IN SOA ns1.example.com. admin.ns1.example.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers
IN NS ns1.example.com.
IN NS ns2.example.com.
; PTR Records
5.100 IN PTR ns1.example.com. ; 192.168.5.100
5.101 IN PTR ns2.example.com. ; 192.168.5.101
$ sudo named-checkconf

.OK

$ sudo service bind9 restart

Restart the bind – service

In (Ubuntu) client systems

$ sudo vi /etc/resolvconf/resolv.conf.d/head

search ns1.example.com
nameserver 192.168.5.100
nameserver 192.168.5.101

$ nslookup ns1

Server: 192.168.5.100
Address: 192.168.5.100#53

Name: ns1.example.com
Address: 192.168.5.100

Error while starting Apache2

Error:  Restarting web server apache2 AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/huizenmeteenverhaal.nl.conf:5 (98)Address already in use: AH00072: makesock: could not bind to address [::]:80 (98)Address already in use: AH00072: makesock: could not bind to address [::]:80

Solution:

Check any other web servers are running…. Like Tomcat, Nginx, if they are using same sockets, apache2 will not run and produce above error.

Please remove, if not necessary…..

$ sudo apt-get remove nginx nginx-common # Removes all but config files

$ sudo apt-get purge nginx nginx-common # Removes everything.

$ sudo apt-get autoremove  #After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.

$ sudo systemctl enable apache2.service

$ sudo systemctl start apache2.service

$ sudo systemctl status apache2.service

apache2.service – LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since Sun 2017-02-19 12:58:55 IST; 7h ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/apache2.service
           ├─ 1417 /usr/sbin/apache2 -k start
           ├─ 1431 /usr/sbin/apache2 -k start
           ├─ 1432 /usr/sbin/apache2 -k start
           ├─ 1433 /usr/sbin/apache2 -k start
           ├─ 1434 /usr/sbin/apache2 -k start
           ├─ 1435 /usr/sbin/apache2 -k start
           ├─27148 /usr/sbin/apache2 -k start
           ├─27163 /usr/sbin/apache2 -k start
           ├─27164 /usr/sbin/apache2 -k start
           ├─27166 /usr/sbin/apache2 -k start
           └─27167 /usr/sbin/apache2 -k start

Feb 19 12:58:48 ubuntu systemd[1]: Starting LSB: Apache2 web server…
Feb 19 12:58:48 ubuntu apache2[1280]:  * Starting Apache httpd web server apache
Feb 19 12:58:55 ubuntu apache2[1280]:  *
Feb 19 12:58:55 ubuntu systemd[1]: Started LSB: Apache2 web server.

Now Apache2 server enabled and started without producing any errors.

 

How to install phpMyAdmin in Ubuntu 16.04 LTS

What is phpMyAdmin ?

         phpMyAdmin is PHP application which acts as interpreter between your application and MySQL in a secure way by allowing us to manipulate the database and it’s structures and even allow to parse and execute the structured queries 

How to install ….?

Please follow below commands to install phpMyAdmin 

$ sudo  apt-get update 

$ sudo apt-get install phpMyAdmin php-mbstring php-gettext

(It will prompts you to select web server, you can select apache2, dbconfig-common to be YES, finally you’ll be prompted for MySQL database password and confirm the same by once again )

  • Configuration files will be added into /etc/apache2/config-enabled directory 

$ sudo phpenmod mcrypt

$ sudo phpenmod mbstring

Finally you’ll be needed restart web server 

$ sudo systemctl restart apache2.service

$ sudo systemctl status apache2.service

Now, you can access the web interface through browser

https://local host/phpMyAdmin

or

https://<ip-address>/phpMyAdmin 

You can log into interface using MySQL login and password

How to break root password…

How to break root password in Ubuntu.

$ su root
Password:
Authentication error

Reboot the system….

When GRUB Loader loads, Press

E

Next you’ll find line where starts with linux, append

rw init=/bin/bash

Ctrl + X or F10 reboot the system,

terminal mode enabled with root user

#passwd root
Changing Unix password:
Re-enter Unix password:

#exit