Wednesday, September 7, 2016

install Subversion version control server IN UBUNTU

How to install Subversion version control server (with Apache support)

  • Install Subversion and Apache 2 Module
sudo apt-get install subversion apache2 libapache2-svn
  • Enable Subversion/DAV Apache 2 Module
sudo a2enmod dav_svn
  • Configure Apache 2
sudo nano /etc/apache2/mods-enabled/dav_svn.conf
Edit the file to look something like this:
<strong><Location /svn></strong>
<strong><span>  </span>DAV svn</strong>
<strong><span>  </span>SVNPath /home/svn</strong>
<strong> </strong>
<strong><span>  </span>AuthType Basic</strong>
<strong><span>  </span>AuthName "Subversion Repository"</strong>
<strong><span>  </span>AuthUserFile /etc/apache2/dav_svn.passwd<span style="color: red">-------we have to create</span> </strong>
<strong><span>  </span>Require valid-user</strong>
<strong></Location></strong>
  • Create Subversion Repository
sudo mkdir /home/svn
sudo svnadmin create /home/svn
  • Give Apache 2 Permissions to Repository
sudo chown -R www-data /home/svn
  • Create Repository User
Replace 'username' with your username
sudo htpasswd -cm /etc/apache2/dav_svn.passwd username
Enter password when prompted.
  • Restart Apache 2
sudo /etc/init.d/apache2 restart
  • Working with the new repository
Open a terminal window and paste:
svn checkout <a href="http://username@localhost/svn" title="http://username@localhost/svn">http://username@localhost/svn</a> lucky
You will be prompted to enter the password. Now you have a working copy in the directory 'lucky'. Now lets create a file and commit it.
cd lucky
mousepad Hello.txt
Enter anything you like in the file and click save, Exit.
svn add Hello.txt
Now you added the file but it won't appear in the repository yet, you have to commit it. To commit, its as easy as doing the following:
svn commit
Now check your repository using the web browser at http://localhost/svn/.

Parser Error Message: Could not load type 'ApplicationName.Global' on IIS configuration

The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Reference URL:- http://support.microsoft.com/kb/320268
When you use a virtual directory that points to a remote share to host a Microsoft ASP.NET-based application, you may receive an error message that is similar to one of the following:

To resolve this behavior, grant the FullTrust right to the remote share:
  1. On the Web server, open Administrative Tools, and then double-click Microsoft .NET Framework Configuration.
  2. Expand Runtime Security Policy, expand Machine, and then expand Code Groups.
  3. Right-click All_Code, and then click New.
  4. Select Create a new code group. Give your code group a relevant name, such as the name of the applications share. Click Next.
  5. In the Choose the condition type for this code group list, select URL.
  6. In the URL box, type the path of the share in the following format:
    file:////\\computername\sharename\*
    Note Replace computername with the name of the computer that is hosting the remote share. Replace sharename with the name of the share.
  7. Click Next. On the next page, select Use an existing permission set, and then select FullTrust.
  8. Click Next, and then click Finish.
  9. Restart Microsoft Internet Information Services (IIS) to restart the ASP.NET worker process.
If Microsoft .NET Framework Configuration is not displayed under Administrative Tools, you can install the .NET Framework SDK to add Microsoft .NET Framework Configuration. Alternatively, you can run the following command to make the change:


Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on

BY Using command

C:\WINDOWS\Microsoft.NET\Framework>v2.0.50727\CasPol.exe -m -ag 1 -url "file:////\\noc\data\*" FullTrust -exclusive on

AfterRunning above command we can see the below

Microsoft (R) .NET Framework CasPol 2.0.50727.1433
Copyright (c) Microsoft Corporation.  All rights reserved.

The operation you are performing will alter security policy.
Are you sure you want to perform this operation? (yes/no)
yes
Added union code group with "-url" membership condition to the Machine level.
Success

How to clear out corrupted definitions for a Symantec Endpoint Protection client manually





Subject

How to clear out corrupted definitions for a Symantec Endpoint Protection client manually

Content

Problem


How to fix and rebuild corrupted definitions for a Symantec Endpoint Protection (SEP) client.

Solution



DISCLAIMER:The following instructions are for the Symantec Endpoint Protection product ONLY.
If there are any other Symantec products installed on the system that share the virus definitions please contact Symantec Technical Support.



Instructions for 32-bit Operating Systems:

For Windows 2000/2003/XP
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, typing in smc -stop, and pushing Enter.
    1. Click the Start button and then click Run
    2. Type services.msc and click OK
    3. Right-click Symantec Endpoint Protection and click Stop.
    4. Minimize the Services window

      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\Program Files\Common Files\Symantec Shared\VirusDefs\
      - Delete all files and subfolders
    • Delete the downloaded data in the "C:\Documents and Settings\All Users\Application Data\Symantec\Liveupdate\downloads"

      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button and then click Run
    2. Type regedit and click OK
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection service and click Start.

For Windows Vista/Server 2008/Windows7
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, type in smc -stop, and push Enter
    1. Click the Start button.
    2. In the search bar type services and then press Enter.
      Note: If the User Account Control prompt pops up click Continue.
    3. Right-click Symantec Endpoint Protection and click Stop.

      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
       
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\ProgramData\Symantec\Definitions\VirusDefs\
      - Delete all files and subfolders


      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button
    2. Type regedit and press Enter
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection and click Start.
Instructions for 64-bit Operating Systems:

For Windows 2000/2003/XP
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, type in smc -stop, and push Enter.
    1. Click the Start button and then click Run
    2. Type services.msc and click OK
    3. Right-click Symantec Endpoint Protection and click Stop.
    4. Minimize the Services window

      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\Program Files (x86)\Common Files\Symantec Shared\VirusDefs\
      - Delete all files and subfolders


      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button and then click Run
    2. Type regedit and click OK
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection service and click Start.

For Windows Vista/Server 2008/Windows 7
  • Stop the Symantec Endpoint Protection Services:
  • Click Start, Run, type in smc -stop, and push Enter.
    1. Click the Start button.
    2. In the search bar type services and then press Enter.
      Note: If the User Account Control prompt pops up click Continue.
    3. Right-click Symantec Endpoint Protection and click Stop.
      Note: If you are unable to stop the Symantec Management Client you will need to temporarily disable Tamper Protection. Please see the Technical Information at the bottom of this document for instructions.
  • Delete the data from the Definition folders:
    • Virus Definitions
      C:\ProgramData\Symantec\Definitions\VirusDefs\
      - Delete all files and subfolders


      WARNING: In the next steps you will edit the Windows registry. Back up the registry before you make any changes to it, because incorrect changes to the registry can result in permanent data loss or corrupted files. Modify only the registry values that are specified. For instructions, see How to back up the Windows registry.
  • Delete the data from the registry:
    1. Click the Start button
    2. Type regedit and press Enter
    3. Navigate to:
      HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Symantec\SharedDefs
    4. Delete the following values:
      1. SRTSP
      2. NAVCORP_70
      3. DEFWATCH_10
      4. SepCache3
      5. SepCache2
      6. SepCache1
  • Restart the Symantec Endpoint Protection Services stopped in the previous step, 3.c.
  • Click Start, Run, type in smc -start, and push Enter.
    1. Maximize the Services window.
    2. Right-click Symantec Endpoint Protection and click Start.


References
In some instances, Symantec Technical Support may recommend the use of an unsupported tool that automates the removal of corrupted SEP definitions. For details please see Using the "Rx4DefsSEP" utility at http://www.symantec.com/business/support/index?page=content&id=TECH93036&locale=en_US


Technical Information
How to disable Tamper Protection:
  • Open and log into the Symantec Endpoint Protection Manager console
  • Click the Clients view.
  • Select the appropriate group.
  • Under the Policies tab, in the "Settings" section, click General Settings.
  • Under the Tamper Protection tab, uncheck Protect Symantec security software from being tampered with or shut down.
  • Click OK.


IMPORTANT: Once definitions will be purged, the following popup message will appear:
"Virus definitions are missing on this computer. This computer will remain unprotected until definitions are downloaded from the network. Contact your system administrator for help updating your virus definitions."
This message will keep showing (after every smc -stop/smc -start or session opening), even when Symantec Endpoint Protection will receive/apply new set of definitions, until "Symantec Endpoint Protection" service is restarted. To avoid this, it is possible either:
 - to drop JDB file to update client then restart "Symantec Endpoint Protection" service
 - to use Rx4DefsSEP
 - to use a script which is checking Antivirus/Antispyware definition status and restart "Symantec Endpoint Protection" service if appropriate
NOTE: this behavior is as designed.

   

 


Article URL http://www.symantec.com/docs/TECH103176






Outlook(scanpst.exe) Recovery

Content

To work around this problem, use the Inbox Repair Tool (Scanpst.exe) to repair your personal mail file. To do this, follow these steps:
  1. Exit Outlook .
  2. Click Start
    Collapse this imageExpand this image
    , and then click Control Panel.
  3. Click User Accounts and Family Safety or User Accounts.

    Note If you do not see User Accounts and Family Safety or User Accounts, go to the next step.
  4. Click Mail.
  5. Click Data Files, click Personal Folders, and then click Settings.
  6. Note the text in the Filename box.

    Note If you cannot view all the text, click in the Filename box, and then press the RIGHT ARROW key repeatedly.
  7. Click OK, and then click Close two times.
  8. Click Start
    Collapse this imageExpand this image
    , type %ProgramFiles%\Microsoft Office\Office12\ in the Start Search box, and then press ENTER.
  9. Double-click Scanpst.
  10. In the Enter the name of the file you want to scan box, type the path and file name of the Outlook .pst file that you noted in step 6.
  11. Click Start.
  12. When the Inbox Repair Tool finishes, click OK.

Adding Mac to windows Domain

Joining Active Directory
By default, you will have to enter your domain username and password every time you access a server resource when that resource is not connected to the Mac (i.e., right after bootup, after a share has been “ejected”, or if a network connection drops the connection to the server). By joining the Macintosh to Active Directory, you can log into the Mac with your Active Directory user credentials and not have to enter them every time you access a shared resource. To be able to log in to the Mac with Active Directory credentials, follow these steps.
  1. From the Utilities folder in the Applications folder, open the Directory Utility application.
  2. Once the application opens and finishes the process of detecting directory servers on the network, click the Show Advanced Settings button.
  3. When the Advanced Settings appear, click the Services icon.
  4. Click the lock to get access to the panel. You will be prompted for credentials. Enter your Macintosh username and password, then click OK.
  5. Double-click on the Active Directory line to open the Active Directory configuration.
  6. Click on the Show Advanced Options triangle.
  7. Enter the internal domain name in the Active Directory Domain field.
  8. Change the name of the Mac to a shorter name in the Computer ID field.
  9. Turn on the Create mobile account at login checkbox.
  10. Select the Administrative tab.
  11. Turn on the Prefer this domain server checkbox and enter the fully-qualified domain name of the SBS server (i.e., servername.domainname.local).
  12. Turn on the Allow administration by checkbox.
  13. Click Bind to join the Macintosh to the domain.
  14. Enter the domain administrator username and password when prompted. The Macintosh will be placed in the Computers container by default. This can be changed in Active Directory later if needed.
  15. Once the join process is complete, you will see both the Active Directory Forest and Active Directory Domain fields populated.
  16. Confirm that the Active Directory checkbox is enabled in Directory Utility and close the application.
  17. Open System Preferences and click the Accounts icon.
  18. Click the lock to make changes and enter the password for the local Mac account.
  19. Click on the Login Options icon in the navigation tree.
  20. Set Automatic Login to Disabled.
  21. Close System Preferences.
  22. Log out of the Mac account by selecting Log Out from the Apple menu. You do not need to restart the Mac to be able to log in with your Active Directory credentials.
  23. When you get the login screen, click Other.
  24. Enter your Active Directory credentials as domainname\username.
  25. You will be prompted to create a mobile account. Click Create Now.
  26. Once login completes, open System Preferences and open the Accounts pane.
  27. Click the lock to make changes.
  28. When you are prompted to enter an administrator credentials, you will need to enter information for the local Macintosh account. You will need to enter the short name as the account name. If you are not sure what the short name is, log back in as the Mac user and look for the name of the home folder. The home folder is named with the short name of the account.
  29. After you enter the authentication information, turn on the Allow user to administer this computer checkbox.
  30. You will get a message that you need to log out and log back in for the settings to take effect. Click OK.
  31. Log out and log back in with the Active Directory credentials.
  32. Open a new Finder window and select the server name in the Shared section of the navigation tree. All of the shares on the server will appear and can be selected from here. You can also use the Connect to Server method described earlier in this document to connect. The difference is that you will not be prompted to enter a username and password when you enter the network resource you wish to use.

Connect Sql Server Using Windows Authentication from a non-domain joined machine



command
"C:\Windows\System32\runas.exe /user:username@domainname /netonly "C:\Program Files\Microsoft SQL Server\100\Tools\binn\VSShell\Common7\IDE\Ssms.exe -nosplash"  "

Sometimes it is necessary to use Windows domain credentials to authenticate with a SQL Server from a non-domain joined machine. Here’s a trick from my coworker Martin Kastenbaum to pass Windows domain credentials from a non-domain joined machine. You can pass your Windows credentials to SQL Server Management Studio by making a simple modification to the shortcut you use to launch it. It's probably a wise idea to make a copy of your SSMS shortcut and make all changes to the copy, not the original.




Figure 1. SSMS 2005 shortcut on the left, SSMS 2008 shortcut on the right.
You need to modify the target, but first you should press the Change Icon… button and save the path to the icon. You’ll need to use it later.


Figure 2. Save the path for the icons.
Modify the shortcut’s target as follows:
SQL Server 2008 x64: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\binn\VSShell\Common7\IDE\Ssms.exe -nosplash"
SQL Server 2008 x86: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files\Microsoft SQL Server\100\Tools\binn\VSShell\Common7\IDE\Ssms.exe -nosplash"
SQL Server 2005 x64: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe -nosplash"
SQL Server 2005 x86: C:\Windows\System32\runas.exe /user:YourDomain\YourUsername /netonly "C:\Program Files\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe -nosplash"
The –nosplash is optional. It slightly speeds up the SMSS startup time.
Modifying the shortcut’s target messes up the icon. You’ll want to fix that by pressing the Change Icon… button again and restoring the path to the one you saved earlier. In case you didn’t save the path, the default values for the path to the icon are:
SQL Server 2008 x64: %ProgramFiles% (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe
SQL Server 2008 x86: %ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe
SQL Server 2005 x64: C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe
SQL Server 2005 x86: C:\Program Files\Microsoft SQL Server\90\Tools\binn\VSShell\Common7\IDE\SqlWb.exe
When you start SSMS from a modified shortcut, you’ll be prompted for your domain password:

Figure 3. Password Prompt
Notice that the Connect to Server dialog is misleading after making this change. Although it properly shows I’m using Windows Authentication, it incorrectly indicates that my credentials are Win7L\John, which they are not. Once I click connect, I’m connected with the Domain\Username supplied in the modified shortcut.
Figure 4. Notice that the supplied domain and username do not appear in the dialog box.
This is a handy trick for consultants who use their own laptops to connect to a client’s domain joined SQL Server.





Friday, August 19, 2016

Selenium Installation (JAVA) On Windows and MAC

Selenium Installation (JAVA)
OS : Windows and MAC
1 INSTALL JAVA ON YOUR COMPUTER
Download and install the Java Software Development Kit (JDK).
http://www.oracle.com/technetwork/java/javase/downloads/index.html

This JDK version comes bundled with Java Runtime Environment (JRE) so you do not need to download and install the JRE separately.

1.1 JDK INSTALLATION FOR MAC OS

Note that installing the JDK on a Mac is performed on a system wide basis, for all users, and administrator privileges are required. You cannot install Java for a single user.
Installing the JDK also installs the JRE. The one exception is that the system will not replace the current JRE with a lower version. To install a lower version of the JRE, first uninstall the current version.
When you download the Java Development Kit (JDK), the associated Java Runtime Environment (JRE) is installed at the same time. The JavaFX SDK and Runtime are also installed and integrated into the standard JDK directory structure.
Depending on your processor, the downloaded file has one of the following names:
jdk-7u<version>-macosx-amd64.dmg
jdk-7u<version>-macosx-x64.dmg
Where <version> is 6 or later.
1. Download the file. Before the file can be downloaded, you must accept the license agreement.
2. From either the Downloads window of the browser, or from the file browser, double click the .dmg file to launch it.
3. A Finder window appears containing an icon of an open box and the name of the .pkg file Double click the package icon to launch the Install app.
4. The Install app displays the Introduction window. Click Continue.
4a. Note that, in some cases, a Destination Select window appears. This is a bug, as there is only one option available. If you see this window, select Install for all users of this computer to enable the continue button. Click Continue.
5. The Installation Type window appears. Click Install.
6. A window appears which says "Installer is trying to install new software. Type your password to allow this." Enter the Administrator login and password and click Install Software.
7. The software is installed and a confirmation window appears
After the software is installed, delete the dmg file if you want to save disk space.

1.2 UNINSTALL THE JDK (MAC OS)

To uninstall the JDK, you must have Administrator privileges and execute the remove command either as root or by using the sudo(8) tool.
Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format:*
    /Library/Java/JavaVirtualMachines/jdk<major>.<minor>.<macro[_update]>.jdk
For example, to uninstall 7u6:
    % rm -rf jdk1.7.0_06.jdk

Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time you perform an update of the OS.
*The 7u4 and 7u5 releases were installed into a directory that does not follow this format. To uninstall 7u4 or 7u5, remove the 1.7.0.jdk directory from the same location.


2 INSTALL ECLIPSE IDE

Download "Eclipse IDE for Java Developers".
http://www.eclipse.org/downloads/
Be sure to choose correctly between Windows 32 Bit and 64 Bit versions.


You should be able to download a ZIP file named "eclipse-java-juno-SR1-win32-x86_64.zip" (the version number "SR1" may change over time).

Inside that ZIP file, there is an "eclipse" folder which contains all the application files. You can extract the "eclipse" folder anywhere you want in your PC; but for this tutorial, extract it to your C drive.

Unlike other popular software, no installation is required to use eclipse.
For MAC OS:



3 DOWNLOAD THE SELENIUM JAVA CLIENT DRIVER

You can download the Selenium Java Client Driver from
http://docs.seleniumhq.org/download/
You will find client drivers for other languages there, but only choose the one for Java.



This download comes as a ZIP file named "selenium-2.25.0.zip". For simplicity, extract the contents of this ZIP file on your C drive so that you would have the directory "C:\selenium-2.25.0\". This directory contains all the JAR files that we would later import on Eclipse.

4 CONFIGURE ECLIPSE IDE WITH WEB DRIVER

1. Launch the "eclipse.exe" file inside the "eclipse" folder that we extracted in step 2. If you followed step 2 correctly, the executable should be located on C:\eclipse\eclipse.exe.
2. When asked to select for a workspace, just accept the default location.



3. Create a new project through File > New > Java Project. Name the project as "myproject".
4. Right-click on the newly created project and select New > Package, and name that package as "mypackage".
5. Create a new Java class under mypackage by right-clicking on it and then selecting New > Class, and then name it as "myclass". Your Eclipse IDE should look like the image below.

6. Right-click on myproject and select Properties.
7. On the Properties dialog, click on "Java Build Path".
8. Click on the Libraries tab, and then click "Add External JARs.."
9. Navigate to C:\selenium-2.25.0\ (or any other location where you saved the extracted contents of "selenium-2.25.0.zip" in step 3).
10. Add all the JAR files inside and outside the "libs" folder. Your Properties dialog should now look similar to the image below.

11. Finally, click OK and we are done importing Selenium libraries into our project.

Redis Installation Centos

Redis Installation Centos

Step-1

If gcc already installed ignore or else install
# yum install make gcc

Step 2

Download to location   /tmp or somewhere else
# wget http://redis.io/download    Redis latestversion .gz  file

#tar –xf  Redis-version ****.tar.gz

Step-3

Now we are ready to install Redis from the source.
# cd redis ****
# make
# make install

Step 4

Move all of the redis executable files to the /opt directory by issuing the following sequence of commands:
cp /opt/redis/redis.conf /opt/redis/redis.conf.default

cp /opt/redis/src/redis-benchmark /opt/redis/

cp /opt/redis/src/redis-cli /opt/redis/

cp /opt/redis/src/redis-server /opt/redis/

cp /opt/redis/src/redis-check-aof /opt/redis/

cp /opt/redis/src/redis-check-dump /opt/redis/




Step-5

Redis Configuration
All Redis configuration options can be specified in the redis.conf file located at /opt/redis/redis.conf. Issue the following command to create this file from the default configuration file:
cp /opt/redis/redis.conf.default  /opt/redis/redis.conf
 
Consider the following Configuration
File :  redis.conf
1.    daemonize  yes

2.    pidfile  /var/run/redis.pid

3.    port 6379

4.    bind 127.0.0.1    (uncomment)

5.    timeout 300

6.    databases 16

7.    save 900 1
save 300 10
save 60 10000

8.    rdbcompression  yes

# The filename where to dump the DB
9.    dbfilename /opt/redis/db/dump.rdb  ( need to notify  db path)

# The working directory.
10.  dir /opt/redis/    (need to Specify Dir  Here) 

11.  appendonly no

12.  logfile "/var/log/redis.log"



  

Step 6

Deploy init Script

Get code from below   its an example
http://www.linode.com/docs/assets/631-redis-init-rpm.sh
 
 
 Changes need to be done according to your Conf in the script file
 
               # Touch /var/log/redis.log
 
                               # Chkconfig --add redis
 
                                              # Chkconfig redis on

Step -7

Redis will  Now start  with following commands
# /etc/init.d/redis start
 
# /etc/init.d/redis  stop

Step-8

# /opt/redis/redis-cli

Source  :

integration_svn_ldapauthentication_centos

Installing/Configuring CentOS

Install CentOS with default partition and make sure you have web server (http package) with PHP support installed. Once the installation is finished and you are logged in as root, I suggest that you install the latest updates by running
[root@svn ~]# yum update
Install subversion and mod_dav_svn packages
[root@svn ~]# yum install subversion mod_dav_svn enscript php-ldap
encrypt package is used by WebSVN for code highlighting and formatting.

Active Directory/LDAP Configuration

 If your LDAP deployment doesn’t support anonymous bind, create a user in LDAP which can be used to bind and perform queries. By default, anonymous LDAP operations, except root DSE searches and binds are not permitted on Windows 2003 domain controllers. As my deployment involves Windows 2003 based domain controller, I created a user named ‘LDAP User‘ (Logon Name ‘ldapuser‘) in Users container.
Before proceeding with rest of the setup, its a good idea to test the bind using the user which will be used for binding and search queries. I used a free utility available from Softerra named LDAP Browser which is available for free download at:

http://www.softerra.com/download.htm

In rest of the setup, I will use imaginary domain called domain.example.com. My user principal name will be ldapuser@domain.example.com and the distinguished name for the same will be
CN=LDAP User,CN=Users,DC=domain,DC=example,DC=com.


The FQDN for active directory domain server is adserver.domain.example.com.


WebSVN Configuration
Create a directory which will hold the SVN repositories. I used /var/www/ for this purpose
mkdir -p /var/www/svn 
 
 
 
Next, download the latest WebSVN package from http://www.websvn.info
 
[root@svn ~]# cd /usr/local/src
 
   [root@svn ~]# wget http://websvn.tigris.org/files/documents/1380/45918/websvn 2.2.1.tar.gz
 
   [root@svn ~]# tar zxvf websvn-2.2.1.tar.gz
 
   [root@svn ~]# mv websvn-2.2.1 /var/www/
   [root@svn ~]# cd /var/www/
==
           [root@svn ~]# ls
 
[root@svn ~]# cd /etc/httpd/conf.d/
 
[root@svn ~]# vim websvn.conf
 
Add the below line  
Alias /websvn /var/www/websvn

<Location "/">
AuthBasicProvider ldap
    AuthType Basic
   AuthzLDAPAuthoritative off
   AuthName "Subversion Repository Web Browsing"
   AuthLDAPURL "ldap://ldap.domainname.com:3268/DC=xx,DC=xx,DC=xx,DC=xx?sAMAccountName?sub?(objectClass=*)" NONE
   #AuthLDAPBindDN "CN=LDAP User,CN=Users,DC=domain,DC=example,DC=com"
   AuthLDAPBindDN "CN=xx,OU=Application Mail,DC=xx,DC=xx,DC=xx,DC=xx"
   AuthLDAPBindPassword xxxxxx
 
    require valid-user
     </Location>

    And save the file
 
     [root@svn ~]# service httpd restart

       Next, create the new configuration file for WebSVN from default configuration files ships with the package.

cd /var/www/websvn/include
cp distconfig.php config.php

You can edit the config.php file according to your environment. For every repository, you have add the parent path to directory which holds the repositories. In my case, /srv/svn is the directory which will hold all the repositories so I added the below line to config.php
$config-&gt;parentPath('/var/www/svn');

$extEnscript[".pl"] = "perl";
$extEnscript[".py"] = "python";
$extEnscript[".sql"] = "sql";
$extEnscript[".java"] = "java";
$extEnscript[".html"] = "html";
$extEnscript[".xml"] = "html";
$extEnscript[".thtml"] = "html";
$extEnscript[".tpl"] = "html";
$extEnscript[".sh"] = "bash";

Restart the apache service for changes to take effect
service httpd restart
Lets create a repository which we can use for testing.
[root@svn ~]# svnadmin create --fs-type fsfs /var/www/svn/testing20100121

Try accessing the alias using the URL http://<hostname>/websvn and if things work out good, you should have access to your repositories through WebSVN interface.


Configuring WebDAV

Configuring WebDAV access for subversion requires mod_dav_svn module which we already installed in previous steps. Installing mod_dav_svn RPM also creates configuration file subversion.conf under /etc/httpd/conf.d directory.
To use WebDAV for SVN repositories, repository directory should be owned by web server user (apache). Change the ownership of our test SVN repository to apache user

[root@svn ~]# chown -R apache.apache /var/www/svn/testing20100121

Next, edit subversion.conf file and
vim /etc/httpd/conf.d/subversion.conf
add the following lines.
   <Location />
 
DAV svn
SVNParentPath /var/www/svn
 
AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "Subversion Repository Web Browsing"
AuthLDAPURL "ldap://ldap.domain name.com:3268/DC=xx,DC=xx,DC=xx,DC=xx?sAMAccountName?sub?(objectClass=*)" NONE
#AuthLDAPBindDN "CN=LDAP User,CN=Users,DC=domain,DC=example,DC=com"
AuthLDAPBindDN "CN=xx,OU=Application Mail,DC=xx,DC=xx,DC=xx,DC=xx"
AuthLDAPBindPassword xxx
 
require valid-user
 
</Location>
 
 
 
.
Lets, restart the apache service for changes to take effect
 service httpd restart
 
 
 

 



 
[r



Windows Active Directory Integration with Samba for RHEL & CentOS

Active Directory Integration with Samba for RHEL/CentOS 5



This article will show us how to join your Linux server into the Active Directory domain, how to integrate the Active Directory user accounts into the Linux user accounts and how to authenticate users in Active Directory using Winbind, a component of Samba.

Samba is installed by default when you select the Server installation type during the installation process. to check the Winbind status type

[root@localhost ~]# service smb status

 In case you need to install

[root@localhost ~]# yum install samba

Winbind is installed by Default to check the Winbind status type

[root@localhost ~]# service Winbind status

And need to do changes in the configuratation files which are in

1. /etc/samba/smb.conf
2. /etc/pam.d/system-auth-ac
3. /etc/nsswitch.conf
4. /etc/krb5.conf


First take backup of the files before doing modifications in the file



Changes according to the Files

 /etc/samba/smb.conf

Do the changes as per the below in your smb.conf file.

#=============== Global Settings==========
[global]
# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name,
eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect
 and you can
# specify it as a per share option as well
#

        workgroup = (Domain Name)
        server string = Samba Server Version %v

;       netbios name = MYSERVER

  
;       interfaces = lo eth0 192.168.1.2/24  (Your IP Range)

;       hosts allow = 127. 192.168.1. 192.168.0.

interfaces = lo eth0 192.168.0.47/24
         hosts allow = 127. 192.168.0. 192.168.40.
         security = ads
         realm=(Domain name)
         encrypt passwords = yes
         smb passwd file = /etc/samba/smbpasswd
         allow trusted domains = yes
         unix password sync = Yes
         passwd program = /usr/bin/passwd %u
          passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
         pam password change = yes
         obey pam restrictions = yes
         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
         dns proxy = no
         idmap uid = 16777216-33554431
         idmap gid = 16777216-33554431
         winbind use default domain = yes
         winbind separator = #
         winbind enum users = yes
         winbind enum groups = yes
         template shell=/bin/bash
         template homedir = /home/%U

# ----------------------- Standalone Server Options ------------------------
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

        security = user
        passdb backend = tdbsam

# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *


;       security = domain
;       passdb backend = tdbsam
;       realm = MY_REALM

;       password server = <NT-Server-Name>

security = domain
        passdb backend = tdbsam
        realm = (Domain Name)

        password server = *

# A publicly accessible directory, but read only, except for people in
# the "staff" group

        [public]
        comment = Public Stuff
        path = /home/public
        public = yes
        writable = yes

;       printable = no
;       write list = +staff
===========================================

/etc/pam.d/system-auth-ac

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth       sufficient    pam_krb5.so use_first_pass
auth       sufficient    pam_winbind.so use_first_pass
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        required      pam_deny.so

account     required      pam_unix.so
account     sufficient    pam_succeed_if.so uid < 500 quiet
account          [default=bad success=ok user_unknown=ignore] pam_krb5.so
account     [default=bad success=ok user_unknown=ignore] pam_winbind.so
account     required      pam_permit.so
#account     requisite      pam_succeed_if.so user ingroup unix

password    requisite     pam_cracklib.so try_first_pass retry=3
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok
password    sufficient    pam_unix.so nullok use_authtok md5 shadow
password    sufficient    pam_winbind.so use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session          optional    pam_mkhomedir.so skel=etc/skel/ umask=0027
session     optional      pam_krb5.so

==========================================================

/etc/nsswitch.conf


# Example:
#passwd:    db files nisplus nis
#shadow:    db files nisplus nis
#group:     db files nisplus nis

passwd:     files winbind
shadow:     files winbind
group:      files winbind

#hosts:     db files nisplus nis dns
hosts:      files dns

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files    

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files winbind
rpc:        files
services:   files winbind

netgroup:   files winbind

publickey:  nisplus

automount:  files winbind
aliases:    files nisplus

=========================================================
/etc/krb5.conf

[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = (Domain Name)
 dns_lookup_realm = true
 dns_lookup_kdc = true
 ticket_lifetime = 24h
 forwardable = yes

[realms]
 (Domain Name) = {
  kdc = (Domain Server Name):88
  admin_server = (Domain Server Name):749
  default_domain = Domain Name
 }

[domain_realm]
 .Domain name  = Domain Name
  Domain name  = Domain Name

[appdefaults]
 pam = {
   debug = false
   ticket_lifetime = 36000
   renew_lifetime = 36000
   forwardable = true
   krb4_convert = false
 }

==========================================================

And there  is modifications in the host file to

./etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1          (servername.domain name) localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

192.168.0.6 (servername.domain name)

After modifying the files start the smb and Winbind services.

[root@localhost ~]# service smb start

Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

[root@localhost ~]# service winbind start

Starting Winbind services:                                 [  OK  ]

==========================================================

Join the Samba Server to the PDC Domain


Use the below Command to join  samba server to the pdc

[root@localhost ~]# net rpc join -S servername -U administrator

Password:

After  giving the password we can see the below result

Joined domain (servername).

Restart the “Winbind and smb” services

[root@localhost ~]# service smb restart

Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

[root@localhost ~]# service winbind restart

Shutting down Winbind services:                            [  OK  ]


=========================================================

Now for testing and  get some information about the users on your PDC:
root# /usr/local/samba/bin/wbinfo -u
This should echo back a list of users on your Windows users on your PDC. For example, I get the following response:
CEO\Administrator
CEO\burdell
CEO\Guest

And  same sort of thing to get group information from the PDC:
root# wbinfo –g

CEO\Domain Admins
CEO\Domain Users
CEO\Domain Guests
CEO\Domain Computers