Install and configure ACE in Linux

Source: Internet
Author: User

This article describes in detail how to install and configure an "Adaptive Communication Environment (ACE)" on a Linux operating system and the precautions.
The description in this article is based on RedHat Linux 9 Operating System and ACE 5.4

Preparations:

1. Ensure the development environment (gcc, make…) of your Linux operating system ......) Is complete and available.
2. root permissions may be required during ACE installation, so make sure you have the password for the root account.
3. For a typical Redhat9 system, the autoconf program version may be too low. You need to upgrade it first.

 

The upgrade procedure is as follows:

Enter autoconf-V in the console to view the version of your autoconf program.
If it is less than 2.57 GB, you need
Compile and install the autoconf program according to the installation instructions in the tarball.

Start installation:

After the above preparations, you have now met the conditions for installing ACE. Next we will start the installation.

First, determine the installation path of ACE and create the corresponding directory.
Here, we install ACE in the/home/zhc/ace/directory, first execute
Mkdir/home/zhc/ace
Then, extract the obtained ACE source code package to this directory.
Tar zxvf ACE-5.4.tar.gz/home/zhc/ace
At this time, a subdirectory named ACE_wrappers will be created under the ace directory, where all the source code, tools, and examples of ACE are located.

 

Set ACE_ROOT environment variables:
ACE_ROOT =/home/work/research/ace/ACE_wrappers
Export ACE_ROOT

Set the LD_LIBRARY_PATH environment variable:
LD_LIBRARY_PATH = $ ACE_ROOT/ace: $ LD_LIBRARY_PATH
Export LD_LIBRARY_PATH

First enter the Directory and run
Cd/home/zhc/ace/ACE_wrappers
Create a sub-directory to store the destination file after Ace compilation.
Mkdir build
Cd build

Then, execute the configure script, check your system environment, configure and generate makefile files suitable for your system.
During configurescript execution, you can add multiple configuration items. For more information, see the ace-install.html file in the ace_wrappersdirectory,
For the redhat9 system, Ace can work well without adding any parameters.
../Configure
After a long check and configuration, if there is no problem, you can start compiling.
This step is simple.
CD/home/zhc/ACE/ace_wrappers
Make or make-J5
Then, make a cup of tea and wait quietly.
If the compilation succeeds (usually this is the case), congratulations, you have succeeded,

 

The following is just a bit of configuration work.
The next step is installation. This step is optional. The purpose is to install the compiled ace library files, header files, and manual pages in the corresponding directory of/usr/local, for future convenience, we recommend that you perform this step.
Su
Root's password
Make install

After the installation, we can perform the final configuration.
First, set the environment variable ace_root and run
Setenv ace_root/home/zhc/ACE/ace_wrappers
Note that the path depends on your actual situation.
If you do not want to manually set the path every time, you can edit your Bash configuration file and execute
CD
Vi. bash_profile

Add the following two lines
Ace_root =/home/work/research/ACE/ace_wrappers
Export ace_root

Then, create a file named config. h In the $ ace_root/ace Directory, which contains the following line
# Include "ACE/config-linux.h"
Or, for simplicity, you can also directly create a symbolic link pointing to the config-linux.h and execute
Ln-s config-linux.h config. h
Similarly, create a file named platform_macros.gnu in the $ ace_root/include/makeinclude Directory, which contains the following line
Include $ (ace_root)/include/makeinclude/platform_linux.gnu
Alternatively, you can directly create a symbolic link pointing to platform_linux.GNU to execute
Ln-s platform_linux.gnu platform_macros.gnu
The last step is to set the environment variable LD_LIBRARY_PATH and run
Setenv LD_LIBRARY_PATH $ ACE_ROOT/ace: $ ACE_ROOT/lib:/usr/local/lib: $ LD_LIBRARY_PATH
Or in ~ /. Add the following two lines to the bash_profile file:
LD_LIBRARY_PATH = $ ace_root/ACE: $ ace_root/lib:/usr/local/lib: $ LD_LIBRARY_PATH
Export LD_LIBRARY_PATH

Installation completed:

After the above steps, ACE has been installed on your system. Next we will compile and execute the ACE routine to verify our work.
Here we take the example in "C ++ network programming, Volume 1" as an example.

Enter the routine directory and execute
CD $ (ace_root)/examples/C ++ npv1
Compile and execute the example Program
Make
If the preceding installation and configuration are correct, the compiled example program will soon be available.
Run one server program (any one) and one client program (Logging_Client) respectively. If the program runs correctly, the preceding installation and configuration are successful, now you can start your ACE learning journey.

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.