Next: Требования, Up: Установка [Contents][Index]
Этот раздел описывает, как установить Guix на обычную систему из отдельного архива, который содержит бинарники Guix и все его зависимости. Это обычно быстрее установки из исходных кодов, которая описана в следующем разделе. Единственное требование - иметь GNU tar и Xz.
Примечание: We recommend the use of this shell installer script. The script automates the download, installation, and initial configuration steps described below. It should be run as the root user. As root, you can thus run this:
cd /tmp wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh chmod +x guix-install.sh ./guix-install.shКогда закончите, вам может понадобиться see Установка приложения для дополнительной настройки и Начиная.
Установка производится следующими образом:
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.x86_64-linux.tar.xz
’,
where x86_64-linux
can be replaced with i686-linux
for an
i686
(32-bits) machine already running the kernel Linux, and so on
(see Дистрибутив GNU).
Убедитесь в аутентичности архива, скачав файл .sig и запустив:
$ wget https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.x86_64-linux.tar.xz.sig $ gpg --verify guix-binary-1.2.0.x86_64-linux.tar.xz.sig
Если это завершается ошибкой, значит у вас нет необходимого публичного ключа, тогда запустите команду для импорта ключа:
$ wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 \ -qO - | gpg --import -
и запустите команду gpg --verify
.
Обратите внимание, что предупреждение по типу «Этот ключ не сертифицирован с доверенной подписью!» является нормальным.
root
. В зависимости от
вашего дистрибутива, можно запустить su -
или sudo -i
. Под
root
запустите:
# cd /tmp # tar --warning=no-timestamp -xf \ /path/to/guix-binary-1.2.0.x86_64-linux.tar.xz # mv var/guix /var/ && mv gnu /
Это создаёт /gnu/store (see Хранилище) и
/var/guix. Последнее содержит готовый к использованию профиль для
root
(подробнее в следующем шаге).
Не распаковывайте архив в работающую систему Guix, так как это перезапишет её основные файлы.
The --warning=no-timestamp option makes sure GNU tar does not emit warnings about “implausibly old time stamps” (such warnings were triggered by GNU tar 1.26 and older; recent versions are fine). They stem from the fact that all the files in the archive have their modification time set to 1 (which means January 1st, 1970). This is done on purpose to make sure the archive content is independent of its creation time, thus making it reproducible.
guix pull
будет устанавливать обновления (see Запуск guix pull):
# mkdir -p ~root/.config/guix # ln -sf /var/guix/profiles/per-user/root/current-guix \ ~root/.config/guix/current
Добавьте etc/profile в PATH
и другие уместные переменные
окружения:
# GUIX_PROFILE="`echo ~root`/.config/guix/current" ; \ source $GUIX_PROFILE/etc/profile
Если ваш дистрибутив использует систему инициализации systemd, этого можно добиться следующими командами:
# cp ~root/.config/guix/current/lib/systemd/system/gnu-store.mount \ ~root/.config/guix/current/lib/systemd/system/guix-daemon.service \ /etc/systemd/system/ # systemctl enable --now gnu-store.mount guix-daemon
Если ваш дистрибутив использует систему инициализации Upstart:
# initctl reload-configuration # cp ~root/.config/guix/current/lib/upstart/system/guix-daemon.conf \ /etc/init/ # start guix-daemon
Или можно запускать демон вручную так:
# ~root/.config/guix/current/bin/guix-daemon \ --build-users-group=guixbuild
guix
доступной для других пользователей машины,
например, так:
# mkdir -p /usr/local/bin # cd /usr/local/bin # ln -s /var/guix/profiles/per-user/root/current-guix/bin/guix
Хорошо также предоставить доступ к Info-версии руководства так:
# mkdir -p /usr/local/share/info # cd /usr/local/share/info # for i in /var/guix/profiles/per-user/root/current-guix/share/info/* ; do ln -s $i ; done
That way, assuming /usr/local/share/info is in the search path,
running info guix
will open this manual (see Other Info Directories in GNU Texinfo, for more details on changing the Info
search path).
ci.guix.gnu.org
или из
одного из зеркал (see Подстановки), авторизуйте их:
# guix archive --authorize < \ ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub
Вуаля! Установка завершена!
Вы можете проверить, что Guix работает, установив тестовый пакет для профиля root:
# guix install hello
Архив для бинарной установки может быть воспроизведён (повторён) и проверен простым запуском следующей команды в дереве исходников Guix:
make guix-binary.system.tar.xz
..., что в свою очередь, выполнит:
guix pack -s system --localstatedir \ --profile-name=current-guix guix
See Запуск guix pack для подробной информации об этом полезном инструменте.
Next: Требования, Up: Установка [Contents][Index]