Install ace in Linux

Source: Internet
Author: User
Author: Yu Tao (yut616_at_sohu.com)

As mentioned in the installation instruction file “ace-install.html, there are very few Linux installation processes. It is mainly for UNIX and windows and has many manual configurations,
After the installation, the installation of unzip ace-install.html file has some impact on audio and video, because the main actions can be automatically completed by the installation script ACE-install.sh in the ace package,
Our main work is to directly handle this installation script.
1. installation environment:
For Linux 8.0
Aceinstallation package ace‑tao=ciao.tar.gz,
Http://deuce.doc.wustl.edu/Download.html, "latest beta Kit", beta is the latest version of ACE.
2. Installation Process:
Step 1
First, set the ace_root environment. command:
"VI/etc/profile"
Add four lines
Ace_root =/opt/ace
Export ace_root
LD_LIBRARY_PATH = $ ace_root/ACE: $ LD_LIBRARY_PATH
Export LD_LIBRARY_PATH

I am adding "Export path user ...." . Run/etc/profile once. command:
"Chmod 555/etc/profile"
"/Etc/profile"
In this way, we have set ace_root. You can run the following command to check whether ace_root has been set:
"Echo $ ace_root"
At this time, it is best to restart Linux once in reboot.

Step 2
Do not manually unbind the aceacrotao=ciao.tar.gz package. In particular, do not unlock it completely. You can see that the installation script will unbind it from us. If you unlock it all manually,
The installation script will delete your extracted directory! The only thing we need to do is to separate the ACE-install.sh installation script in the acemo-tao=ciao.tar.gz package and modify it.
We only need this file.

Use mkdir to create a directory, such as/home/My/ace. then, put your ace‑tao‑ciao.tar.gz in this directory (use the CP command to copy or move the MV command to this directory ). Note that this directory will be
You save ace‑tao‑ciao.tar.gz directory, installation script will come to this directory to find this file, this directory and ace_root is not the same, and the ACE-install.sh also mention
Do not set these two directories to the same directory. Ace_root will be our installation target directory.
Extract A single file ACE-install.sh from acew.tao=ciao.tar.gz:
"Tar-zxvf ace?tao=ciao.tar.gz ace_wrappers/ACE-install.sh"

After the solution is completed, a new sub-directory named "ace_wrappers" will be generated ". At this point you can first move the ACE-install.sh to the external directory:
"MV/ace_wrappers/ACE-install.sh ."
"." Indicates the current directory. Of course, ACE-install.sh in what path is no impact, because we want to modify the content of the ACE-install.sh, there are a lot of paths to modify.

Well, now there is a ACE-install.sh in/home/My/ace, we now use VI to modify it, you can back up one before modification. Command:
"CP ACE-install.sh Co., ACE-install.sh.bak"
VI ACE-install.sh"

We can see that the default file is used for installation in UNIX. So we need to replace the Unix-related part with Linux.
Find "my_acedir =$ {home}/aceconfig", change it to the directory of the "my_acedir =/home/My/Hangzhou" file, and then remove the comment.
Next, find "my_ace_config = config-sunos5.4-sunc ++-4. x. H" and change it to "my_ace_config = config-linux.h", which is changed
Configuration file.
Change "my_ace_gnu_macros = platform_sunos5_sunc ++. GNU" to "my_ace_gnu_macros = platform_linux.gnu ". This is a variety of operating systems
The GNU macro file settings under the platform.
Okay. After the file is modified, save the file and exit ": WQ ".

Step 3
Now we can install ace.
In the/home/My/ace directory, run the following command:
/ACE-install.sh
It will take a long time to unpack and compile. This process will not cause any errors, because the installation script will do a lot for us, such:
Generate config. h and generate platform_macros.gnu.
We recommend that you manually change the content as described in ace-install.html:
No need to connect "ln-s config-sunos5-sunc ++-4. x. h config. H ", the installation script will be ready for us; (Subject: There is no file connection in windows, so you have to generate your own
A config. h file, and then add a "# include" ACE/config-win32.h "" in it "".)
You do not need to connect "ln-s platform_sunos5_sunc ++. GNU platform_macros.gnu ".

If an error occurs during compilation, such as ".. /apps/gperf. Edit the makefile under $ ace_root/apps and comment out the "gperf" section. This is just an example. You can skip compiling it.
To emphasize that the installation with ACE-install.sh will compile ace, tests, apps and so on. Finally, libace. So, tests, and apps are generated, and many compiled files are generated.
Of course, if you only download a single package such as ace.tar.gz for installation, You can manually modify the file and make it again. Because only ace compilation is required, much less work will be done, and it is acceptable to do it manually.

Step 4
Let's write a simple example to see if Ace can work. We can take the central part of "Ace" from "www.flyingdonkey.com ".ProgramProducers and consumers
To try. This program is based on ace_task and runs comfortably with multiple threads (CodeIn chapter 1, there are about 57 pages ).
We want to compile this hello. cpp example. First, we need to copy a makefile from the example directory of an ace to facilitate compilation. For example
$ Ace_root/examples/rmcast/send_file copies its makefile. Modify the output file name "bin = hello" and
"Sender. cpp" next to ". OBJ/sender. O. OBJ/sender. So. shobj/sender. So: sender. cpp"
To "Hello. cpp ". The "handler. cpp" section is deleted.
Well, we can compile an ace program of our own. Just make. The generated execution file hello is about KB. Run "./Hello ",
When the producer and consumer send messages to each other and the running information is continuously output, it looks pretty exciting.

The installation is complete. Thank you for reading.
You are welcome to repost it, but please indicate the source. I would like to thank superkun (superkun_at_sina.com) for its great help.

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.