页面

Thursday, April 26, 2012

Install C++ and license on AIX


Install C++ (version 7)


Smitty install_software
Successful installation should create /usr/vac, /usr/vacpp,
/usr/vac/bin/xlc


Install Licence

  1. Configure the License Server

export PATH=$PATH:/usr/opt/ifor/ls/os/aix/bin

# cd /var/ifor (/usr/opt/ifor/ls/os/aix/bin)
# i4cfg -stop
# i4cfg -script
i4cfg Version 4.6.8.10 AIX -- LUM Configuration Tool
(c) Copyright 1995-2007, IBM Corporation, All Rights Reserved
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.



From a License Management point of view,
you can choose to configure this system as:

1) Network License Client
2) Nodelock License Server (and/or Network License Client)
3) Network (and/or Nodelock) License Server
4) Central Registry (and/or Network and/or Nodelock) License Server (*)

(*) Remember that one and only one Central Registry License Server (i4gdb daemon) can be active
in a Licensing domain.


Please indicate your choice [1,2,3,4]: 2


Do you want to disable remote administration of this Nodelock License
Server? [y,n]: y

You have to choose now which mechanism must be enabled
to locate this License Server:

1) NCS Namespace and Direct Binding (*)
2) Direct Binding only

(*) WARNING: Modifying NCS Namespace configuration may affect
any other application that use NCS on this system.
NCS Namespace is necessary to sup1port old Netls, iFOR/LS Clients.

Please indicate your choice [1,2]: 2


Choose the desired Server(s) logging level
1) Default
2) All
3) Customized

Please indicate your choice [1,2,3]: 1

The default Log file(s) path is /var/ifor
Enter blank to accept default or specify a new path:

*******************************************************************************
Server configuratiaon is complete.

Do you want to modify the list of remote Nodelock and/or Network License Servers
this system can connect to in direct binding mode (both for
Administration purposes and for working as Network License Client) ? [y,n]: n

Do you want the License Server(s) automatically start on this system
at boot time? [y,n]: y
mkitab: 0481-205 The ident entry already exists in /etc/inittab.


*******************************************************************************
WARNING: Configuration is about to end.
This is your last chance to quit before your updates will be written.

Do you want to continue? [y,n]: y

*** Configuration file updated. ***


Do you want the License Server(s) start now? [y,n]: y
0513-059 The i4llmd Subsystem has been started. Subsystem PID is 4128968.

'Start Services' has completed successfully

****************************************
* Configuration completed successfully *


  1. Enroll the license:

# i4blt -a -f /usr/vac/cforaix_cn.lic -T 1 -R "XXX"
# i4blt -a -f /usr/vacpp/vacpp_cn.lic -T 1 -R "XXX"

( -T numbers of concurrent users
-R company information or Adminstrator )

Update the license number
# i4blt -U -v "'IBM Software Solutions Toronto'" -p "'IBM XL C/C++ for AIX' 7.0.cn" -T 1


  1. Verify the license:

# i4blt -s -lcn
i4blt Version 4.6.8.10 AIX -- LUM Basic License Tool
(c) Copyright 1995-2007, IBM Corporation, All Rights Reserved
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
(c) Copyright 1991-1997 Gradient Technologies Inc., All Rights Reserved
(c) Copyright 1991,1992,1993, Hewlett-Packard Company, All Rights Reserved

===========================================================================
=== P r o d u c t S t a t u s R e p o r t ===
===========================================================================

Vendor Name: IBM Software Solutions Toronto
Product Name: C for AIX
Product Version: 7.0.cn
License Type: Concurrent Node-Locked License(s)

---------------------------- Usage Information ---------------------------

Licenses In-Use Soft-Stop In-Use Not In-Use
-------- ------ ---------------- ----------
20 0.00 0.00 20.00

===========================================================================

Vendor Name: IBM Software Solutions Toronto
Product Name: IBM XL C/C++ for AIX
Product Version: 7.0.cn
License Type: Concurrent Node-Locked License(s)

---------------------------- Usage Information ---------------------------

Licenses In-Use Soft-Stop In-Use Not In-Use
-------- ------ ---------------- ----------
20 0.00 0.00 20.00

====================================
=== End of Product Status Report ===
====================================



  1. Test compile program using C++ complier

#vi hello.C
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}

# /usr/vacpp/bin/xlc++ -c -qinfo hello.C
# /usr/vacpp/bin/xlc++ -o hello hello.C

run complied program
# ./hello
Hello World!

Remove the enrolled License

In case you need remove the enrolled license, run following command:

#i4blt -d -v "'IBM Software Solutions Toronto'" -p "'C for AIX' 7.0.cn" -t 1091819355

#i4blt -d -v "'IBM Software Solutions Toronto'" -p "' IBM XL C/C++ for AIX ' 7.0.cn" -t 1091819260

Note: to find the timestamp, use #i4blt -lp -i

i4blt -d -v "'IBM Software Solutions Toronto'" -p "'C for AIX' 4.3.cn" -t 876751962


For GRL-2050: *** Fatal error from I4LLMD error when try to start license server,
cd /var/ifor
rm *.dat *.idx
i4cfg -start

No comments:

Post a Comment