LoginSignup
0
0

More than 3 years have passed since last update.

Ubuntu18.04LST セットアップ備忘録

Last updated at Posted at 2021-04-22

セットアップ

  • ipアドレスをGUIで固定しておく
  • PPTP接続の場合、DNSにPPPoEも指定する。
sudo apt update && sudo apt upgrade
sudo apt install openssh-server

Nvidia Driver & CUDA & CuDNN

  • セキュアブートをOther OSへ変更、セキュリティキーを削除しておく
  • 公式HPから、NVIDIAドライバをダウンロードしておく。
  • 公式HPから、インストールするCUDAバージョンにあったcuDNNをダウンロードしておく
# NVIDIA Driver ver.460.73.01
sudo apt install gcc make
sudo bash NVIDIA-Linux-x86_64-460.73.01.run

# CUDA ver.11.2.1
wget https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda_11.2.1_460.32.03_linux.run
sudo sh cuda_11.2.1_460.32.03_linux.run
echo '### CUDA Path ###' >> ~/.bashrc
echo 'export PATH="/usr/local/cuda/bin:$PATH"' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"' >> ~/.bashrc
source ~/.bashrc

# cuDNN ver.8.1.1.33-1
sudo dpkg -i libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
sudo dpkg -i libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
sudo dpkg -i libcudnn8-samples_8.1.1.33-1+cuda11.2_amd64.deb

パッケージ

# 各種パッケージのインストール
sudo apt install -y curl git vim swig \
    build-essential libssl-dev libffi-dev pkg-config ccache ecm mesa-utils \
    python3.7 python3.7-dev python3.7-tk python3.7-distutils \
    libopencv-dev libgl1-mesa-dev

# CMake
wget https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1.tar.gz
tar zxvf cmake-3.20.1.tar.gz
sudo mv ~/cmake-3.20.1 /opt/
cd /opt/cmake-3.20.1/
sudo ./bootstrap
sudo make && sudo make install

# PATHの追加
echo '### CMake ###' >> ~/.bashrc
echo 'export PATH=/opt/cmake-3.20.1/bin/:$PATH' >> ~/.bashrc
source ~/.bashrc

Python3.7

curl -kL https://bootstrap.pypa.io/get-pip.py | sudo python3.7

Docker & Docker Compose

別記事

SSHの公開鍵認証

  • id_rsa.pubをホームへコピー
# 鍵生成
ssh-keygen -t rsa

# 鍵の登録
cat id_rsa.pub >> ~/.ssh/authorized_keys

# 権限変更
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

# 設定の変更
sudo vi /etc/ssh/sshd_config

# 設定内容
ChallengeResponseAuthentication no
PasswordAuthentication no

# デーモンの再起動
sudo /etc/init.d/ssh restart

RDP

sudo apt install xserver-xorg-core xorgxrdp xrdp
sudo vi /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla

# 設定内容
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes

# サービスの再起動
systemctl restart polkit.service

Git

git config --global user.name "ユーザー名"
git config --global user.email メールアドレス
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0