Setup a SVN server in minutes

Posted by admin on May 15th, 2009 filed in Subversion
Comment now »

Here are the steps

1. Create a repository

# mkdir /svn_repos
# cd /svn_repos
# mkdir -p / //trunk //branch //tags
# svnadmin create /svn_repos/ # svn import -m “Repo Creation” / file:///svn_repos/

2. Securing the SVN repository

# vim /svn_repos/ /conf/svnserve.conf

Append the lines to the end of the file,

anon-access = none
auth-access = write
password-db = passwd

Setting up Authentication

# vim /svn_repos/ /conf/passwd
# add users in the format : user = password
username = password

*Note the password is in plaintext. Please make sure that you setup a strong password

3. Host the SVN repository on the web

# svnserve -d

4. Accessing the Repository from a remote location

svn://hostname/svn_repos/

Pre-Requisites
* Port 3690 must be open
* You must provide the complete url to access the svn repository. For example, if the domain name is mysvnrepository.com and the project name is /mysuperproject the valid svn url will be
svn://mysvnrepository.com/mysuperproject

Note: “/” in front of “mysuperproject” that is the physical path on the unix file system. if the svn repo is created at “/svn/mynewrepo” then the valid url will be

svn://mysvnrepository.com/svn/mynewrepo

-Admin


How to use the screen command

Posted by admin on February 19th, 2009 filed in Linux
Comment now »

  • To start a new sub session (Virtual Session) type
    ((ctrl+a) c)

  • To switch between sessions…
    ((ctrl+a) )

  • To switch between your previous session and the current one..
    ((ctrl+a) a)

  • To kill a frozen session…
    ((ctrl+a) k)

  • To see a list of available commands…
    ((ctrl+a) ?)

  • To see a list of virtual terminals you have open..
    ((ctrl+a) “)

  • To Detach from a screen session and not lose any of your virtual terminals…
    ((ctrl+a) d)

  • To view current screen sessions once you are logged out of screen.. “screen -list”
  • To reattach to an Attached session (Session that was not detached properly) “screen -D -r <11546.pts-5.hostname>” (session name from the output of the screen -list command)
  • To reattach to a detached session.. “screen -r <11546.pts-5.hostname>” (session name from the output of the screen -list command)
  • To end that session you can either type “exit” or a
    (ctrl+d)


Transparent Iframes

Posted by admin on December 11th, 2008 filed in HTML
Comment now »

How to Setup an Iframe to be transparent

Step 1

Insert your iframe code between body tags.

<iframe src=”yourpage.html” name=”myframe” width=”250″ height=”250″ frameborder=”0″ allowtransparency=”true”></iframe>

Step 2

Now copy the code below, and paste it between tags of the page you are linking to.

In this example this page is yourpage.html
<style type=”text/css”>
Body { Background: transparent; }
</style>


Install Windows XP on Asus EEE PC

Posted by admin on November 18th, 2008 filed in Operating systems
2 Comments »

Installing Windows XP on the Asus EEE pc using a single USB flash drive.

Please note this tutorial works on all computers not just the Asus EEE PC.
To complete this tutorial you need a 32bit version of Windows XP or Windows Vista installed on your home PC.

What you’ll need:

  • USB_PREP8
  • PeToUSB
  • Bootsect.exe

Steps:

  • Extract the files in Bootsect.zip
  • The next step is to extract USB_prep8 and PeToUSB
  • Next copy the PeToUSB executable into the USB_prep8 folder.
  • Inside of the USB_prep8 folder double click the executable named usb_prep8.cmd.

Press any key to continue

These settings are preconfigured for you all you need to do now is click start.
Once the format is complete DO NOT close the window just leave everything as it is and open a command prompt from your start menu (type cmd in the search bar or run box depending on your version of windows.).

Inside of the command windows go to the directory you have bootsect.exe saved.
(use the cd directoryname command to switch folders)

Now type “bootsect.exe /nt52 R:” NOTE R: is the drive letter for my USB stick if yours is different you need to change it accordingly. What this part does is write the correct boot sector to your USB stick, this allows your PC to boot from the USB stick without it nothing works.
Please note: When running the bootsect.exe command you cannot have any windows open displaying the content of your USB stick, if you have a window open bootsect.exe will be unable to lock the drive and write the bootsector correctly.

If all went well you should see “Bootcode was successfully updated on all targeted volumes.”

Now you can close this command prompt (don’t close the usbprep8 one by mistake) and the petousb window.

If it doesn’t try pressing enter.

Now you need to enter the correct information for numbers 1-3.
Press 1 and then enter. A folder browse window will open for you to browse to the location of you XP setup files (aka your cdrom drive with xp cd in)
Press 2 and enter a letter not currently assigned to a drive on your PC
Press 3 and enter the drive letter of your USB stick
Press 4 to start the process.

The script will ask you if its ok to format drive T:. This is just a temp drive the program creates to cache the windows installation files. Press Y then enter.

Once it’s done formating press enter to continue again, you can now see the program copying files to the temp drive it created. Once this is done press enter to continue again.

Next you will see a box pop up asking you to copy the files to USB drive yes/no you want to click yes.

Once the script has completed copy files a popup window asking if you would like to USB drive to be preferred boot drive U: select YES on this window.

Now select yes to unmount the virtual drive.

Ok we are done the hard part, close the usbprep8 window.

Now make sure your EEE pc is configured with USB as the primary boot device.
Insert your USB drive and boot up the EEE.

On the startup menu you have two options, select option number 2 for text mode setup.

From this point on it is just like any other windows XP installation delete/recreate the primary partition on your EEE pc and format it using NTFS. Make sure you delete ALL partitions and recreate a single partition or you will get the hal.dll error message.

Once the text mode portion of setup is complete it will boot into the GUI mode (you can press enter after the reboot if your too excited to wait the 30 seconds)

Once the GUI portion of setup is complete you will again have to boot into GUI mode this will complete the XP installation and you will end up at you XP desktop. It is very important that you DO NOT REMOVE THE USB STICK before this point. Once you can see your start menu it is safe to remove the usb stick and reboot your pc to make sure everything worked.

This method has advantages over all current no cdrom methods of installing XP to the EEE. You do not have to copy setup files in DOS to the SSD and install from there. It gives you access to the recovery console by booting into text mode setup, and it gives you the ability to run repair installations of XP if you have problems later on.

I hope this worked out for you and please post feedback to the comments section.
Please note due to the amount of comments this article has received you must now click on “Post a Comment” below the existing comments to view the most recent feedback in a popup window.

Source


Creating a new sub-domain in IIS6

Posted by admin on September 18th, 2008 filed in Hosting
1 Comment »

Subdomain Configuration

A subdomain configuration is very similar to a domain name configuration. The only difference is that the subdomain entry is tied to the corresponding domain name lookup. A request for the subdomain (e.g. http://subdomain.mydomain.com) will be routed to a DNS server containing the DNS information for the parent domain (mydomain.com). Once the DNS record for the subdomain is resolved to a particular IP address, the request is sent to the web server listening on that IP address. The web server can now delegate the request to the particular website based on the subdomain name in the host header of the request object. Various combinations of subdomain configurations are possible by using DNS server entries and web server application setup for load distribution, application isolation or security purposes.

Subdomain Setup on DNS server

The forward lookup zone of the parent domain in the DNS server should contain a pointer to the sub domain using either an alias (CNAME), a hostname (A) or a mail enchanger (MX) entry. The alias (CNAME) record is used for a subdomain if the subdomain points to a website running on the same web server at the same IP address as the parent domain website. A new hostname (A) record is used if the subdomain points to a different web server, or to the same web server listening on a different IP address (as in the case of load distribution).

Alias (CNAME) Setup: An alias points the subdomain to the same web server, which hosts the website for the parent domain. The canonical names (CNAMES) are added for each of the subdomains as shown below. Once the subdomain is resolved to the IP address of the web server, the web server can route the request to a different website (see section on web server setup below). Note that an alias for www is setup as a subdomain by default by most hosting companies, so that requests to www.domain.com is sent to the same website that handles the requests for domain.com.

www IN CNAME domain.com.
subdomain1 IN CNAME domain.com.
subdomain2 IN CNAME domain.com.

Address (A) Record Setup: A hostname DNS entry is required if the subdomain is pointing to a different IP address than that set for the domain name. Add the address (A) records to the forward lookup zone of the parent domain and associate the address records with the IP addresses of the web servers, which will handle the requests for the subdomain.

subdomain1 IN A 123.2.33.45.
subdomain2 IN A 123.2.33.46.

Mail Exchanger (MX) Setup: The mail exchanger subdomain configuration is required if an email server is setup to handle the subdomain mail accounts. For example, an email address like jhondoe@subdomain.mydomain.com will require a subdomain setup for resolving the mail server for subdomain.mydomain.com. The setup is similar to the CNAME setup but with MX records.

subdomain1 IN MX 10 subdomain1.domain.com.
subdomain2 IN MX 10 subdomain2.domain.com.

Note: If the sub-domain is configured on another DNS name server, a Name Server (NS) record has to be created for the sub-domain on the corresponding domain name DNS server, so that it can delegate the sub-domain lookup to the other name servers. Using different name servers can eliminate security issues in cases where the sub-domains are maintained by separate administrators. However, the lookup carries an additional overhead.

Configuring the web server for sub-domains

Once the DNS server is setup to send the request for the sub-domain to the corresponding IP address, the work of the web server begins. The web server needs to be configured appropriately to handle the request for the sub-domain based on either the IP address or the host header entry. Host headers are commonly used by web servers to host multiple domains or sub-domains on one IP address.

Microsoft Windows IIS : In case of Internet Information Server (IIS), create a new web site for the subdomain using the IIS Manager, and add the sub-domain (e.g. subdomain.domain.com) as a new host header value listening to the same IP address as specified in the DNS entry. The port is set to 80 (the default for http requests). The host header can be added by clicking on the advanced tab next to the IP address configuration for that web site application. If the subdomain points to a subdirectory of the web site for the domain, then set the home directory for the subdomain web site to the subdirectory. For example, if the domain.com points to C:\Inetpub\wwwroot\ and the subdomain needs to be setup for C:\Inetpub\wwwroot\subdomain, then the directory for the subdomain website should be set to C:\Inetpub\wwwroot\subdomain.

Apache Web Server : In case of Apache web server, the subdomain is configured by virtual host entries in httpd.conf as shown below.

Listen 80
NameVirtualHost *


ServerName www.domain.com
DocumentRoot /home/httpd/htdocs/


ServerName subdomain.domain.com
DocumentRoot /home/httpd/htdocs/subdomain/

Conclusion

Sub-domain configuration starts with an entry in the DNS server of the parent domain and the lookup resolves the sub-domain to an IP address of the web server. The web server in turn delegates the requests based on its configuration for the sub-domain. Various sub-domain configurations can be used effectively to distribute the load evenly among available web applications or web servers listening to different IP addresses. The load distribution is achieved by the DNS round robin feature of the BIND. Other uses include application isolation, simpler and professional looking URL, content categorization etc.

Source