インストールとアンインストール
本章では、インストーラーを使用したOFCOBOLのインストールとアンインストール、およびその確認方法について説明します。
1. インストール
OFCOBOLをインストールするためには、使用システムに適したインストーラー・バイナリ・ファイルが必要です。インストール中に前のステップへ戻るときは「back」を入力し、インストールを中止するときは、「quit」を入力してEnterキーを押します。
-
OFCOBOLをインストールするシステムの適切な場所にインストーラーのバイナリ・ファイルをコピーします。
-
インストーラー・バイナリへの実行権限が与えられていない場合は、以下のようにchmodコマンドを使って実行権限を付与します。
以下は、Linux 64ビット用のインストーラー・バイナリに実行権限を付与する例です。
$ chmod a+x OpenFrame_COBOL4_0_Linux_x86_64.bin
-
インストーラー・バイナリ・ファイルの実行方法には、以下の2つがあります。いずれかの方法を選択して、Enterキーを押します。
./OpenFrame_COBOL4_0_Linux_x86_64.bin sh OpenFrame_COBOL4_0_Linux_x86_64.bin
-
インストールの概要画面が表示されたら内容を確認し、Enterキーを押してインストールを進めます。
Preparing to install... Extracting the installation resources from the installer archive... Configuring the installer for this system's environment... Launching installer... Preparing CONSOLE Mode Installation... =============================================================================== OpenFrame COBOL (created with InstallAnywhere by Macrovision) ------------------------------------------------------------------------------- =============================================================================== Introduction ------------ InstallAnywhere will guide you through the installation of OpenFrame_COBOL3_0. It is strongly recommended that you quit all programs before continuing with this installation. Respond to each prompt to proceed to the next step in the installation. If you want to change something on a previous step, type 'back'. You may cancel this installation at any time by typing 'quit'. PRESS <ENTER> TO CONTINUE:
-
OFCOBOLライセンスの使用許諾画面が表示されます。
内容を確認して、同意する場合は「Y」、同意しない場合は「N」を入力し、Enterキーを押します。同意しない場合は、OFCOBOLのインストールは中止されます。
=============================================================================== License Agreement ----------------- Installation and Use of OFCOBOL Requires Acceptance of the Following License Agreement: TmaxSoft Release TmaxSoft Co., Ltd. (hereafter, TmaxSoft) End-User License Agreement Product : OpenFrame COBOL 4.0 This is a legal agreement between you (either an individual or an company) and TmaxSoft, Incorporated. By opening the sealed software package and/or by using the software, you agree to be bound by the terms of this agreement. TmaxSoft License 1. Grant of License: This TmaxSoft License Agreement ("License") permits you to use one copy of the TmaxSoft product Tmax, on any single computer, provided the software is in use on only one computer at any one time. If this package is a license pack, you may make and use additional copies of the software up to the number of licensed copies authorized. If you have multiple licenses for the software, then at any time you may have as many copies of the software in use as you have licenses. The software is "in use" on a computer when it is loaded into the temporary memory (i.e., RAM) or installed into the permanent memory (e.g., hard disk, CD-ROM, or other storage devices) of that computer, except that a copy installed on a network server for the sole purpose of distribution to other computers is not "in use". If the anticipated number of users of the software will exceed the number of applicable licenses, then you must have a reasonable PRESS <ENTER> TO CONTINUE: mechanism or process in place to ensure that the number of persons using the software concurrently does not exceed the number of licenses. 2. Copyright: The software (including any images, "applets," photographs, animations, video, audio, music and text incorporated into the software) is owned by TmaxSoft or its suppliers and international treaty provisions. Therefore, you must treat the software like any other copyrighted materials (e.g., a book or musical recording) except that you may either (a) make one copy of the software solely for backup or archival purposes, or (b) transfer the software to a single hard disk provided you keep the original solely for backup or archival purposes. You may not copy the printed materials accompanying the software, nor print copies of any user documentation provided in "online" or electronic form. 3. Other restrictions: This license is your proof of license to exercise the rights granted herein and must be retained by you. You may not rent, lease, or transfer your rights under this license on a permanent basis provided you transfer this license, the software, and all accompanying printed materials, retain no copies, and the recipient agrees to the terms of this license. You may not reverse engine, decompile, or disassemble the software, except to the extent that the foregoing restriction is expressly prohibited by applicable law. PRESS <ENTER> TO CONTINUE: DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N):
-
インストール・セットを選択します。デフォルト値は、OpenFrame COBOLです。MFCOBOL用のプリプロセッサーのみインストールする場合は「2」を、NetCOBOL用のプリプロセッサーのみインストールする場合は「3」を選択して、Enterキーを押します。
=============================================================================== Choose Install Set ------------------ Please choose the Install Set to be installed by this installer. ->1- OpenFrame COBOL 2- Preprocessor for MFCOBOL (Only) 3- Preprocessor for NETCOBOL (Only) ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT :
-
インストール・ディレクトリの$FCOB_HOMEを指定します。デフォルト値を使用するときはEnterキーを押し、ディレクトリを変更したいときは、希望するインストール・パスを入力します。(デフォルト値:$HOME/OFCOBOL)
=============================================================================== Choose Install Folder --------------------- Where would you like to install? Default Install Folder: /home/oframe/OFCOBOL ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT :
入力したディレクトリがすでに存在している場合、それを上書きするときは「1」、別のディレクトリを入力するときは「2」、インストールを中止するときは「3」を選択してEnterキーを押します。
Directory Check User Specified Directory exists. To overwrite OFCOBOL, click 'Overwrite'. To choose a Different directory, click 'Change'. To cancel the installation, click 'Cancel'. ->1- Overwrite 2- Change... 3- Cancel ENTER THE NUMBER OF THE DESIRED CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:
-
インストールの状況を示すバーが表示され、インストールが行われます。
=============================================================================== Installing... ------------- [==================|==================|==================|==================] [------------------|--
-
インストールが完了すると、以下のようなインストール完了のメッセージが出力されます。Enterキーを押してインストールを終了します。
=============================================================================== Installation Complete --------------------- Congratulations. OFCOBOL has been successfully installed PRESS <ENTER> TO EXIT THE INSTALLER:
2. インストールの確認
OFCOBOLのインストールが完了したら、以下の方法で正常にインストールされたことを確認してください。
-
ログおよび環境設定の確認
-
ディレクトリ構造の確認
2.1. ログおよび環境設定の確認
以下は、ログおよび環境設定を確認する方法です。
-
以下の場所にあるファイルをテキスト・エディターで直接開いて、エラー・ログがないことを確認します。
$OFCOB_HOME/UninstallerData/log/OpenFrame_COBOL_InstallLog.log
-
.profileまたは.bash_profileファイルを開いて、以下のように環境変数が設定されているかを確認します。
# New environment setting added by OpenFrame_COBOL on Tue Mar 03 08:36:13 MSK 2015 1. # The unmodified version of this file is saved in /home/oframe/.bash_profile707936663. # Do NOT modify these lines; they are used to uninstall. OFCOB_HOME=/home/oframe/OFCOBOL export OFCOB_HOME # End comments by InstallAnywhere on Tue Mar 03 08:36:13 MSK 2015 1. # New environment setting added by OpenFrame_COBOL on Tue Mar 03 08:36:13 MSK 2015 2. # The unmodified version of this file is saved in /home/oframe/.bash_profile707936663. # Do NOT modify these lines; they are used to uninstall. PATH="${PATH}:$OFCOB_HOME/bin:" export PATH # End comments by InstallAnywhere on Tue Mar 03 08:36:13 MSK 2015 2. # New environment setting added by OpenFrame_COBOL on Tue Mar 03 08:36:13 MSK 2015 3. # The unmodified version of this file is saved in /home/oframe/.bash_profile707936663. # Do NOT modify these lines; they are used to uninstall. LD_LIBRARY_PATH=$OFCOB_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH # End comments by InstallAnywhere on Tue Mar 03 08:36:13 MSK 2015 3. # New environment setting added by OpenFrame_COBOL on Tue Mar 03 08:36:13 MSK 2015 4. # The unmodified version of this file is saved in /home/oframe/.bash_profile707936663. # Do NOT modify these lines; they are used to uninstall. OFCOBCPY="${OFCOBCPY}:$OFCOB_HOME/copybook" export OFCOBCPY # End comments by InstallAnywhere on Tue Mar 03 08:36:13 MSK 2015 4.
2.2. ディレクトリ構造
OFCOBOLをインストールした場合とプリプロセッサーのみをインストールした場合に生成されるディレクトリ構造は異なります。
-
OFCOBOLをインストールした場合
以下は、OFCOBOLをインストールした後に生成されるディレクトリ構造です。
$OFCOB_HOME +---- UninstallerData +---- bin +---- cobolparser +---- bin +---- lib +---- config +---- copybook +---- include +---- lib +---- license +---- llvm +---- sample
-
プリプロセッサーのみインストールした場合
以下は、プリプロセッサーのみをインストールした後に生成されるディレクトリ構造です。
$OFCOB_HOME +---- UninstallerData +---- bin +---- cobolparser +---- bin +---- lib +---- include +---- lib +---- sample
以下は、各ディレクトリについての説明です。
- UninstallerData
-
システムにインストールされたOFCOBOLを削除するためのファイルが格納されています。
- bin
-
OFCOBOLで使用される各種の実行ファイルが格納されています。
- cobolparser
-
OFCOBOLで使用するCOBOLパーサーが格納されているディレクトリです。このディレクトリのサブディレクトリとしてbin、libがあります。
ディレクトリ名 説明 bin
COBOLパーサーで使用する実行ファイルが格納されています。
lib
COBOLパーサーで使用するライブラリ・ファイルが格納されています。
- config
-
OFCOBOLのコンパイル・オプションを設定できる設定ファイルが格納されています。
- copybook
-
OFCOBOLでコンパイル時に使用されるコピーブック・ファイルが格納されています。
- include
-
OFCOBOLでコンパイル時に使用されるヘッダー・ファイルが格納されています。
- lib
-
OFCOBOLで使用するライブラリ・ファイルが格納されています。
- license
-
OFCOBOLのライセンス・ファイルが格納されています。
- llvm
-
OFCOBOLで使用するLLVM関連ファイルが格納されています。
- sample
-
OFCOBOLのサンプル・ファイルが格納されています。
3. アンインストール
OFCOBOLのアンインストールは、$OFCOB_HOME/UninstallerDataディレクトリ内のUninstall_OFCOBOLを実行するか、あるいはコンソール・コマンドを使ってインストール・フォルダーを削除する方法で行います。後者の方法でインストール・フォルダーを削除した場合は、ユーザーの.profileまたは.bash_profileの設定をインストール前の状態に戻す必要があります。
以下は、Uninstallファイルを使用してOFCOBOLをアンインストールする手順です。
$./Uninstall_OFCOBOL Preparing CONSOLE Mode Installation... =============================================================================== OpenFrame COBOL (created with InstallAnywhere by Macrovision) ------------------------------------------------------------------------------- =============================================================================== Uninstall OFCOBOL ----------------- About to uninstall... OFCOBOL This will remove features installed by InstallAnywhere. It will not remove files and folders created after the installation. PRESS <ENTER> TO CONTINUE: =============================================================================== Uninstalling... --------------- ...* * ************************* ************************* ************************* ************************ ...* * ************************* ************************* ************************* ************************* =============================================================================== Uninstall Complete ------------------ All items were successfully uninstalled.
4. アンインストールの確認
以下の方法で、OFCOBOLが正常にアンインストールされたことを確認します。
-
ファイルとフォルダーの確認
インストーラーで指定したインストール・ディレクトリが完全に削除されたことを確認します。インストール時に生成されるディレクトリ構造のほかに別のディレクトリを作成した場合には、そのディレクトリが残っている場合があります。これは異常なことではないので手動で削除してください。
以下の方法により、削除されていないディレクトリとファイルを削除します。
$ rm -rf OFCOBOL
-
環境設定ファイルの確認(.profileまたは.bash_profile)
インストール時に追加されたOFCOB_HOME、PATH、LD_LIBRARY_PATH、OFCOBCPYの設定項目が削除されたことを確認します。