package-management.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:46:36 +0200
changeset 1905 fba288d59662
parent 1894 2e3bc2435d68
child 1912 8b81a8f0f692
permissions -rw-r--r--
Include only local subsections into TOC. This prevent duplication of TOC when build single page HTML document. Also this make unnecessary CSS hack to hide document title as top level section.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     1
.. -*- coding: utf-8; -*-
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     2
.. include:: HEADER.rst
42
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     4
====================
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     5
 Package management
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     6
====================
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     7
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1894
diff changeset
     8
   :local:
42
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    10
Local install with root permission
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    11
==================================
42
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
Если вы root то по Linux FHS ставим в /opt.
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
Смотри:
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
  http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
Не забываем обновить переменную окружения PATH!
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    20
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    21
Local install without root permission
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    22
=====================================
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    23
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    24
Лучшим решением, если у Вас нету прав root, будет установить ее в домашнем
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    25
каталоге. Тут дело личных предпочтений. У меня это ~/usr.
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    26
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    27
Если программа в бинарном виде - просто распаковываем::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    28
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    29
  $ cd /your/temp/dir
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    30
  $ gzip -d -c prog.tar.gz | tar xf -
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    31
  $ mv prog/* ~/usr
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    32
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    33
Если программу придестя собирать из исходников, почти всегда можно указать ключ
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    34
``--prefix``::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    35
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    36
  $ configure --prefix=$HOME/usr
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    37
  $ make
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    38
  $ make install
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    39
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    40
Обычно run-инсталляторы разархивируют содержимое в ``$PWD/$pkg``. В любом
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    41
случае::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    42
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    43
  $ ./nvidia-driver-1.2.9.run --help
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    44
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    45
Show all installed packages
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    46
===========================
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    47
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    48
RPM based package manager::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    49
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    50
  $ rpm -qa
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    51
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    52
DEB based package manager::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    53
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    54
  $ dpkg -l
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    55