﻿1. Prerequisites and supported OS please refer to "Intallation guide" for detail.
   For RHEL, you need to install below software first
       $ sudo yum install openssl-devel libcurl-devel protobuf-devel
	   $ sudo yum install yum-utils.noarch
       $ sudo yum install python

2. How to enable SGX PSW
   *Installation*
   2.1 On Intel-NEXT kernel, don't install SGX driver as Intel-NEXT has SGX kernel support.
	   On Legacy/Stock kernel, go to "Installer" folder, install Intel® SGX driver package using the following command:
		$ sudo ./sgx_linux_x64_driver.bin
          #The installer also loads the driver and sets it to auto-load when the system reboots.  

   2.2 Install Intel® SGX PSW packages using the following command:
       a. Add RPM local repository to your repository list
	      $ tar -xzvf sgx_rpm_local_repo.tgz
          $ sudo yum-config-manager --add-repo file://PATH_TO_LOCAL_REPO
            #Replace PATH_TO_LOCAL_REPO and LOCAL_REPO_ALIAS with proper path and name on your system

          $ sudo yum --nogpgcheck install libsgx-epid libsgx-uae-service libsgx-launch libsgx-urts

    *Uninstallation*
   2.3 PSW uninstallation
       $ sudo yum remove libsgx*
	   $ sudo yum remove sgx-aesm*
   
   2.4 Driver uninstallation
       $ sudo /opt/intel/sgxdriver/uninstall.sh