Package graylog-web is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source.
E: Package 'graylog-web' has no installation candidate
答案1
你必须注意到格雷洛格有四个主要组成部分:
- Graylog 服务器节点:作为接收和处理消息的工作器,并与所有其他非服务器组件进行通信。
- Elasticsearch 节点:存储所有日志和消息的服务器。
- MongoDB:用于存储元数据
- Web 界面:GUI
您必须先安装所有先决条件:
安装 Java 然后更新:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
安装MongoDB并创建源列表:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
之后更新并安装最新的可用稳定版本:
sudo apt-get update
sudo apt-get install mongodb-org
安装Graylog服务器:
cd ~
wget https://packages.graylog2.org/repo/packages/graylog-1.3-repository-ubuntu14.04_latest.deb
sudo dpkg -i graylog-1.3-repository-ubuntu14.04_latest.deb
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get install graylog-server
sudo apt-get install pwgen
SECRET=$(pwgen -s 96 1)
sudo -E sed -i -e 's/password_secret =.*/password_secret = '$SECRET'/' /etc/graylog/server/server.conf
PASSWORD=$(echo -n password | shasum -a 256 | awk '{print $1}')
sudo -E sed -i -e 's/root_password_sha2 =.*/root_password_sha2 = '$PASSWORD'/' /etc/graylog/server/server.conf
直到这一步,管理员密码才被安装,之后您需要根据需要配置graylog,您可以在这里找到配置文件:
sudo vi /etc/graylog/server/server.conf
祝你好运,