package-management.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:41:52 +0200
changeset 1903 901e7394849f
parent 1894 2e3bc2435d68
child 1905 fba288d59662
permissions -rw-r--r--
Decrease intent to increase space usage on mobile.
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::
42
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
     9
Local install with root permission
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    10
==================================
42
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
Если вы root то по Linux FHS ставим в /opt.
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
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
  http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
2146aa2221c0 prog install
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
Не забываем обновить переменную окружения PATH!
1894
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    19
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    20
Local install without root permission
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    21
=====================================
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
Лучшим решением, если у Вас нету прав root, будет установить ее в домашнем
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    24
каталоге. Тут дело личных предпочтений. У меня это ~/usr.
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    25
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
  $ cd /your/temp/dir
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    29
  $ 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
    30
  $ mv prog/* ~/usr
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    31
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
``--prefix``::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    34
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    35
  $ configure --prefix=$HOME/usr
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    36
  $ make
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    37
  $ make install
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    38
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    39
Обычно run-инсталляторы разархивируют содержимое в ``$PWD/$pkg``. В любом
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    40
случае::
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
  $ ./nvidia-driver-1.2.9.run --help
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    43
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    44
Show all installed packages
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    45
===========================
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
RPM based package manager::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    48
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    49
  $ rpm -qa
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    50
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    51
DEB based package manager::
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    52
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    53
  $ dpkg -l
2e3bc2435d68 Convert all files from TXT to RST.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 42
diff changeset
    54