Posts

Setup MySQL on Ubuntu Droplet getting error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

sudo /etc/init.d/mysql stop Now start up MySQL in safe mode, so you'll skip the privileges table: sudo mysqld_safe --skip-grant-tables & Login with root: mysql -uroot And assign the DB that needs to be used: use mysql; Now all you have to do is reset your root password of the MySQL user and restart the MySQL service: update user set password=PASSWORD("YOURPASSWORDHERE") where User='root'; flush privileges; quit and restart MySQL: quit sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql start Now your root password should be working with the one you just set, check it with: mysql -u root -p

Configure Telnet & SSH on Router for Remote access.

To configure Telnet we have to do some steps... Step1- #line vty 0 4 Step2- #password mypassword Step3- #login local To configure SSH on Router we have to do some extra task.. Step1- # ip domain-name <mydomainname> Step2-# crypto key generate rsa Step3-# ip ssh version 2       ------------------------------------------- (No required) Step4# username <myusername> secret <mypassword> Step5-# line vty 0 15 Step6-# transport input ssh Step7-#login local

Install Node,Angular2 and Sublime 3

Help https://www.npmjs.com/package/angular-cli#installation Install Node and Angular-cli and @Angular/cli Globally- npm install -g @angular/cli Locally -npm install -save --dev @angular/cli or Globally -npm install -g angular-cli  Locally- npm install -save --dev angular-cli Requirement Node https://nodejs.org/dist/v8.4.0/node-v8.4.0-x64.msi https://nodejs.org/dist/v6.11.2/node-v6.11.2-x64.msi https://nodejs.org/dist/v8.4.0/node-v8.4.0-x86.msi Install  angular-cli  globally:  npm install -g angular-cli Install  angular-cli  in your project:  npm install --save-dev  angular-cli Upgrade to the latest CLI globally: npm uninstall -g angular-cli npm uninstall -g @angular/cli npm cache clean  npm install -g angular-cli@latest This should get a working version. If you tried this and it does not work, please submit your package.json as that will probably contain something that gets in the way from this working correct...

Setup DHCP Server on Linux

Image
How to configure dhcp server in Linux DHCP, or  Dynamic Host Configuration Protocol,  allows an administrator to configure network settings for all clients on a central server. The DHCP clients request an IP address and other network settings from the  DHCP server  on the network. The  DHCP server  in turn leases the client an IP address within a given range or leases the client an IP address based on the MAC address of the client's network interface card (NIC). The information includes its IP address, along with the network's name server, gateway, and proxy addresses,including the netmask. Nothing has to be configured manually on the local system, except to specify the  DHCP server  it should get its network configuration from. If an IP address is assigned according to the MAC address of the client's NIC, the same IP address can be leased to the client every time the client requests one. DHCP makes network administration easier an...

Use Your Linux Computer As a Router

Image
How to use Linux as router In this article I will show you that how can you use Linux as a router. Routers are the devices those are used to connect two different networks. Routers are very costly devices. Linux could be a cost effective solution of routing in a small company. Exam question Your system is going use as a router for 192.168.0.0/24 and 192.168.1.0/24. Enable the IP forwarding. Linux as a Router In this practical we are using three computers. One Linux system will be use for routing and reset two will remain in two different networks. First we will configure the system which is going to play the role of router. How to create virtual LAN card Configure server system You need two LAN card for routing between two networks or you can create virtual LAN card instead of deploying them physically. To create virtual Ethernet card change directory to  /etc/sysconfig/network-scripts ifcfg-eth0  is the necessary script file for Ethernet 0. Copy...

Creat Backup of MYSQL (Ubuntu 14.04)

                ----------------------------------------------------------------------------                 Bakup/Main server 192.168.5.227        |        restore server 13.71.117.185                 ---------------------------------------------------------------------------- (192.168.5.227)                                                               ----------------------------------------------------------------------------           Create Backups of an Entire DBM...

Make autoservice for Tomcat

-------------------------------------------------------------------------------- Step 1 -------------------------------------------------------------------------------- Create file in this location /etc/init.d/tomcat2 with following instructions and past below lines... #nano /etc/init.d/tomcat2 #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 #Should be your java path location.... JAVA_HOME=/usr/lib/jvm/jre-openjdk export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH #Should be your tomcat location CATALINA_HOME=/opt/tomcat2 case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0

How to disable copy past function in Windows OS

-------------------------------------------------------------------------- Step 1 -------------------------------------------------------------------------- Diabel Copy_Past and Drive Redirection Navigate to: gpedit \ Computer Configuration \ Administrative Templates \ Windows Components \ Remote Desktop Services \ Remote Desktop Session Hosts \ Device and Resource Redirection \ Do not allow clipboard redirection And Enablee it... Navigate to: gpedit \ Computer Configuration \ Administrative Templates \ Windows Components \ Remote Desktop Services \ Remote Desktop Session Hosts \ Device and Resource Redirection \Drive redirection And Enable it.. -------------------------------------------------------------------------- Step 2 -------------------------------------------------------------------------- Make firewall Outbond policy for user dissalowed to access other network.... Goto ~ Run -type ~----firewall.cpl----advance setting----Outbound Rules----Rightclick----new rule----custom----...

Installing Jenkins (Ubuntu 14.04)

  Step 1 — Installing Jenkins The version of Jenkins included with the default Ubuntu packages is often behind the latest available version from the project itself. In order to take advantage of the latest fixes and features, we'll use the project-maintained packages to install Jenkins. First, we'll add the repository key to the system.   #wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -     When the key is added, the system will return OK . Next, we'll append the Debian package repository address to the server's sources.list : #echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list     #sudo apt-get update   Finally, we'll install Jenkins and its dependencies, including Java: #sudo apt-get install jenkins   and now #service jenkings start Goto browser and type http://localhost:8080 you will get jenking asking for password ...

PawwordLess SSH Login (Ubuntu 14.04)

Passwordless Host 192.168.5.72 Accessable from 192.168.5.78 -------------------------------------------------------------------------- Step 1 -------------------------------------------------------------------------- Run the below command which ip/host you want to access without password....in my case 192.168.5.72 root@pc022:/home/arvind# ssh-keygen -t rsa -------------------------------------------------------------------------- Step 2 -------------------------------------------------------------------------- Go to the /etc/ssh/ssh_conf and edit uncomment/edit some lines.... root@pc022:/home/arvind# nano /etc/ssh/sshd_config PubkeyAuthentication yes AuthorizedKeyFile    .ssh/authorized_keys PasswordAuthentication no Restart the SSH server and you’re done. root@pc022:/home/arvind# sudo service ssh restart -------------------------------------------------------------------------- Step 3 -------------------------------------------------------------------------- Run the bel...

Set Jconsole on your tomcat setenv or startup file for monitor java

-------------------------------------------------------------------------- Hello This is Arvind                            -------------------------------------------------------------------------- Here below Setting for access your Jconsole Remotaly -------------------------------------------------------------------------- Go to your /apache-tomcat-8.5.9/bin/ now add below line in catalina.sh or setenv.sh file using below command -------------------------------------------------------------------------- #nano setenv.sh or catalina.sh JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9020 -Dcom.sun.management.jmxremote.local.only=false" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=YourIPAddres"

How to clean your Network history in Ubnutu 14.04

!!! you have to just clean this file. sudo gedit ~/.config/nautilus/servers

To Disallow you Media/Flash/Pendrive (UBuntu 14.04)

To Disallow you Media/Flash/Pendrive !! #sudo root #chmod 000 /media/ here we done,disallow your pendrive/flash media To allow you Media/Flash/Pendrive !! #sudo root #chmod 777 /media/

Set Manually IP Address (Ubuntu 14.04) Desktop env.

#sudo nano /etc/NetworkManager/system-connections/Wired\ connection\ 1 [802-3-ethernet] duplex=full mac-address=00:19:D1:AB:10:FA [connection] id=Wired connection 1 uuid=896c15c0-4542-4443-8153-72d1c1211849 type=802-3-ethernet timestamp=1484646948 [ipv6] method=auto [ipv4] method=manual dns=192.168.5.251;192.168.5.234; address1=192.168.5.78/24,192.168.5.1 #address2=192.168.6.78/24,0.0.0.0 #address3=192.168.7.78/24,0.0.0.0 #end Example dns=192.168.5.251;192.168.5.234;     (Primary_DNS;Secondary_DNS) address1=192.168.5.78/24,192.168.5.1 (IP/Netmask,Gateway) address2=192.168.6.78/24,0.0.0.0    (IP/Netmask,Gateway) address3=192.168.7.78/24,0.0.0.0    (IP/Netmask,Gateway)

To change the owenership of any folder for domain user !!

To change the owenership of any folder for domain user !! here i'm changing owenership of my "lampp" folder... the new owener is google\\user43 #sudo chown -R Google\\user43:root /opt/lampp/ Expl... sudo chown -R google\\user43:root /opt/lampp/ Give full permission of any folder for all #sudo chmod 777 /your folder location/ -R Expl.. sudo chmod 777 /opt/lampp/ -R

How to Install Chrom (Ubuntu 14.04)

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' sudo apt-get update sudo apt-get install google-chrome-stable sudo apt-get install google-chrome-stable uninstall chrom sudo apt-get purge google-chrome-stable $ rm ~/.config/google-chrome/ -rf

Remote Desktop Sharing Dconf Tool in Linux (Ubuntu 14.04)

To install software that allow to remote access your computer desktop of ubuntu 14.04 !!dconf-tools!! Step 1 Install #sudo apt-get install dconf-tools Step 2 Configure Search dconf and in deconf box popup Chose below steps !! org    gnome         desktop                remote-access uncheck all and again check on enable and close.. Step 3 goto terminal and type below command #sudo vino-pereference and set you allow sharing and your security.. To remove the dconf-tools following command is used: #sudo apt-get remove  dconf-tools Following command is used to remove the dconf-tools package along with its dependencies: #sudo apt-get remove --auto-remove dconf-tools #sudo apt-get purge dconf-tools #sudo apt-get purge --auto-remove dconf-tools

How to Install Maven (Ubuntu 14.04)

To install maven #sudo apt-get install maven to check version #mvn -version The Maven configuration files are stored in /etc/maven Where is Maven installed? The command apt-get install the Maven in /usr/share/maven

How to Install NodeJs,Karma, etc

Install nodjs and npm Step 2 #sudo apt-get update #curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - #sudo apt-get install nodejs #sudo apt-get install build-essential (Opt)#sudo ln -s /usr/bin/nodejs /usr/bin/node (Opt)#sudo apt-get install npm Step 2 For installing locally from local user only ! $npm install grunt $npm install grunt-cli $npm install karma $npm install jasmine For install globally from sudo user only ! #sudo npm install -g grunt #sudo npm install -g grunt-cli #sudo npm install -g karma #sudo npm install -g jasmine To uninstall node and npm Step 1 #sudo rm -rf /usr/local/lib/node #sudo rm -rf /usr/local/lib/node_modules Step 2 #sudo apt-get remove nodejs #sudo apt-get remove npm Then go to /etc/apt/sources.list.d and remove any node list if you have. Then do a #sudo apt-get update Check for any .npm or .node folder in your home folder and delete those. If you type it show in any node folder ........... In computer! #which node !!! #sudo apt-get install -y...

How to Install Workbenh on Linux (Ubuntu 14.04)

All_Steps blow !!! Download .deb file of workbench #sudo wget http://dev.mysql.com/get/mysql-apt-config_0.3.5-1ubuntu14.04_all.deb #sudo dpkg -i mysql-apt-config_0.3.5-1ubuntu14.04_all.deb #sudo apt-get update -y #sudo apt-get install mysql-workbench-community -y Work on gui and check mysql-workbench --version To uninstall !! #sudo apt-get remove  mysql-workbench #sudo apt-get remove --auto-remove mysql-workbench-community #sudo apt-get purge mysql-workbench #sudo apt-get purge --auto-remove mysql-workbench

How to Install,Configure and Run lampp In Linux (Ubuntu 14.04)

Note !!! Download XAMPP for ubuntu 14.04 or accroding your OS and Run the following command to make it executable NOte !!! You can skill Step 4 Step 1 Give permission to .run file #sudo chmod +x xampp-linux-x64-5.6.12-0-installer.run Step 2 To Install Xampp.Run the below command  in terminal #sudo ./xampp-linux-x64-5.6.12-0-installer.run After Few seconds a Pop-up Window will open . Install the xampp by clicking Next & Finish buttons when required. Once installaition is done .It will be installed in /opt/lampp directory. Step 3 Now you can start Xampp services using the following command. #sudo /opt/lampp/lampp start/stop/restart and type your user password Now you can set xamp on search box Steps 4 ! Open terminal and login as root user using the root password. $ su root !! Now create xampp-control-panel folder under /usr/local/ #mkdir /usr/local/xampp-control-panel !!! Now create one script file under the xampp-control-panel folder named as xampp-control-panel.sh # vi /usr/l...

How to set Java Path if you want to put your java any directory in linux Computer

NOte !!!  Thursday 12 January 2017 03:36:52 PM IST You have to change you username !!! here above is user6 !!! You have to change your extrated folder location of JAVA !!! here above is /home/user6/software/jdk1.8.0_111 !!! Matarial Need.. Tar/zip file of Java and extract it on below location /home/user6/software/jdk1.8.0_111 Step 1 edite profile #sudo gedit /etc/profile type past bleow lines JAVA_HOME=/home/user6/software/jdk1.8.0_111 JRE_HOME=/home/user6/software/jdk1.8.0_111/jre PATH=$PATH:$JRE_HOME/bin:$JAVA_HOME/bin export JAVA_HOME export JRE_HOME export PATH Step 2 run below command after extrat your java /home/user12/software/ Note = Your java extrated location /home/user64/software/jdk1.8.0_111 Run blow command in sudo mode for say ubuntu where is your java installed/extrated file sudo update-alternatives --install "/usr/bin/java" "java" "/home/user6/software/jdk1.8.0_111/bin/java" 1 sudo update-alternatives --install...

How to join your LInux (Ubuntu 14.04) computer in Domain

1. Assign IP with your local DNS Server 2. Install openssh Server 3. Configure Date / Time / Time Zone 4. Change Hostname 5. Change Hosts file     sudo date --set "09 Apr 2015 15:00:00" 6. sudo apt-get update 7. sudo apt-get upgrade 8. sudo apt-get dist-upgrade 9. wget http://download.beyondtrust.com/PBISO/8.0.1/linux.deb.x64/pbis-open-8.0.1.2029.linux.x86_64.deb.sh 10. sudo bash pbis-open-8.0.1.2029.linux.x86_64.deb.sh     NO     Yes 11. sudo /opt/pbis/bin/domainjoin-cli join allcad.home administrator 12. sudo /opt/pbis/bin/config UserDomainPrefix ALLCAD.HOME 13. sudo /opt/pbis/bin/config AssumeDefaultDomain true 14. sudo /opt/pbis/bin/config LoginShellTemplate /bin/bash 15. sudo /opt/pbis/bin/config HomeDirTemplate %H/%U 16. sudo nano /etc/pam.d/common-session     Replace Line     " session sufficient pam_lsass.so "     TO     " session [success=ok default=...

How to set User in Tomcat

<tomcat-users> <role rolename="manager-script"/> <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user username="admin" password="yourpassword" roles="manager-gui,admin-gui,manager-script"/> </tomcat-users> Conclusion--- We can set proper user for our Manager Role,User Role and Manager Script for Tomcat by editing /tomcat/conf/Tomcatuser.xml and past above line and change your passowrd #Arvind

How to set Worker Properties in Apache2

We have to create new file (workers.properties) inside /etc/apache2/ $sudo nano workers.properties #past below lines # configure jk-status worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true # configure jk-manager worker.list=jk-manager worker.jk-manager.type=status worker.balance1.type=lb # Define 1 real worker using ajp13 worker.list=worker1 #Set properties for worker (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 8009=Current tomcat AJP Port Conclusion ---- By using workers.properties we can manage our particular tomcat with specific website. Example for other Tomcat we have to just put some changes in the same file $sudo nano workers.properties #past below lines # configure jk-status worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true # configure jk-manager worker.list=jk-manager worker.jk-manager.type=status worker.balance1.type=lb # Def...

How to write ProxyPassMatches for Apache Vhost

    ProxyPassMatch ^/manager(.*)$ ajp://localhost:8009/manager/$1     ProxyPassMatch ^/tomcat(.*)$ ajp://localhost:8009/tomcat/$1     ProxyPassMatch ^/host-manager(.*)$ ajp://localhost:8009/host-manager/$1 8009 Is your Ajp Port of Current Tomcat #Arvind Conclusion --- after write this above line inside your apache .conf (Vhost) file your tomcat able to integrate with apache. You can access your tomcat by typing http://localhost/tomcat on your any browser. For Integration of apache2 and Tomcat

How to install and configure ApacheTomcat and Integrate with apache2 on Linux (Ubuntu 14.04)

Installing Tomcat 7 and Apache2 with mod_jk on Ubuntu 14.04 and connect our tomcat with apache....... ------------------------------------------------------------------------- Step1 -------------------------------------------------------------------------  Installing Apache #sudo apt-get install apache2 Test the installation from the browser using http://localhost/ ------------------------------------------------------------------------- Step2 ------------------------------------------------------------------------- Put your tomcat setup in /opt/ Create a test application for tomcat. #cd /opt/tomcat/tomcat1/webapps #sudo mkdir tomcat now past here all your ROOT files. ----------------------------------------------------------------------- Step3 ------------------------------------------------------------------------- Test the installation from the browser using http://localhost:8080/tomcat ----------------------------------------------------------...