Install ace in Linux

Source: Internet
Author: User

Author: relaxation (zhangchi@bnchina.com)

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:

  1. Enter Autoconf-V in the console to view the version of your Autoconf program.
  2. If it is less than 2.57 GB, you need
  3. 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.

  1. 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
  2. Then, extract the obtained ace source code package to this directory.
    Tar zxvf ACE-5.4.tar.gz/home/zhc/ace
  3. 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.
    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
  4. 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
  5. After a long check and configuration, if there is no problem, you can start compiling.
    This step is simple.
    Make
    Then, make a cup of tea and wait quietly.
  6. If the compilation passes smoothly (usually this is the case), congratulations, you have already completed most of the work. The following is just a bit of configuration work to be done.
    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
  7. 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
  8. 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
  9. 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
  10. 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.

  1. Enter the routine directory and execute
    CD $ (ace_root)/examples/C ++ npv1
  2. Compile and execute the example Program
    Make
    If the preceding installation and configuration are correct, the compiled example program will soon be available.
  3. 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.