Monday, 19 February 2018

HOW TO CONFIGURE JENKINS ON CENTOS 7

Please find below steps :-

JAVA installation : 

Jenkins requires Java 7 Minimum version.

#yum search java |grep openjdk
#yum install java-1.8.0-openjdk* wget -y 

Then check JAVA version 

1) #java -version

Output :-
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

Install RPM For Jenkins

#rpm –import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
#cd /etc/yum.repos.d/
#wget https://pkg.jenkins.io/redhat-stable/jenkins.repo

Install Jenkins:

#yum install jenkins -y

Now We have to enable, start and check the status of Jenkins:

systemctl enable jenkins
systemctl start jenkins
systemctl status jenkins

Thursday, 15 February 2018

How to Install Python 2.7 on centos 6 & 7

Installation steps :-

Check Python version:
1) python -V

update Puthon version:

1) sudo yum update
2) sudo yum install scl-utils
3) sudo yum install centos-release-scl-rh
4) sudo yum install python27
5) sudo scl enable python27 bash

Verify the update:

1) python -V
  Python 2.7.8

After logging out or restarting, you must enable python 2.7:
$ sudo scl enable python27 bash
Enabling Python 2.7 in .bash_profile or .bashrc causes the machine to hang because CentOS 6 relies on Python 2.6 for Yum.

Tuesday, 13 February 2018

How to install NTP in Linux

Tested configuration:-

At server side:-
1) Yum install ntp* -y
2) vim /etc/ntp.conf 
Here on line 8:- restrict default netrap nopeer noquery (From here remove nopeer and noquery)
3) Then restart ntp service

At client side:-

1) Install package chrony* 
2) Yum install system-config-date
3) system-config-date 
a) (Here check mark on syncronize date and time over network)
 b) remove all ntp server
c) add server IP of NTP server

4) Advanced Option 
a) Speed up initial syncronized (OK)
 
5) Then restart services

Trouble shooting:-

1) If after restart of service only time is changing then please check hard ware clock of both machines:- By following 
hwclock --show

If hardware clock is not same then sync there clock after restart NTP service

2) If hardware clock are same but still it is not working then change the BIOS cell of machine. It may be Down thats why it is not able to work with hardware.

Please do configuration and if face any problem then please let me know.

Monday, 29 January 2018

How Break Windows 7,8,8.1,10 Password Using TRK

Please Follow below Steps :-


1. Download TRK iso from the link below:-
http://trinityhome.org/Home/index.php?wpid=112&front_id=12

2. Make USB bootable
3. Plug in USB in Laptop/Desktop having Winsows any version
4. Boot laptop using USB or CD Rom
5. select sdb1 to boot TRK


6. Select Windows password resetting































7. Now select Winpass prompts for username first

































8. enter username "Administrator"

































9. enter 1

10. Select clear Password

11. Reboot

Wednesday, 24 January 2018

Restrict Ftp user to access other directory

Please follow below steps :-

1. # yum update
2. Disable selinux(vi /etc/sysconfig/selinux) for check #sestatus
3.#service iptables stop
4.#useradd akash
5.#passwd akash
#################Now Install Ftp#############################
6.yum install vsftpd -y
7.service vsftpd resart
##################Make directory For user access##################################
8.mkdir /akash1
###############Create file For Chroot_Jail##################
9.  vi /etc/vsftpd/chroot_list (here write the user name and save and exit).
10. vi /etc/vsftpd/vsftpd.conf
Here we add one entry- local_root=/akash1 (You can write here your directory for access via ftp).
and
#chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
and do this than save and exit .
11.service vsftpd restart.

Tuesday, 23 January 2018

How to ssh Without Password

Here we have done send data from one server to another server by using rsync command without password for ssh its also same



    1. Test rsync over ssh (with password):

    rsync -avz -e ssh /home/test/ root@192.168.0.125:/backup/test/

    2. ssh-keygen generates keys.

    $ ssh-keygen

    Enter passphrase (empty for no passphrase):

    3. ssh-copy-id copies public key to remote host

    Use ssh-copy-id, to copy the public key to the remote host.

    ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.125

    4. Perform rsync over ssh without password

    ssh 192.168.0.125

    Perform the rsync again, it should not ask you to enter any password this time.

    rsync -avz -e ssh /home/test/ root@192.168.0.125:/backup/test/

How To Open A Port In CentOS 7 With Firewalld

Open Specific Port Opening a port in firewalld is fairly straightforward, in the below example we allow traffic in from any source IP ad...