Sabtu, 28 Januari 2017

How To Install Lxd Container Hypervisor On Ubuntu 16.04 Lts Server

LXD Container:-
LXD is a lightweight opened upward source hypervisor, It allows yous to exercise multiple Container on a unmarried machine or Virtual machine also. Where yous tin run multiple application, services without extra toll And without modifying heart server application package. 

i.e. yous are working inwards a hosting provider or Software evolution company, Where yous demand multiple version of  PHP, MySQL too Apache etc.. but yous don't desire to modify existing installation because it tin interrupt electrical flow running application. For such requirement, yous tin exercise LXD container.

 LXD System requirement:
 One working PC amongst Ubuntu 16.04 LTS

Required Software packages:
1- LXD
2- zfsutils-linux
3- bridge-utils 


Step-1: Install LXD
root@Server16: # apt install lxd

Step-2: Install zfsutils-Linux
ZFSUtils-Linux is required to exercise ZFS file organization to shop LXD Container, for ZFS file organization nosotros tin exercise the same region or tin exercise simply about other HDD.

Use ascendance below to Install Zfsutils-linux
root@Server16: # apt install zfsutils-linux


Step-3:  Install bridge-utils
we required this packet to setup network brace interface hence that container's interface tin become IP too tin communicate amongst Public network.

Use ascendance below to install this package.
root@Server16: # apt install bridge-utils

Step-4: Create Bridge network interface.
 Modify your network Interface too it should hold off similar below.

Change your Primary network interface to Manual too bind it amongst brace network.


# This file describes the network interfaces available on your organization # too how to activate them. For to a greater extent than information, come across interfaces(5).  source /etc/network/interfaces.d/*  # The loopback network interface auto lo iface lo inet loopback  # The main network interface #auto enp0s3 iface enp0s3 inet manual # Bridge Network Interface auto br0 iface br0 inet dhcp         bridge-ports enp0s3         bridge-ifaces enp0s3 # Secondary Network Interface auto enp0s8 iface enp0s8 inet dhcp 

Save too Exit from the file.

Step-5: Restart your br0 network interface 
root@Server16: # ifdown enp0s3 && ifup enp0s3 && ifup br0

Please Note: - If yous don't come across respond from brace interface, Please restart your server once.

Check your network interface too IP address condition using ascendance below.
root@Server16: # ifconfig br0       Link encap:Ethernet  HWaddr 08:00:27:ab:3c:75           inet addr:192.168.28.120  Bcast:192.168.28.255  Mask:255.255.255.0           inet6 addr: fe80::a00:27ff:feab:3c75/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:337 errors:0 dropped:0 overruns:0 frame:0           TX packets:141 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:30299 (30.2 KB)  TX bytes:17098 (17.0 KB)  enp0s3    Link encap:Ethernet  HWaddr 08:00:27:ab:3c:75           inet6 addr: fe80::a00:27ff:feab:3c75/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:398 errors:0 dropped:0 overruns:0 frame:0           TX packets:149 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:40161 (40.1 KB)  TX bytes:17866 (17.8 KB)  enp0s8    Link encap:Ethernet  HWaddr 08:00:27:9f:86:47           inet addr:10.0.2.5  Bcast:10.0.2.255  Mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe9f:8647/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:7 errors:0 dropped:0 overruns:0 frame:0           TX packets:15 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:1988 (1.9 KB)  TX bytes:1720 (1.7 KB)  lo        Link encap:Local Loopback           inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:80 errors:0 dropped:0 overruns:0 frame:0           TX packets:80 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1           RX bytes:5920 (5.9 KB)  TX bytes:5920 (5.9 KB)  root@Server16: # 

Step-6: Complete LXD configuration -
During the LXD configuration wizard  It volition inquire to configure brace interface, Select No when it inquire for auto too lead no to give brace interface manually.

root@Server16: # lxd init Name of the storage backend to exercise (dir or zfs) [default=zfs]: zfs Create a novel ZFS puddle (yes/no) [default=yes]? yes Name of the novel ZFS puddle [default=lxd]: zfs-pool Would yous similar to exercise an existing block device (yes/no) [default=no]? no Size inwards GB of the novel loop device (1GB minimum) [default=15]: 10 Would yous similar LXD to last available over the network (yes/no) [default=no]? no Do yous desire to configure the LXD brace (yes/no) [default=yes]? yes Warning: Stopping lxd.service, but it tin notwithstanding last activated by:   lxd.socket LXD has been successfully configured. root@Server16: # 

Configuration exercise has been completed successfully.


Step-7: Create your showtime Container using the command below.
root@Server16: # lxc launch ubuntu:xenial C1 Creating C1 Starting C1 root@Server16: # 
 
Your showtime container is ready, let's cheque container condition using ascendance bellow.
 
root@Server16: # lxc listing +------+---------+-----------------------+------+------------+-----------+ | NAME |  STATE  |         IPV4          | IPV6 |    TYPE    | SNAPSHOTS | +------+---------+-----------------------+------+------------+-----------+ | C1   | RUNNING | 192.168.28.121 (eth0) |      | PERSISTENT | 0         | +------+---------+-----------------------+------+------------+-----------+ root@Server16: # 


!!! Congrats, You bring successfully configured LDX hypervisor !!!


**Some other useful ascendance to operate amongst LXD**

1- Command  login to LXD container:
root@Server16: # lxc exec C1 /bin/bash root@C1: # 

2- By default you can't login to container using password from a remote PC because 
"PasswordAuthentication  no" not allowed from sshd_conf file
Let's modify this file to access via ssh from remote pc.
 
root@C1: # vi /etc/ssh/sshd_config
And modify passwordaAthentication file similar below.

# To enable empty passwords, alter to yeah (NOT RECOMMENDED) PermitEmptyPasswords no  # Change to yeah to enable challenge-response passwords (beware issues amongst # simply about PAM modules too threads) ChallengeResponseAuthentication no  # Change to no to disable tunnelled clear text passwords PasswordAuthentication yes  # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yeah #KerberosTicketCleanup yeah  

Save file too restart ssh service.
root@C1: # /etc/init.d/ssh restart [ ok ] Restarting ssh (via systemctl): ssh.service.  










Sumber https://linuxhowtoguide.blogspot.com/

Selasa, 29 November 2016

How To Monitor Windows Auto Inwards Nagios Using Nsclient++ Agent

What is NSClient++ :-

NSClient++ a elementary withal powerful in addition to flexible monitoring daemon. It was built for Nagios/Icinga/Naemon, simply zippo inwards the daemon is Nagios/Icinga specific in addition to it tin flame in addition to is used inwards many other scenarios where yous desire to receive/distribute banking concern check metrics. It is alone possible to utilisation it stand upwards lone besides equally the kernel monitoring organization though that is non recommended equally it is rather limited.

How to Install NSClient++ :-

Download NSClient++ from below mentioned link :

Installation Steps :-
Run Downloaded File NSClient++ 










The installation has been finished Successfully.


Nagios Core Side Configuration :-

We request login to Nagios kernel server using putty.
Step 1:- 
 Create Influenza A virus subtype H5N1 fundamental directory to proceed all the Windows.cfg file using below command.
root@WPT: # mkdir /usr/local/nagios/etc/windows
Now Copy Windows template amongst the hostname nosotros are going to add. In my illustration I k adding Host ISHWS69. Use below ascendancy to Copy template.
root@WPT: # cp /usr/local/nagios/etc/objects/windows.cfg /usr/local/nagios/etc/windows/ishws69.cfg

Step 2:- 
Now brand highlighted changes into the .cfg file equally follow:
root@WPT: # vi /usr/local/nagios/etc/windows/ishws69.cfg

############################################################################### # WINDOWS.CFG - SAMPLE CONFIG FILE FOR MONITORING Influenza A virus subtype H5N1 WINDOWS MACHINE # # # NOTES: This config file assumes that yous are using the sample configuration #  files that larn installed amongst the Nagios quickstart guide. # ###############################################################################     ############################################################################### ############################################################################### # # HOST DEFINITIONS # ############################################################################### ###############################################################################  # Define a host for the Windows machine we'll live on monitoring # Change the host_name, alias, in addition to address to fit your province of affairs  define host{  utilisation  windows-server ; Inherit default values from a template  host_name ishws69  ; The shout out we're giving to this host  alias  My Windows Server ; Influenza A virus subtype H5N1 longer shout out associated amongst the host  address  10.0.1.107 ; IP address of the host  }     ############################################################################### ############################################################################### # # HOST GROUP DEFINITIONS # ############################################################################### ###############################################################################   # Define a hostgroup for Windows machines # All hosts that utilisation the windows-server template volition automatically live on a fellow member of this grouping  define hostgroup{  hostgroup_name windows-servers ; The shout out of the hostgroup  alias  Windows Servers ; Long shout out of the grouping  }     ############################################################################### ############################################################################### # # SERVICE DEFINITIONS # ############################################################################### ###############################################################################   # Create a service for monitoring the version of NSCLient++ that is installed # Change the host_name to gibe the shout out of the host yous defined inwards a higher house  define service{  utilisation   generic-service  host_name  ishws69  service_description NSClient++ Version  check_command  check_nt!CLIENTVERSION  }    # Create a service for monitoring the uptime of the server # Change the host_name to gibe the shout out of the host yous defined inwards a higher house  define service{  utilisation   generic-service  host_name  ishws69  service_description Uptime  check_command  check_nt!UPTIME  }    # Create a service for monitoring CPU charge # Change the host_name to gibe the shout out of the host yous defined inwards a higher house  define service{  utilisation   generic-service  host_name  ishws69  service_description CPU Load  check_command  check_nt!CPULOAD!-l 5,80,90  }    # Create a service for monitoring retentiveness usage # Change the host_name to gibe the shout out of the host yous defined inwards a higher house  define service{  utilisation   generic-service  host_name  ishws69  service_description Memory Usage  check_command  check_nt!MEMUSE!-w eighty -c ninety  }    # Create a service for monitoring C:\ disk usage # Change the host_name to gibe the shout out of the host yous defined inwards a higher house  define service{  utilisation   generic-service  host_name  ishws69  service_description C:\ Drive Space  check_command  check_nt!USEDDISKSPACE!-l c -w eighty -c ninety  }    # Create a service for monitoring the W3SVC service # Change the host_name to gibe the shout out of the host yous defined inwards a higher house  define service{  utilisation   generic-service  host_name  ishws69  service_description W3SVC  check_command  check_nt!SERVICESTATE!-d SHOWALL -l W3SVC  }   

Save in addition to Exit from the file.
Step 3:- Add ishws69.cfg file path into nagios.cfg file then that Nagios Core tin flame start reading this file.

Open Nagios.cfg configuration file using below command.
root@WPT: # vi /usr/local/nagios/etc/nagios.cfg
Now add together the highlighted line into conf file.
############################################################################## # # NAGIOS.CFG - Sample Main Config File for Nagios 4.2.3 # # Read the documentation for to a greater extent than information on this configuration # file.  I've provided to a greater extent than or less comments here, simply things may non live on then # clear without farther explanation. # # ##############################################################################   # LOG FILE # This is the primary log file where service in addition to host events are logged # for historical purposes.  This should live on the outset alternative specified # inwards the config file!!!  log_file=/usr/local/nagios/var/nagios.log    # OBJECT CONFIGURATION FILE(S) # These are the object configuration files inwards which yous define hosts, # host groups, contacts, contact groups, services, etc. # You tin flame divide your object definitions across several config files # if yous wishing (as shown below), or proceed them all inwards a unmarried config file.  # You tin flame specify private object config files equally shown below: cfg_file=/usr/local/nagios/etc/objects/commands.cfg cfg_file=/usr/local/nagios/etc/objects/contacts.cfg cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg cfg_file=/usr/local/nagios/etc/objects/templates.cfg  # Definitions for monitoring the local (Linux) host cfg_file=/usr/local/nagios/etc/objects/localhost.cfg  # Definitions for monitoring a Windows machine #cfg_file=/usr/local/nagios/etc/objects/windows.cfg cfg_file=/usr/local/nagios/etc/windows/ishws69.cfg # Definitions for monitoring a router/switch #cfg_file=/usr/local/nagios/etc/objects/switch.cfg  # Definitions for monitoring a network printer #cfg_file=/usr/local/nagios/etc/objects/printer.cfg  
Save in addition to Exit from the file.
Step 4:- Check Nagios Core configuration file for whatever error. Using below command.
root@WPT: # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  Nagios Core 4.2.3 Copyright (c) 2009-present Nagios Core Development Team in addition to Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 11-21-2016 License: GPL  Website: https://www.nagios.org Reading configuration data...    Read primary config file okay...    Read object config files okay...  Running pre-flight banking concern check on configuration data...  Checking objects...         Checked 8 services.         Checked 1 hosts.         Checked 1 host groups.         Checked 0 service groups.         Checked 1 contacts.         Checked 1 contact groups.         Checked 24 commands.         Checked v fourth dimension periods.         Checked 0 host escalations.         Checked 0 service escalations. Checking for circular paths...         Checked 1 hosts         Checked 0 service dependencies         Checked 0 host dependencies         Checked v timeperiods Checking global effect handlers... Checking obsessive compulsive processor commands... Checking misc settings...  Total Warnings: 0 Total Errors:   0
Step 5:- Restart Nagios Core service 

root@WPT: # /etc/init.d/nagios restart [ ok ] Restarting nagios (via systemctl): nagios.service.

Now Access Nagios through Browser in addition to banking concern check newly added host should live on there.












That's All

!!!Cheers!!!


Sumber https://linuxhowtoguide.blogspot.com/

Senin, 28 November 2016

Step Yesteryear Pace Installation Of Nagios4.X Meat Ubuntu 16.04

Part ane of Setting upward in addition to configuring Nagios4.x in addition to PNP4Nagios. Part 2 of Setting upward in addition to configuring Nagios4.x in addition to PNP4Nagios.  Part three of enable E-mail notification Nagios4.x in addition to PNP4Nagios 

What Is Nagios Core :-

Nagios Core is an Open Source organisation in addition to network monitoring application. It watches hosts in addition to services that you lot specify, alerting you lot when things teach bad in addition to when they teach better.


System Requirments :- 

1-  Linux machine (In my representative I am using Ubuntu 16.04)

2-  Apache, PHP amongst gd in addition to cgi.

Prerequisites :-
Use below ascendancy to install prerequisites

root@WPT: # apt-get install wget build-essential apache2 php apache2-mod-php7.0 php7.0-xml php-gd libgd-dev unzip
Nagios Installation :-

Step ane :- Create Nagios user in addition to group:
root@WPT: # useradd nagios
root@WPT: # groupadd nagcmd
root@WPT: # usermod -a -G nagcmd nagios 
root@WPT: # usermod -a -G nagios,nagcmd www-data

Step 2- Use below ascendancy to download Nagios server in addition to Plugins

root@WPT: # wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.3.tar.gz
root@WPT: # wget http://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz

Step three :- Nagios Core Extract in addition to Installation :

Use below ascendancy to extract Nagios core :
root@WPT: # tar -xvf nagios-4.2.3.tar.gz
Use below ascendancy to extract Nagios Plugins
root@WPT: # tar -xvf nagios-plugins-2.1.2.tar.gz

Now Change dir to extract Nagios using below command.
root@WPT: # cd nagios-4.2.3/

Now role below ascendancy to configure Nagios core:
root@WPT: /nagios-4.2.3#./configure --with-command-group=nagcmd --with-httpd-conf=/etc/apache2/

Use below ascendancy to brand in addition to install 
root@WPT: /nagios-4.2.3#make all

root@WPT: /nagios-4.2.3#make install
root@WPT: /nagios-4.2.3#make install-init
root@WPT: /nagios-4.2.3#make install-config
root@WPT: /nagios-4.2.3#make install-commandmode
root@WPT: /nagios-4.2.3#make install-webconf

Use below ascendancy to re-create eventhandlers to /usr/local/nagios/libexec/

root@WPT: /nagios-4.2.3#cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/

Change Ownership to nagios user
root@WPT: /nagios-4.2.3# chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
Check Nagios configuration using below command.
root@WPT: /nagios-4.2.3# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  Nagios Core 4.2.3 Copyright (c) 2009-present Nagios Core Development Team in addition to Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 11-21-2016 License: GPL  Website: https://www.nagios.org Reading configuration data...    Read mind config file okay...    Read object config files okay...  Running pre-flight banking company tally on configuration data...  Checking objects...         Checked 8 services.         Checked ane hosts.         Checked ane host groups.         Checked 0 service groups.         Checked ane contacts.         Checked ane contact groups.         Checked 24 commands.         Checked v fourth dimension periods.         Checked 0 host escalations.         Checked 0 service escalations. Checking for circular paths...         Checked ane hosts         Checked 0 service dependencies         Checked 0 host dependencies         Checked v timeperiods Checking global number handlers... Checking obsessive compulsive processor commands... Checking misc settings...  Total Warnings: 0 Total Errors:   0 

Now re-create Nagios Apache config file to /etc/apache2/site-available path
root@WPT: /nagios-4.2.3# cp /etc/apache2/nagios.conf /etc/apache2/sites-available/
Let's enable site using below command
root@WPT: /nagios-4.2.3# a2ensite nagios.conf

Enable apache module using below command
root@WPT: /nagios-4.2.3#  a2enmod rewrite cgi 

Now Create nagiosadmin user in addition to password to login using spider web access
root@WPT: /nagios-4.2.3# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin New password: ********* Re-type novel password: ******** Adding password for user nagiosadmin root@WPT: /nagios-4.2.3# 



Step iv :- Install Nagios Plugins :
root@WPT: # tar -xvf nagios-plugins-2.1.2.tar.gz
Change Nagios Plugins dir using below command
root@WPT: # cd nagios-plugins-2.1.2/
Use below ascendancy to configure in addition to install plugins:
root@WPT: # ./configure --with-nagios-user=nagios --with-nagios-group=nagios 
root@WPT: # make
root@WPT: # brand install

Step 5:- Install NRPE Agent
root@WPT: /nagios-plugins-2.1.2#  apt install nagios-nrpe-server
Finally, Now Start Nagios Server service 


root@WPT: /nagios-4.2.3# systemctl foremost nagios
Step 6:-  Start NRPE Agent in addition to Nagios Core service

root@WPT: # /etc/init.d/nagios restart [ ok ] Restarting nagios (via systemctl): nagios.service.
root@WPT: # /etc/init.d/nagios-nrpe-server restart [ ok ] Restarting nagios-nrpe-server (via systemctl): nagios-nrpe-server.service.

Open browser in addition to hit Nagios_URL


Congratulations Nagios Core has been setup successfully.


Sumber https://linuxhowtoguide.blogspot.com/

Jumat, 21 Oktober 2016

Step Yesteryear Stride Creating Svn Repository Centos 7.X

This blog, How to practise SVN repository With Active Directory Authentication CentOS 7.X

What is Apache Subversion :-

Apache Subversion, which is ordinarily referred to inwards its abbreviated degree every bit SVN, (named afterwards the command scream SVN) is a pop software versioning in addition to revision command arrangement which is distributed every bit a gratuitous software nether the Apache License. Mainly used past times developers to keep acquaint in addition to historic file versions similar documentation, source code, in addition to spider web pages, it primarily aims to survive a compatible successor to the extensively used CVS (Concurrent Versions System). As a thing of fact, the Subversion has been widely used past times the gratuitous software community. This tutorial explains how to install in addition to purpose SVN on CentOS 7.


Step:1 Creating SVN Repository

Use below mentioned command to practise SVN repository
[root@svn  ]# svnadmin practise /svndata/testrepo

Where 
svnadmin create =  Command 
/svndata               =   is Perent SVN information folder where nosotros volition practise all the repository
/testrepo              =   is repository name

Step:2 Change Repository Ownership

Now nosotros take away to hand permission to user Apache thus he tin hand the axe write into SVN Repository.
Use below command to brand Owner Apache User.
[root@svn  ]# chown -R apache:apache /svndata/testrepo/

Step:3 Create Repository Configuration File:

Now nosotros take away to practise Repository config file inwards Apache thus it tin hand the axe survive accessed over the network.

Create testrepo.conf file to path /etc/httpd/conf.d/ using command below.
[root@svn  ]# vi /etc/httpd/conf.d/testrepo.conf
Now append below content into file.
<location /testrepo> DAV svn SVNPath /svndata/testrepo  Order deny,allow   Deny from all   Allow from 10.0.0.0/24   Allow from 10.0.1.0/24    AuthType Basic    AuthName "SVN Auth"   AuthBasicProvider "ldap"   AuthLDAPURL ldap://BMT-DC-01.ISHIR.LOCAL:3268/DC=ISHIR,DC=LOCAL?sAMAccountName?sub?(objectClass=user)   AuthLDAPBindDN       svnauth@ISHIR.LOCAL   AuthLDAPBindPassword *********   authzldapauthoritative Off  AuthzSVNAccessFile /etc/svn/testrepo   require valid-user </Location> 

Note:- Please modify the Repository scream instead of testrepo if yous are using different name.

Save in addition to Exit from File.

Step:4 Create Access file.

We take away to practise auth file, Where nosotros tin hand the axe assign user access for the specific repository using below command.
[root@svn  ]# vi /etc/svn/testrepo

Now add together the user whom yous desire to hand access on this repo.
[/] asingh = rw 
Save in addition to overstep from file.

Note:- Please add together Active Directory Login user in addition to proceed file scream that yous accept inwards Configuration file i.e. (AuthzSVNAccessFile /etc/svn/testrepo)

Step:5 Import Trunk, Tag in addition to Branch :

Let's import trunk, tag in addition to branches into testrepo using below command.

[root@svn  ]# svn import /home/amar/ file:///svndata/testrepo/ -m "initial messege" Adding         /home/amar/tag Adding         /home/amar/trunk Adding         /home/amar/branches  Committed revision 1. [root@svn  ]#
Note:- Please modify repository scream instead of testrepo


Step:6 Restart Apache in addition to endeavor to browse the URL.


[root@svn  ]# systemctl restart httpd

Now browse the URL:



That's ALL
!!!! Cheers !!!!


Sumber https://linuxhowtoguide.blogspot.com/

Rabu, 28 September 2016

How To Install Subversion On Centos 7.X


This is how to blog, Install & Configure Apache Subversion (SVN) on CentOS 7.


What is Apache Subversion :-

Apache Subversion, which is unremarkably referred to inwards its abbreviated variety out equally SVN, (named subsequently the command yell SVN) is a pop software versioning in addition to revision command organisation which is distributed equally a costless software nether the Apache License. Mainly used past times developers to keep introduce in addition to historic file versions similar documentation, source code, in addition to spider web pages, it primarily aims to travel a compatible successor to the extensively used CVS (Concurrent Versions System). As a affair of fact, the Subversion has been widely used past times the costless software community. This tutorial explains how to install in addition to travel SVN on CentOS 7.

Step:1 Install SVN & Apache Packages :

SVN & Apache (HTTPD) packet are available inwards the default CentOS vii repository. Use below yum command to install required packages :
[root@SVN  ]# yum install httpd subversion mod_dav_svn mod_ldap

Step:2 Edit the configuration file of Apache Subversion

[root@svn  ]# vi /etc/httpd/conf.modules.d/10-subversion.conf 
Make certain below mentioned trace of piece of job are uncomment inwards the config file (/etc/httpd/conf.modules.d/10-subversion.conf).

LoadModule dav_svn_module     modules/mod_dav_svn.so LoadModule authz_svn_module   modules/mod_authz_svn.so LoadModule dontdothat_module  modules/mod_dontdothat.so 

Step:3 Start & enable the apache (httpd) service:

[root@svn  ]# systemctl starting fourth dimension httpd 
[root@svn  ]# systemctl enable httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. 

Step:4 Allow httpd port inwards firewall:

 Add port fourscore using below command
[root@svn  ]# firewall-cmd --zone=public --permanent --add-port=80/tcp success 
Reload firewall config using below command
[root@svn  ]# firewall-cmd --reload success 
Check allowed port using below command
[root@svn  ]# firewall-cmd --zone=public --permanent --list-port 80/tcp

Step:5 Create & Configure SVN Repository :

First Create a Directory where you lot desire to exercise all the repositories.
[root@svn  ]# mkdir /svndata
Now exercise SVN repository using below command.
[root@svn  ]# svnadmin exercise /svndata/testrepo
Now Change the permission in addition to brand possessor to Apache using below command
[root@svn  ]# chown -R apache:apache /svndata/testrepo/ 

Step:6 Create repository configuration file:

 Now, We postulate to exercise a config file for the testrepo so that nosotros tin access it through Apache.

Create testrepo.conf file to path /etc/httpd/conf.d/
[root@svn  ]# vi /etc/httpd/conf.d/testrepo.conf
Now append below mentioned trace of piece of job into file.
<location /testrepo> DAV svn SVNPath /svndata/testrepo  Order deny,allow   Deny from all   Allow from 10.0.0.0/24   Allow from 10.0.1.0/24    AuthType Basic    AuthName "SVN Auth"   AuthBasicProvider "ldap"   AuthLDAPURL ldap://BMT-DC-01.ISHIR.LOCAL:3268/DC=ISHIR,DC=LOCAL?sAMAccountName?sub?(objectClass=user)   AuthLDAPBindDN       svnauth@ISHIR.LOCAL   AuthLDAPBindPassword *********   authzldapauthoritative Off  AuthzSVNAccessFile /etc/svn/testrepo   require valid-user </Location>  
Save in addition to buy the farm from file.

Step:7 Create User access file.

We postulate to exercise auth file, Where nosotros tin assign user access for the specific repository using below command.
[root@svn  ]# vi /etc/svn/testrepo
Now add together the user whom you lot desire to plough over access on this repo.
[/] asingh = rw 
Save in addition to buy the farm from file.

Step:8 Restart Apache in addition to endeavor to browse the URL.


[root@svn  ]# systemctl restart httpd 
Now browse the URL:


Step:9 Import Trunk, Tag in addition to Branch :

First, exercise a directory where nosotros volition exercise trunk, tag in addition to branches then that inwards futurity nosotros tin exactly import from here.
[root@svn  ]# mkdir /home/amar [root@svn  ]# cd /home/amar/ [root@svn amar]# mkdir body branches tag 

Let's import trunk, tag in addition to branches into testrepo using below command.

[root@svn  ]# svn import /home/amar/ file:///svndata/testrepo/ -m "initial messege" Adding         /home/amar/tag Adding         /home/amar/trunk Adding         /home/amar/branches  Committed revision 1. [root@svn  ]# 

Step:10 Restart Apache in addition to depository fiscal establishment fit URL:


[root@svn  ]# systemctl restart httpd

Now browse the URL



That's All 



!!!!! Cheers !!!!!!











Sumber https://linuxhowtoguide.blogspot.com/