Skip to content

Instantly share code, notes, and snippets.

@baydam
Last active July 13, 2017 15:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save baydam/3cbd1e772d0d364f8feb to your computer and use it in GitHub Desktop.
Save baydam/3cbd1e772d0d364f8feb to your computer and use it in GitHub Desktop.
How to install cockpit on Debian/Ubuntu

How to install cockpit on Debian/Ubuntu

$ git clone https://github.com/cockpit-project/cockpit.git
$ cd cockpit

Dependencies

$ sudo apt-get install nodejs npm
$ sudo npm install -g phantomjs

$ sudo apt-get install -y dh-autoreconf intltool libglib2.0-dev \
xsltproc libsystemd-daemon-dev libsystemd-journal-dev libdbus-1-dev \
libjson-glib-dev libpolkit-agent-1-dev libkrb5-dev libssh-dev \
libpam0g-dev libkeyutils-dev libpcp3-dev libpcp-import1-dev xmlto\
libpcp-pmda3-dev

Building and installing

$ mkdir build
$ cd build/
$ sudo ../autogen.sh --prefix=/usr --enable-maintainer-mode --enable-debug

$ make
$ sudo make install
$ sudo cp ../src/bridge/cockpit.pam.insecure /etc/pam.d/cockpit
$ sudo sh -c "cat ../src/bridge/sshd-reauthorize.pam >> /etc/pam.d/sshd"

Checking

$ make check

Running

Once Cockpit has been installed, the normal way to run it is via systemd:

# systemctl start cockpit.socket

This will cause systemd to listen on port 9090 and start cockpit-ws when someone connects to it. Cockpit-ws will in turn activate cockpit-bridge when someone logs in successfully.

To run Cockpit without systemd, start the cockpit-ws daemon manually:

# /usr/libexec/cockpit-ws --no-tls

Then you can connect to port 9090 of the host machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment