bash -c 'cat << EOF > /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
EOF'
apt update
curl -o setup.sh -sL https://deb.nodesource.com/setup_20.x
chmod a+x setup.sh
./setup.sh
apt-get -y install nodejs
npm install -g n
n 20.11
apt install sqlite3 python build-essential cracklib-runtime -y
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' > /etc/apt/sources.list.d/intel-sgx.list
wget -O - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add -
apt update
apt install sgx-dcap-pccs
41f4802b1a564e7f8588ef840000c931
apt install dkms
wget https://download.01.org/intel-sgx/sgx-dcap/1.9/linux/distro/ubuntu20.04-server/sgx_linux_x64_driver_1.36.2.bin
chmod 755 sgx_linux_x64_driver_1.36.2.bin
./sgx_linux_x64_driver_1.36.2.bin
dmesg | grep sgx
echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list > /dev/null
wget -O - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add -
apt update
apt install sgx-pck-id-retrieval-tool
/opt/intel/sgx-dcap-pccs/pckcache.db
nano /opt/intel/sgx-pck-id-retrieval-tool/network_setting.conf
PCKIDRetrievalTool
apt-get install libsgx-urts libsgx-dcap-ql libsgx-dcap-default-qpl -y
nano /etc/aesmd.conf
sudo apt-get update
sudo apt-get install msr-tools
modprobe msr