开发者

How to setup Yaws webserver on Ubuntu Server 10.10?

I would like to develop some web applications using Erlang and the Yaws webserver. But I'm having problem with setting up Yaws on Ubuntu Server 10.10.

First I updated my Ubuntu system with:

sudo apt-get update
sudo apt-get upgrade

Installing Yaws with apt-get

I installed Yaws with apt-get:

sudo apt-get install yaws

But when I run Yaws with yaws -i I get this error message:

Ya开发者_运维知识库ws: Bad conf: "Can't find config file "

Then I tried to start Yaws with yaws -i --conf /etc/yaws/yaws.conf but then I got this error message:

Yaws: Bad conf: "Can't open config file /etc/yaws/yaws.conf"

I guess there is some problems with the file permissions.

Installing Yaws using the latest stable build

Now I tried to install Yaws using the latest stable build:

 wget http://yaws.hyber.org/download/yaws-1.89.tar.gz
 tar xfz yaws-1.89.tar.gz
 sudo apt-get install gcc
 cd yaws
 ./configure && make

But then I get errors during compilation:

epam.c:2: fatal error: pam_appl.h: No such file or directory
compilation terminated.
make[1]: *** [epam.o] Error 1
make[1]: Leaving directory `/home/jonas/yaws-1.89/c_src`
make: *** [all] Error 1

How can I install Yaws webserver on Ubuntu Server 10.10?


Not sure what version of Yaws apt-get will give you, so I recommend always installing the latest stable build from the Yaws website. Before you attempt to build it, though, make sure you first install the build dependencies for Yaws:

$ sudo apt-get build-dep yaws

Assuming you already have Erlang installed, you should then be able to successfully configure and make the latest stable build.

You can always visit the Yaws Build Config and Run page for general build and install information.


You have to edit /etc/yaws/yaws.conf with text editor, you must be root. Don't forget about /etc/yaws/conf.d/ directory, especially about the servers names. Uncomment "id = debian_yaws" (or similar) - will be easier to shut down the server.
To check config run server with: yaws If everything is OK, run server as daemon: yaws -D -heart Important - check if there are some hidden files in directory after edition config files! This can be old versions of config files - this must be deleted!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜