Subversion for Windows with Apache server HOWTOlast change 0. Index. 1. Introduction. The Subversion for Windows HOWTO describes from. Subversion server with Apache on a Windows system, and get. This how to describes how to use the Apache 2. Subversion. This guide was checked on Windows XP and Windows 7 so everywhere you read Windows 7 you can be sure that it works on XP also. The same point is valid, if you choose to use Apache 2. This guide is from beginner to beginners. The author of this HOWTO doesnt have. Version Control system, so when we decided to start using. The guide will describe topics like the installation, basic configuration and setting up backup. It will provide working examples of configuration, ready for you to modify and use. Hopefully the HOWTO will grow, as the author gets more familiar with the system, more. I have made are correct, not much will get. Before I begin, I must mention the Subversion book which. ASAP. There is always time to read the. Hopefully, this will turn out to be such a guide. It contains examples that you can download, modify. Describes how to install the Subversion server on a Windows system, and get it running. It should help you set up a Subversion server, including repository backup. It does not contain instructions or examples for the Subversion client. But, if. youre using Eclipse, the Subclipse client will not take more than additional five minutes of your. Installation. This chapter describes the process of installation, beginning with the OS installation, continuing. Subversion server installation and ending with Apache 2. I have installed. Subversion and Apache 2. Administrator. All later configuration was done under. Administrators group. Setting up the OS. Since this isnt a Windows HOWTO, this chapter will be rather short, and answer a few simple. I had before I began. The two OS related questions that I was asking myself before. OS installation were. Does the Subversion server work with Windows 7 and all the patches Does the server work on DHCP enabled interfaceAnd the answers are obviously YES, and YES. So, to put it simply, install the Windows 7. It depends on your. For IP address I have selected automatic interface configuration DHCP, the host was highly. Windows domain. For a server, this is a strange choice, but it was good enough for. With the testing phase finished, I have assigned a static. I suggest you do the same from the beginning. Installing Subversion. The Subversion Windows installation package can be downloaded from the Subversion server, at the. URL http subversion. I have downloaded the distribution packaged in a standard Windows installation program. For the. Subversion version 1. Setup Subversion 1. The installation itself is completely straight forward. You read and accept a license agreement. Next a couple of. What you get in the end, is the Subversion is installed. The default directory is C Program FilesSubversion, and here is. C Program FilesSubversionbin Contains all the binaries like. And. Contains the Apache 2. C Program FilesSubversioniconv C Program FilesSubversionshare C Program FilesSubversionlicences. The C Program FilesSubversionbin is added to the path. And thats about all there is to the installation. Installing Apache 2. The Apache 2. 2 server for Windows installation package can be downloaded from the Apache. URL. http httpd. I have downloaded the distribution packaged in a standard Windows installation program the. The installation itself is completely straight forward. You read and accept a license agreement, select the Apache binding I picked the 2. The default values are already selected for you. For dedicated a subversion server. I suggest you leave it running on port 8. You can always change it later. Then you can select typical, or custom install. Selecting typical install lets you choose the. When it finishes, youre done. At this point it is probably recommendable to restart the system, before moving on to configuration. Configuration. This chapter describes how to configure the Subversion system, and how configure the Apache server to make. Configuring Subversion. The Subversion stores the content into so called repositories. You need at least one repository to. This HOWTO will. assume multiple repositories are used. We will call these projects. So, lets create a directory for all our projects, and then a subdirectory for each of the projects, e. C Repositoriesproject. C Repositoriesproject. These are just directories to hold our repositories, now we must create the repositories themselves. C Repositoriesproject. C Repositoriesproject. As the Subversion book warns, make sure to create. Fiber. Channel is treated as a local disk. Failing to do. so, may result in repository corruption. Basically this is pretty much it, when it comes to creating the repositories. As the Subversion book. Berkeley DB database, which can be configured in many. I found no reason to. To make them available to your development teams, the Apache server needs to be configured. Configuring Apache 2. As the Apache server will only be a front end for the Subversion system, I suggest that all the. Subversion specific files are stored in a separate directory, which is at hand, and not hidden away. Apache directory. In the best spirit of nix systems, let us name that directory. But, before we start with the Subversion specific configuration, let us make the necessary. Apache server with Subversion. Please note, that the Apache server requires, that you write all the directories. C Program FilesApache Software foundationApache. Step 1. Copy the files modauthzsvn. C Program FilesSubversionhttpd into. C Program FilesApache Software foundationApache. Step 2. Modify the. C Program FilesApache Software foundationApache. Add the modules to the Apache server. Load. Module davmodule modulesmoddav. Load. Module davsvnmodule modulesmoddavsvn. Load. Module authzsvnmodule modulesmodauthzsvn. Add the Access lines to the lt Directory sections, to protect. Besure that you have the rights to change the file Directory. Options Follow. Sym. Links. Allow. Override None. Order Allow,Deny. Allow from 1. 0. 0. Directory. lt Directory C Program FilesApache Software foundationApache. Possible values for the Options directive are None, All. Indexes Includes Follow. Sym. Links Sym. Linksif. Owner. Match Exec. CGI Multi. Views. Note that Multi. Views must be named xplicitly Options All. The Options directive is both complicated and important. Please see. http httpd. Options Indexes Follow. Sym. Links. Allow. Override controls what directives may be placed in. It can be All, None, or any combination of the keywords. Options File. Info Auth. Config Limit. Allow. Override None. Controls who can get stuff from this server. Order allow,deny. Allow from 1. 0. 0. Directory. This allows access from all computers in the address range. At the end of the file, include a Subversion configuration file. We. will create this file in one of the next steps. Include c etcsubversion. We place the subversion. Step 3. Our decision was that anonymous access to repositories will not be allowed. Also, we would. like that only the developers working on a specific project, can modify the contents of that. All other developer will have read only permissions to all projects. After all, we want our developers to share their code, dont we. So first, we create a password file for authentication. All the developers that will use our. Subversion server must chose a user name and a password. Unfortunately, the simplest way to do. In the best tradition of Subversion book, let us name our developers. Harry and Sally. Since we have two projects, well have a somewhat bigger development department, adding. Ross and Rachel to our list of employees. C Program FilesApache Software FoundationApache. C etcsvn auth file harry. C Program FilesApache Software FoundationApache. C etcsvn auth file harry. New password. Re type new password. Adding password for user harry. C Program FilesApache Software FoundationApache. C etcsvn auth file sally. New password. Re type new password. Adding password for user sally. C Program FilesApache Software FoundationApache. C etcsvn auth file ross. New password. Re type new password. Adding password for user ross. C Program FilesApache Software FoundationApache. C etcsvn auth file rachel. New password. Re type new password. Adding password for user rachel. Working with AVR microcontroller Communication Port Project. Back in the old days the COM port or known as RS 2. EIA 2. 32 standard is one of the essential communications protocol and hardware use in many computer system installation start from small UNIX machine to the mainframe. The RS 2. 32 protocol is used by terminal such as wyse. DEC vt. 10. 0 which connected through direct cable or modem to the UNIX host or legacy system. Actually you could still tracked this history in the etctermcap file on many modern Linux distribution later on I will use this table in our project for some terminal commands information. Today the used of this port is being replaced by the Ethernet protocol and hardware for connecting to the legacy system most PCs and notebooks nowadays has replaced this port with the USB Universal Serial Bus. But in the embedded world the RS 2. In the microcontrollers world, we usually process just a small amount of data, therefore the RS 2. The RS 2. 32 devices will transmit or receive the data in the serial form and use the voltage level to differentiate between the logical 0 called Space 3 Volt to 2. Volt and the logical 1 called Mark 2. Volt to 3 Volt as seen from this following RS 2. The voltage level between 3 Volt to 3 Volt relative to the ground is considered undetermined condition. Every data transmitted or received has the format form of start bit, data bit, parity bit and stop bit the mostly used configuration with the microcontroller is 1 start bit, 8 data bit with no parity bit and 1 stop bit. The transmission speed is measured in BAUD RATE which equal to the number of bit per second for the RS 2. For example the speed of 1. Because of the different voltage level between RS 2. TTLCMOS logic used in AVR microcontroller therefore we use the voltage level shifter circuit to interface this two world. The following diagram is the commonly used circuit for this purpose the first one use two transistors Figure 1. A and the second one use the Dallas Semiconductor MAX 2. Figure 1. B For the purpose of this project I will use this following hardware and software 1. AVRJazz Tiny. Atmel AVR ATmega. Dallas Semiconductor MAX 2. RS 2. 32 voltage level shifter. Win. AVR for the GNUs C compiler. Atmel AVR Studio 4 for the coding, compiling and debugging environment. Osp. Avr. II ver 5. Programmer from Mike Henning. The complete schema for our project The C code for our example is a simple guessing game using the Cs rand function to generate the random number to be guessed by the player. This game will use the windows terminal emulation which connected to the computer COM port for demonstrating the Atmel AVR ATmega. UART universal asynchronous receive and transmit communication capabilities. File Name Mega. Rs. 23. 2. c. Version 1. Description AVR ATMega. UART. Authors RWB. Targets AVR ATmega. Microcontroller. Compiler AVR GCC 4. Win. AVR 2. 00. 80. IDE Atmel AVR Studio 4. Programmer AVRJazz Tiny. Avr. Osp. II. BAUDRATE 1. 92. MAXGUESS 1. 0define LEDPORT PORTD. LED PD7. define OVFTIMES 2. ISRTIMER0OVFvect. Count1 i. Count. Count OVFTIMES. LEDPORT 1lt lt LED. LEDPORT 1lt lt LED. UBRRH FCPUBAUDRATE1. UBRRL FCPUBAUDRATE1. Enable Tx and Rx. UCSRB 1lt lt RXEN1lt lt TXEN Set Frame Data 8 Bit, No Parity and 1 Stop Bit. UCSRC 1lt lt URSEL1lt lt UCSZ11lt lt UCSZ0. FILE tream. if ch n. UCSRA 1lt lt UDRE. UDRch return 0. FILE tream. unsigned char ch while UCSRA 1lt lt RXC. Echo the output back to the terminal. ANSI clear screen clEHEJ. H. putchar. J. void ansimevoid. ANSI turn off all attribute meE0m. ANSI cursor movement clErow col. H. putchar. printfd,row. H. int randomnumbervoid. Assign IO stream to UART. FILE uartstr FDEVSETUPSTREAMuartputch, uartgetch, FDEVSETUPRW int mainvoid. Define OutputInput Stream. Initiatl UART. Initial TIMER0. TCCR01lt lt CS0. CS0. 0 Use maximum prescale Clk1. TCNT00 Start counter from 0. TIMSK1lt lt TOIE0 Enable Counter Overflow Interrupt. Enable Global Interrupt Initial Terminal. Clear Screen Initial Port D. DDRD 0x. FF Initial PORT D. PORTD 0 Turn Off All PORT D Initial Variable Used. MAXGUESS. secretrandomnumber for. MAXGUESS. ansicl. Welcome to Atmel AVR ATMega. Microcontroller RS2. Project. ansicm2,1. I have a secret number between 0 to 9. You have d times to guess my secret numbernn,turn. Enter your Number ,turn. Your number d is higher then mine Your number d is lower than mine Congratulation you found my secret number d in d times n,i,MAXGUESS turn. MAXGUESS. delayms2. You failed, my secret number is d n,secret. MAXGUESS. delayms2. Standard Return Code. On this project I will use ATMega. Timer. 0 peripheral to blink the LED. The LED will be act as the programs life beacon. Therefore as log as the LED is blinking we can assure that our program is working properly. Ok lets move on to the projects C code explanation A. The ATmega. 8 UART implementation. The UART implementation is consists of three functions uartinit Initial the ATMega. UART peripheral, this will set the RS 2. Baud Rate, Data Length, Parity and Stop Bituartputch This routine will put the character directly into the UART portuartgetch This routine will read the character from the UART port. A. 1. UART initiation. The initiation of UART peripheral in ATmega. AVR ATmega. 8 datasheet on page 1. UBRRH register for the high order bits and in the UBRRL register for the low order bits according to this following formula For asynchronous normal operation mode at 1. ATmeg. 8 internal frequency oscillator of 8 Mhz, the UBRR value will be UBRR 8. The UBRR is the content of both UBRRH and UBRRL registers and must be integer from 0 to 4. In order to get the high order bits from the formula result, we have to shift 8 times to the right before assign the value to UBRRH register, while for the low order bits it will automatically cast or trimmed to the 8 bit in UBRRL register see the datasheet on page 1. UBRRH FCPUBAUDRATE1. UBRRL FCPUBAUDRATE1. Or you could simplified as. UBRRH 0. UBRRL 2. But using the first statements to assign the UBRR value to both UBRRH and UBRRL registers will be more practical because it will work in any frequency oscillator and baud rate we choose. The next step is to enable both transmit and receive port which is PIN 2 and PIN 3 in ATmega. RXEN and TXEN in the UCSRB register see the datasheet on page 1. UCSRB 1lt lt RXEN1lt lt TXEN Because we are not using the UART interrupt for both receive and transmit we just clear assigned to logical 0 the RXC1. E, TXC1. E and UDRIE bits. The RXB8 and TXB8 is use for 9 bit data length so we also clear these two bits. And the last one is to choose the RS 2. UCSRC register see the datasheet on page 1. UCSRC 1lt lt URSEL1lt lt UCSZ11lt lt UCSZ0 With this statement we set the following RS2. URSEL 1 for writing in UCSRC register. UMSEL 0 select asynchronous mode operation. UPM1 0 select parity mode disable. USBS 0 select 1 stop bit. UCSZ2 0 from UCSRB register select 8 bit data length. UCPOL 0 not use, it use for synchronous mode operationA. UART Transmitting Data function. Sending a data is simply putting the data into the USR register, but before assigning data to this register, we have to examine the UART data register empty UDRE flag status in the UCSRA register. This can be accomplished by using while statement to continuing loop as long as the UDRE bit status is 0 and when the UART is ready for transmitting the UDRE bit will be set to 1 and the while loop statement will terminated. UCSRA 1lt lt UDRE. UDRch The first two statements inside this function is used to automatically append a line feed ASCII code 1. ASCII code 1. 3. A. 2. UART Receiving Data function.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |