Posts

Showing posts with the label Linux

Installing And Configuring SVN Repository on CentOS7.x

Image
1) Download and Install Subversion package: yum install mod_dav_svn subversion 2) Configure subversion : vi /etc/httpd/conf.modules.d/10-subversion.conf 3) Adding new user: htpasswd -cm /etc/svn-auth-users <username> 4)Create and Configure Subversion- Repositiory: 5)Additional step if SELinux is enabled : 6) Firewall Configuration for HTTP & HTTPs: 7) Enable and Start the HTTP: 8) Verify with your browser: NOTE: this is my local network IP. In your case it should be the IP address for your Linux machine in which you are installing. 9) Disable Anonymous:

Git -For beignner (Tutorial) -- Conclusion

Image
Git- Merge your PULL request 1) Click "Merge pull request" 2) Confirm Merge 3) Delete branch, as merge has incorporated the changes. 4) Verify there is no more branches

Git -For beignner (Tutorial) -- Part4

Image
Git- Pull Request 1) Click Pull Request, new page with PULL request 2) Select new branch created 3)Look for the changes done 4) Create new PULL request 5) Give pull request a title and write brief

Git -For beignner (Tutorial) -- Part3

Image
Git Checkout To delete the git branch, can do following : [rprasad@vm hello-world]$ git checkout master Switched to branch 'master' [rprasad@vm hello-world]$ git branch * master   test [rprasad@vm hello-world]$ git branch -D test Deleted branch test (was 86fab07). [rprasad@vm hello-world]$ git branch * master [rprasad@vm hello-world]$ Committing File: [rprasad@vm hello-world]$ git commit README.md [test e8c727b] testing  Committer: RAJESH PRASAD <rprasad@vm.localhost> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly:     git config --global user.name "Your Name"     git config --global user.email you@example.com After doing this, you may fix the identity used for this commit with:     git commit --amend --reset-author  1 file changed, 4 inser...

Criticical BASH vulnerability discovered – update BASH on your CentOS7

[rprasad@vm ~]$ sudo env x='() { :;}; echo vulnerable' bash -c "echo this is a test"         //Run following command to check. If it outputs vulnerable then our bash is vulnerable vulnerable this is a test [rprasad@vm ~]$ sudo su -                                               //Become root [root@vm ~]# yum clean all && yum update bash Loaded plugins: fastestmirror Cleaning repos: base extras updates Cleaning up everything Loaded plugins: fastestmirror base                                                     | 3.6 kB     00:00 extras                                                ...

CentOS7 boot from USB thumbdrive.

Image
Ref. to How to install using USB Using Windows Starting with CentOS 6.5, one can create a bootable USB key simply by installing the ISO file on the key using a program such as  Win32 Disk Imager . This will delete all information already on the key. Downoad: Win32 Disk Imager Install Win32 Disk Imager Transfer the ISO image to USB using above Win32 Disk Imager. Click on "Write" button. Ready to boot and install from your USB key.

Grep using list of words from a file.

You need to use the option  -f : $ grep -f A B The option  -F  does a fixed string search where as  -f  is for specifying a file of patterns. You may want both if the file only contains fixed strings and not regexps. $ grep -Ff A B You may also want the  -w  option for matching whole words only: $ grep -wFf A B Read  man grep  for a description of all the possible arguments and what they do. NOTE: A= file. Searching in file B to see if ANY of the words in file A occur in it.

compare file A from file B, and save the content in file C

while read line; do grep -q $line A.txt || echo $line; done < B.txt >C.txt I have got the above example, its very interesting and helpful as well.  If A  is the file with the first content and B  is the file with the second content.  It prints what is not found in the second file. Can save output using redirection operator.

Query Package pre-installed or not - Ubuntu

rajeshp@ubuntu01:~$ dpkg-query -l |grep apache ii  apache2                             2.4.6-2ubuntu2.2                 amd64        Apache HTTP Server ii  apache2-bin                         2.4.6-2ubuntu2.2                 amd64        Apache HTTP Server (binary files and modules) ii  apache2-data                        2.4.6-2ubuntu2.2                 all          Apache HTTP Server (common files) or, simply use  rajeshp@ubuntu01:~$  dpkg-query -l              //For all the installed packages in current server If you know the package name :- ...

Disabling IPv6 on -Ubuntu

Check IPv6(disabled or enabled), with rajeshp@ubuntu:~$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6 0                           //Enabled Disabled IPv6 with the following lines in /etc/sysctl.conf : - net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 Above, using command line(CLI):- rajeshp@ubuntu:~$ echo "#Disable ipv6" | sudo tee -a /etc/sysctl.conf rajeshp@ubuntu:~$ echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf rajeshp@ubuntu:~$ echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf rajeshp@ubuntu:~$   echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf Reactivate the above configuration by, executing :- rajeshp@ubuntu:~$ sysctl -p rajeshp@ubuntu:~$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6 1                   ...

About :IP static on Ubuntu server 12.4

About :IP static on Ubuntu server 12.4 -------------------------------------------------- rajesh@dns:~$ more /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface #auto lo #iface lo inet loopback # The primary network interface #auto eth0 #iface eth0 inet dhcp auto lo eth0 iface lo inet loopback iface eth0 inet static address 192.168.88.128 netmask 255.255.255.0 gateway 192.168.88.2 dns-search rajesh.com dns-nameservers 8.8.8.8 8.8.4.4 ====================================================================== rajesh@dns:~$ more /etc/hosts 127.0.0.1       localhost 127.0.1.1       dns.kl.rajesh.local     dns 192.168.88.128  dns.kl.rajesh.local     dns rajesh@dns:~$sudo ifup eth0 rajesh@dns:~$sudo ifdown eth0 ===========...

About -- Git :distributed version control

Git In software development , Git / ɡ ɪ t / is a distributed version control and source code management (SCM) system with an emphasis on speed. [ 3 ] Initially designed and developed by Linus Torvalds for Linux kernel development, Git has since been adopted by many other projects. Every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server. Git is free software distributed under the terms of the GNU General Public License version 2. Ref. : https://en.wikipedia.org/wiki/Git_%28software%29 I have few tried to create few test to rewind the skills-set for basic "git" knowledge:- Git: Install : Ubuntu : sudo apt-get install git RHEL/CentOS/Fedora: yum install git Git :User Configuration : #  your name git config --global user.name "Example Name" #  your email-address git config --global user.email "email@gmail.com" # enab...

Updated: RPM package managment - Part 2

[root@RHEL6 ~]# rpm -qa |sort |less            //List all installed packages abrt-2.0.8-15.el6.centos.x86_64 abrt-addon-ccpp-2.0.8-15.el6.centos.x86_64 abrt-addon-kerneloops-2.0.8-15.el6.centos.x86_64 abrt-addon-python-2.0.8-15.el6.centos.x86_64 abrt-cli-2.0.8-15.el6.centos.x86_64 abrt-desktop-2.0.8-15.el6.centos.x86_64 abrt-gui-2.0.8-15.el6.centos.x86_64 abrt-libs-2.0.8-15.el6.centos.x86_64 abrt-tui-2.0.8-15.el6.centos.x86_64 abyssinica-fonts-1.0-5.1.el6.noarch acl-2.2.49-6.el6.x86_64 acpid-1.0.10-2.1.el6.x86_64 aic94xx-firmware-30-2.el6.noarch alsa-lib-1.0.22-3.el6.x86_64 alsa-plugins-pulseaudio-1.0.21-3.el6.x86_64 alsa-utils-1.0.22-5.el6.x86_64 anaconda-13.21.195-1.el6.centos.1.x86_64 anaconda-yum-plugins-1.0-5.1.el6.noarch anthy-9100h-10.1.el6.x86_64 ============================================================= [root@RHEL6 ~]# rpm -qf /etc/host.conf      //Identify the package associated with file setup-2.8.14-20....

Adding new HDD(hard disk) in Linux, detect it without rebooting - Experimented using Vmware

Image
This is explained below :- Im having Vmware 9 with CentOS 6.4 Up-Running. Im adding the hard disk :-   Next> Create a new virtual disk SCSI maximum disk size (GB): 1GB // you can select as per your requirement Additional HDD added:-   select >>OK  Open clone session on SSH : select tail -f /var/log/messages   Keep scanning the host . And, get detected in fdisk as well in /dev/* directory:  echo "- - -" > /sys/class/scsi_host/host0/scan echo "- - -" > /sys/class/scsi_host/host1/scan echo "- - -" > /sys/class/scsi_host/host2/scan As in my case i had host0,host1,host2   When the HDD is detected, in host2:- Remove the Added partition, using the following command:- i.e., # echo 1 > /sys/block/devName/device/delete Example,in our case is "/dev/sdb # echo 1 > /sys/block/sdb/device/delete

Yum - Info & details (Will try to update)

[root@rhel6 ~]# yum version Loaded plugins: fastestmirror, refresh-packagekit, security Installed: 6/x86_64                                                                                                       1113:dcd18119a8b5e5ccbbe42d2162733fe3d5ac6efb Group-Installed: yum                                   ...