Set up an ACE log server on Ubuntu11.04

Source: Internet
Author: User
Download the source code to/usr/local/src: wget-cftp: // example Download source code

Download the source code to/usr/local/src:
Ftp://download.dre.vanderbilt.edu/previous_versions/ACE-6.0.3.tar.gz wget-c
Tar-zxvf ACE-6.0.3.tar.gz
Sudo chmod-R 777./ACE_wrappers/

Install required Libraries

Sudo apt-get install build-essential
Sudo apt-get install libssl-dev
Ln-s/usr/lib/libssl. so.0.9.8b/lib/libssl. so.0.9.8b
Sudo apt-get install automake
Sudo apt-get install libtool

Compile in traditional mode

I have compiled both methods. After experiment, the traditional build method is reliable. For details about the compilation method, refer to the following:
Http://www.dre.vanderbilt.edu /~ Schmidt/DOC_ROOT/ACE/ACE-INSTALL.html # unix
The environment variables set under Ubuntu are different ~ /. Bashrc file Configuration:
Export ACE_ROOT =/usr/local/src/ACE_wrappers
Export PATH = "$ ACE_ROOT/bin: $ PATH"
Export ACE_INCLUDE =/usr/local/include/ace
LD_LIBRARY_PATH = $ ACE_ROOT/lib:/usr/lib
Export LD_LIBRARY_PATH

Then run source ~ /. Bashrc takes effect.

Note: add a line in the $ ACE_ROOT/include/makeinclude/platform_macros.GNU file:
INSTALL_PREFIX =/usr

These libraries are installed in the/usr directory to facilitate other programs.

When you make install, a message is displayed, indicating that the/usr/include,/use/share,/usr/lib directory permission is missing. For example:
Sudo chmod-R 777/usr/include

Execute make install (for UBuntu Desktop Users, do not use sudo)

Compile the LogServer Program

Cd/usr/local/src/ACE_wrappers/netsvcs make will show the ace_netsvcs program in servers.

Configure and run the log server

Assume that the log server runs on 192.168.30.16 and modify svc. conf file to write logs to the current directory. The file name is mm. log, in fact, is to modify the policy configuration of the first row dynamic Logger Service_Object * ACE: _ make_ACE_Logging_Strategy () "-w-s foobar-f VERBOSE | STDERR | OSTREAM-s mm. log"

Configure and run the client proxy service

Assume that your log client is located at 192.168.30.19. First, you need to run a netsvcs program, but modify the configuration file to make it a proxy and forward the log message to the log server on 30.16. By proxy, you can avoid the pressure on the log server caused by excessive connections. Then let's take a look at how to modify the svc. conf file. First, comment out the following line to prohibit it from being called a log server: # dynamic Server_Logging_Service Service_Object * netsvcs: _ make_ACE_Server_Logging_Acceptor () active "-p 20009"

Then add-h 192.168.30.16 in the following line to let the proxy know who to forward. Dynamic Client_Logging_Service Service_Object * netsvcs: _ make_ACE_Client_Logging_Acceptor () active "-p 20009-h 192.168.30.16"

Test Client

Run the client program on server 30.19 and you will see the log on server 30.16 later. Chenshu @ chenshu-ubuntu:/usr/local/src/ACE_wrappers/netsvcs/clients/Logger $./indirect_logging

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.