Solaris

use the event ports in nginx

Posted on

Solaris have since version 10 a new polling infrastrucutre Event Ports here a more detailed article about Event Completion Framework. Adam Leventhal wrotes in his Blog for him this is one of the top 20 best thing in Solaris 10.

By default nginx do not use this event methode due to the fact that there was some security related problems Security Vulnerabilities in The Solaris Event Port API May Result in a Denial of Service (DoS) Condition andΒ  Vulnerability in the Solaris 10 Event Port Implementation May Lead to a System Panic, Resulting in a Denial of Service (DoS) if you have a newer Version or applied the Patch you should use the event ports in nginx.

You only need to add

use eventport;

in the events { … } section. If you don’t add this then nginx by default us the /dev/poll method.

More about the possible polling methods can be found here.

Advertisements

haproxy on Opensolaris 2008.05

Posted on Updated on

When you want to build haproxy on Opensolaris 2008.05 you need the gcc and the gmake due to fact that the Sun CC does not support fully the C99 standard and the Makefile use GNU Make features.

I have tried to build haproxy with -xc99 but it was unable due the following code in src/client.c

/* Note: must not be declared <const> as its list will be overwritten */
static struct acl_kw_list acl_kws = {{ },{
{ “src_port”, acl_parse_int, acl_fetch_sport, acl_match_int },
{ “src”, acl_parse_ip, acl_fetch_src, acl_match_ip },
{ “dst”, acl_parse_ip, acl_fetch_dst, acl_match_ip },
{ “dst_port”, acl_parse_int, acl_fetch_dport, acl_match_int },
#if 0
{ “src_limit”, acl_parse_int, acl_fetch_sconn, acl_match_int },
#endif
{ “dst_conn”, acl_parse_int, acl_fetch_dconn, acl_match_int },
{ NULL, NULL, NULL, NULL },
}};

and some other code. I think SUN should make his cc compliant so that we are able to build haproxy with there compiler πŸ˜‰ . When you install the gcc and add the follwoing statement into the Makefile

-I$(PCREDIR)/include/pcre

in both *_PCRE sections then you are able to compile haproxy with the follwoing options

gmake -f Makefile TARGET=solaris USE_STATIC_PCRE=1 CPU=i686

for the final build you must rearrange the link line, this line works for me

gcc -g -o haproxy src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o src/time.o src/fd.o src/regex.o src/cfgparse.o src/server.o src/checks.o src/queue.o src/client.o src/proxy.o src/proto_uxst.o src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o src/senddata.o src/dumpstats.o src/proto_tcp.o src/session.o src/hdr_idx.o src/ev_select.o src/acl.o src/memory.o src/ebtree.o src/eb32tree.o src/ev_poll.o -L/usr/lib -Wl,-Bstatic -Wl,-Bdynamic -lnsl -lsocket -lpcreposix -lpcre

The point was, which looks to me, that the libs must be added as last options.

nginx build on opensolaris with SunStudio

Posted on Updated on

Today I was interested if the latest nginx (nginx-0.7.1) is able to build on the opensolaris box and YES it does πŸ˜‰

1.) get it

wget http://sysoev.ru/nginx/nginx-0.7.1.tar.gz

2.) extract it

gtar xfvz nginx-0.7.1.tar.gz

3.) build it

cd nginx-0.7.1 && ./configure –prefix=$HOME/servers/nginx –with-http_ssl_module –with-debug –with-cc=/opt/SunStudioExpress/bin/cc

It’s so easy, thanks Igor.

Open Solaris 2008.05

Posted on Updated on

Today I got the Opensolaris installation over the Virtualbox.

It looks much nicer with gnome but since Solaris 9 and 10 there was a lot of differences like nwamd and some other ‘typical’ Systemadmin commands.

I’am curious about the new features and handling πŸ˜‰