Posts

Showing posts from May 28, 2017

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 DBMS Using Copies of the MySQL Data Directory ----------------------------------------------------------------------------                                                          STEP 1                                                   ----------------------------------------------------------------------------                   Stop you mysql by below given commands                                ----------------------------------------------------------------------------           #/etc/init.d/mysql stop              

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  # sudo cat /var/lib/jenk

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 below command on

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/local

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=ignore] pam_lsass.so " 17. sudo nano /usr/share/lightdm/lightdm.conf.d/50

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 --------------------------------------------------------------

How to install and configure Apache2 for Webhosting on Linux (Ubuntu 14.04)

Apache2 Installation and Configuration on Ubunut 14.04 and run two instant website on server. ____________________________________________ Step1 After install Ubunut 14.04 ____________________________________________ Goto Terminal $sudo apt-get update $sudo apt-get install apache2 by default all apache2 file install in /etc/apache2/ And location of where we put our website contain /var/www/ ____________________________________________ Step2 _____________________________________________ Goto /var/www/ and creat a folder name /arvweb and creat a demo file/page under /arv/arv.html   by using below command $sudo mkdir -p /var/www/arv $sudo nano /var/www/arv/arv.html  #(and past below text) <html>   <head>     <title>Welcome to arv.com!</title>   </head>   <body>     <h1>Success!  arvapache.blogspot.com</h1>   </body> </html> ____________________________________________ Step3 ____________________________________________ Now give p