Installing Apache
Here the basics of installing Apache are outlined.
1.
Acquire the Apache software from the CD, local file system, or the Inter-
net.
2.
Unzip the distribution: gunzip apache_1.3.27.tar.gz.
3.
Un-tar the archive: tar xvf apache_1.3.27.tar.
4.
Change into the newly created directory: cd apache_1.3.27.
5.
Run the configuration script making sure you specify your home directory
as the prefix. In this case, it is also a good idea to put Apache in its
own, separate directory like this: ./configure --with-port=[portnumber]
where [portnumber] is the port number assigned to you -
-prefix=/home/[username]/apache where [username] is your username
6.
After the configuration files are created, make the server: make.
7.
Finally, install: make install.
8.
Should now be able to start the server: ~/apache/bin/apachectl start.
9.
Verify that the server is working by connecting to it with your Web
browser. The server's URL will be a combination of the IP address of your
hosting computer and the value of Port described in Step #5, such as:
http://127.0.0.1:8080/.
Now, create your own home page.
1.
Copy the file named home.htm from the CD's extras directory to Apache's
htdocs directory. The command will look something like this: cd home.html
~/apache/htdocs.
2.
Take a look at the new file: more home.html.
3.
View the home page in your Web browser with a URL looking something like
this: http://127.0.0.1:8080/home.html.
4.
Open home.html with your text editor: pico home.html.
Chapter 6. Hands-on activities
33
5.
Season (edit) it to taste and save the changes: ctrl-X.
6.
Reload the home page: http://127.0.0.1:8080/home.html.
CVS
In this exercise you will install CVS.
1.
Acquire the CVS "distro" from the Internet, CD, or local file system.
2.
Use the usual technique for unpacking, making, and installing the applica-
tion: gunzip cvs-1.12.1.tar.gz; tar xvf cvs-1.12.1.tar; cd cvs-1.12.1;
./configure --prefix=/home/[username] where [username] is your username;
make; make install.
While the syntax is a bit confusing, retrieving a CVS repository is not too
difficult.
1.
Log into a repository, such as the one for MyLibrary: cvs -d
:pserver:anonymous@dewey.library.nd.edu:/usr/local/cvsroot login
2.
When prompted for a password, simply press return because the user anony-
mous does not have a password.
3.
Download the repository: cvs -d
:pserver:anonymous@dewey.library.nd.edu:/usr/local/cvsroot checkout MyLi-
brary.
4.
In this exercise you will edit a file from the repository and create a
"patch".
5.
Use your favorite editor to change the contents of any text file in the
repository: pico ChangeLog.
6.
Save your changes: ctrl-X.
7.
Create a "diff" file or patch: cvs diff -u ChangeLog > patch.txt
8.
Take a look at the patch. It is the file you would send to the developer
for inclusion into the repository: more patch.txt.
Do'stlaringiz bilan baham: |