Monday, June 9, 2008

compile lighttpd server from source

To install any server like 'lighttpd' for windows operating system we can download and install using .exe file.
Same way we could do it for other operating system [sun solaris, linux and mac]also. But for some specific distribution there won't be any executable version of software.

In this case, we can compile from source code and install the same.

I explained installation steps in the ubuntu[linux distribution] server.

Login as root.

There is two way to download the source code

1) Using terminal:
Copy the url of the software which we want to install. That might be any kind of compressed format. for ex:[tar.gz,tar.bz2,etc...] and use the following command
wget {URL}
this will downloads source code using terminal.
or
2) Using GUI
Click on download link and save to local file system.

Steps to compile and install:
i) Uncompress the file which one we downloaded. Using the following command in terminal
if downloaded file is .tar.gz format use tar -xzvf {downloaded file name}
if downloaded file is .tar.bz2 use tar -xjvf {downloaded file name}

ii) Get inside the folder and there is file named "configure" and type the following command
./configure
if we want install in any specific directory, mention directory using the following command.
./configure --prefix = {directory}.... [default installation directory is /opt/
]
The above command will configure the compilation environment.

iii) Type the following to compile
make
now source code compiled.

iv) To install
make install
Now server is installed and ready for you.

0 comments:

Post a Comment