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
Disable logs
Sometimes we need to disable logs. We can use the following macro (in cmake)
Add_definitions (-dace_nlogging)