システムワイドにLinuxbrewを導入する例
rootではLinuxbrewをインストールできないが、かと言って個人ユーザーアカウントに紐づけたくはない。ということで、新たにlinuxbrew
というLinuxbrew管理用ユーザーを作り、/home/linuxbrew
にLinuxbrewをインストールしてみる。
インストール:
# as root
useradd linuxbrew -s /sbin/nologin -c 'Linuxbrew'
chmod 755 /home/linuxbrew
su -s /bin/bash linuxbrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
brew list
パスワードを聞かれるが、3回間違えて進めばよい。
2回目以降:
# as root
su -s /bin/bash linuxbrew
eval $(~/.linuxbrew/bin/brew shellenv)
brew list
各ユーザーの設定:
# users: add the following line to .bashrc
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
本当に本当にシステムワイドでよいなら、/etc/profile.d
以下に設定を置いてもよい。
Author And Source
この問題について(システムワイドにLinuxbrewを導入する例), 我々は、より多くの情報をここで見つけました https://qiita.com/tueda/items/6e64e3c9a395eff2b705著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .