ubuntu: update
$ sudo apt-get update $ sudo apt-get upgrade $ reboot
ubuntu-16.04-server-amd64: install
- ubuntu-16.04-server-amd64 をダウンロード
- unetbootin-windows-625.exeでインストールUSB作成
- 作成したUSBでPCを起動したが kernel panick で停止
- インストールCD を作成して起動
- Language:
English - ubuntu:
Install Ubuntu Server - Select a language:
English - English - Select your location:
other -> Asia -> Japan - Configure locales:
United States - en_US.UTF8 - Configure the keyboard:
No -> Japanese -> Japanese - Configure the network:
eno1: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe -> "ubuntu" - Set up users and password: Full name for the new user)
"username" - Set up users and password: Username for your account)
"username" - Set up users and password: Choose a password for the user)
"********" - Set up users and password: Re-enter password to veryfy)
"********" - Set up users and password: Encrypt your home directory?)
No - Configure the clock: your time zone is Asia/Tokyo
Yes - Partition disks: /dev/sda, Unmount partitions that are in use?
No - Partition disks: Partitioning method
Guided - use entire disk and set up LVM - Partition disks: Select disk to partition
SCSI1 (2,0,0) (sda) - 499.6 GB DELL PERC H310 - Partition disks: Write the change to disk and configure LVM?
yes - Installing the system...
- Configure the package manager: HTTP proxy information (blank for none)
Continue - Configuring tasksel: How do you want to manage upgrades on this system?
No automatic updates - Software selection: Choose software to install
[ ] Manual package selection
[ ] DNS server
[ ] LAMP server
[ ] Mail server
[ ] PostgreSQL database
[ ] Samba file server
[*] standard system utilities
[ ] Virtual Machine host
[ ] OpenSSH server - Install the GRUB boot loader on a hard disk: Install the GRUB boot loader to the master boot record?
yes - Finish the installation: Installation complete
Continue
参考
Linux Mint 17.3 Rosa: install python-opencv
[]$ sudo apt-get install python-opencv [sudo] password for user: パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下の特別パッケージがインストールされます: libopencv-photo2.4 python-numpy 提案パッケージ: gfortran python-nose python-numpy-dbg python-numpy-doc 以下のパッケージが新たにインストールされます: libopencv-photo2.4 python-numpy python-opencv アップグレード: 0 個、新規インストール: 3 個、削除: 0 個、保留: 0 個。 1,973 kB のアーカイブを取得する必要があります。 この操作後に追加で 10.4 MB のディスク容量が消費されます。 続行しますか? [Y/n] 取得:1 http://archive.ubuntu.com/ubuntu/ trusty/universe libopencv-photo2.4 amd64 2.4.8+dfsg1-2ubuntu1 [43.0 kB] 取得:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main python-numpy amd64 1:1.8.2-0ubuntu0.1 [1,603 kB] 取得:3 http://archive.ubuntu.com/ubuntu/ trusty/universe python-opencv amd64 2.4.8+dfsg1-2ubuntu1 [327 kB] 1,973 kB を 11秒 で取得しました (172 kB/s) 以前に未選択のパッケージ libopencv-photo2.4:amd64 を選択しています。 (データベースを読み込んでいます ... 現在 187889 個のファイルとディレクトリがインストールされています。) .../libopencv-photo2.4_2.4.8+dfsg1-2ubuntu1_amd64.deb を展開する準備をしています ... libopencv-photo2.4:amd64 (2.4.8+dfsg1-2ubuntu1) を展開しています... 以前に未選択のパッケージ python-numpy を選択しています。 .../python-numpy_1%3a1.8.2-0ubuntu0.1_amd64.deb を展開する準備をしています ... python-numpy (1:1.8.2-0ubuntu0.1) を展開しています... 以前に未選択のパッケージ python-opencv を選択しています。 .../python-opencv_2.4.8+dfsg1-2ubuntu1_amd64.deb を展開する準備をしています ... python-opencv (2.4.8+dfsg1-2ubuntu1) を展開しています... man-db (2.6.7.1-1ubuntu1) のトリガを処理しています ... libopencv-photo2.4:amd64 (2.4.8+dfsg1-2ubuntu1) を設定しています ... python-numpy (1:1.8.2-0ubuntu0.1) を設定しています ... python-opencv (2.4.8+dfsg1-2ubuntu1) を設定しています ... libc-bin (2.19-0ubuntu6.7) のトリガを処理しています ... []$
Check information
[]$ dpkg -l python-opencv 要望=(U)不明/(I)インストール/(R)削除/(P)完全削除/(H)保持 | 状態=(N)無/(I)インストール済/(C)設定/(U)展開/(F)設定失敗/(H)半インストール/(W)トリガ待ち/(T)トリガ保留 |/ エラー?=(空欄)無/(R)要再インストール (状態,エラーの大文字=異常) ||/ 名前 バージョン アーキテクチ 説明 +++-==============-============-============-================================= ii python-opencv 2.4.8+dfsg1- amd64 Python bindings for the computer []$
Linux Mint 17.3 Rosa: TensorFlow setup (Ubuntu/Linux 64-bit, CPU only)
Python のバージョン確認
[]$ python -V Python 2.7.6
Install pip
$ dpkg -l | grep python-dev ii libpython-dev:amd64 2.7.5-5ubuntu3 amd64 header files and a static library for Python (default) ii python-dev 2.7.5-5ubuntu3 amd64 header files and a static library for Python (default) []$ dpkg -l | grep python-pip ii python-pip 1.5.4-1ubuntu3 all alternative Python package installer ii python-pip-whl 1.5.4-1ubuntu3 all alternative Python package installer []$
Install TensorFlow (Ubuntu/Linux 64-bit, CPU only)
[]$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl : : Successfully installed tensorflow protobuf wheel numpy setuptools Cleaning up... []$
Run TensorFlow from the Command Line
[]$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf >>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() >>> print(sess.run(hello)) Hello, TensorFlow! >>> a = tf.constant(11) >>> b = tf.constant(43) >>> print(sess.run(a + b)) 54 >>> exit() []$
参考
Linux Mint 17.3 Rosa: package 更新
package list 更新
[]$ sudo apt-get update [sudo] password for *****: 無視 http://dl.google.com stable InRelease ヒット http://dl.google.com stable Release.gpg : : 無視 http://archive.ubuntu.com trusty/universe Translation-ja_JP 4,225 kB を 29秒 で取得しました (143 kB/s) W: 以下の鍵 ID に対して利用可能な公開鍵がありません: 1397BC53640DB551 W: http://dl.google.com/linux/chrome/deb/dists/stable/Release の取得に失敗しました 期待されるエントリ 'main/binary-i386/Packages' が Release ファイル内に見つかりません (誤った sources.list エントリか、壊れたファイル) E: いくつかのインデックスファイルのダウンロードに失敗しました。これらは無視されるか、古いものが代わりに使われます。 []$
鍵の更新
[]$ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
OK
[]$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1397BC53640DB551
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.dz80p7AJiV --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver keyserver.ubuntu.com 1397BC53640DB551
gpg: 鍵640DB551をhkpからサーバーkeyserver.ubuntu.comに要求
gpg: 鍵D38B4796:“Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>”変更なし
gpg: 処理数の合計: 1
gpg: 変更なし: 1
[]$
[]$ sudo apt-get update
[sudo] password for ****:
無視 http://dl.google.com stable InRelease
ヒット http://dl.google.com stable Release.gpg
:
:
無視 http://archive.ubuntu.com trusty/universe Translation-ja_JP
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release の取得に失敗しました 期待されるエントリ 'main/binary-i386/Packages' が Release ファイル内に見つかりません (誤った sources.list エントリか、壊れたファイル)
E: いくつかのインデックスファイルのダウンロードに失敗しました。これらは無視されるか、古いものが代わりに使われます。
[]$
設定ファイル書き換え
[]$ sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list" []$ sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/opt/google/chrome/cron/google-chrome" []$ []$ sudo apt-get update [sudo] password for ****: 無視 http://dl.google.com stable InRelease ヒット http://dl.google.com stable Release.gpg : : 無視 http://archive.ubuntu.com trusty/universe Translation-ja_JP パッケージリストを読み込んでいます... 完了 []$
package 更新
[]$ sudo apt-get upgrade : : アップグレード: 208 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。 322 MB のアーカイブを取得する必要があります。 この操作後に追加で 51.2 MB のディスク容量が消費されます。 続行しますか? [Y/n] : : 設定ファイル '/etc/issue' ==> これはインストールしてから (あなたかスクリプトによって) 変更されています。 ==> パッケージ配布元が更新版を提供しています。 どうしますか? 以下の選択肢があります: Y か I : パッケージメンテナのバージョンをインストールする N か O : 現在インストールされている自分のバージョンを残す D : 両バージョンの差異を表示する Z : 状況を調査するためにシェルを開始する デフォルトでは現在使っている自分のバージョンを残します。 *** issue (Y/I/N/O/D/Z) [デフォルト=N] ? 設定ファイル '/etc/issue.net' ==> これはインストールしてから (あなたかスクリプトによって) 変更されています。 ==> パッケージ配布元が更新版を提供しています。 どうしますか? 以下の選択肢があります: Y か I : パッケージメンテナのバージョンをインストールする N か O : 現在インストールされている自分のバージョンを残す D : 両バージョンの差異を表示する Z : 状況を調査するためにシェルを開始する デフォルトでは現在使っている自分のバージョンを残します。 *** issue.net (Y/I/N/O/D/Z) [デフォルト=N] ? 設定ファイル '/etc/lsb-release' ==> これはインストールしてから (あなたかスクリプトによって) 変更されています。 ==> パッケージ配布元が更新版を提供しています。 どうしますか? 以下の選択肢があります: Y か I : パッケージメンテナのバージョンをインストールする N か O : 現在インストールされている自分のバージョンを残す D : 両バージョンの差異を表示する Z : 状況を調査するためにシェルを開始する デフォルトでは現在使っている自分のバージョンを残します。 *** lsb-release (Y/I/N/O/D/Z) [デフォルト=N] ? : : done. done. initramfs-tools (0.103ubuntu4.3) のトリガを処理しています ... update-initramfs: Generating /boot/initrd.img-3.19.0-32-generic Warning: No support for locale: ja_JP.utf8
参考
Linux Mint 17.3 Rosa: バージョンを調べる
コマンド
[]$ lsb_release -a No LSB modules are available. Distributor ID: LinuxMint Description: Linux Mint 17.3 Rosa Release: 17.3 Codename: rosa []$
設定ファイル
[]$ cat /etc/lsb-release DISTRIB_ID=LinuxMint DISTRIB_RELEASE=17.3 DISTRIB_CODENAME=rosa DISTRIB_DESCRIPTION="Linux Mint 17.3 Rosa" []$