Skip to content

Instantly share code, notes, and snippets.

@mamiu
Last active December 2, 2015 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamiu/9baa96d3dc4918c764b1 to your computer and use it in GitHub Desktop.
Save mamiu/9baa96d3dc4918c764b1 to your computer and use it in GitHub Desktop.
Setup Debian 8 after installation.

Things to do first after Linux Server installation (Debian 8 or Fedora 23)

Variables in this guide:

<SERVER_HOSTNAME>   = servers hostname or IP address
<SERVER_SHORTNAME>  = an abbreviation/short name for the server
<SERVER_USERNAME>   = the admins username on the server (not root)
<FIRST_NAME>        = admins first name
<LAST_NAME>         = admins last name
<EMAIL_ADDRESS>     = admins email address



##Things you have to do as root user

####Creating your admins user account and add it to the sudoers group Debian:

adduser <SERVER_USERNAME> sudo
passwd <SERVER_USERNAME>

Fedora:
You can do it within the graphical installer or by typing the same command as on debian.


####Install `sudo, git, vim, tmux, curl and fish`. **On Debian:**
apt-get -y install sudo git vim tmux curl
curl -L https://goo.gl/eHAKB4 | bash

On Fedora:

dnf install git vim tmux fish



Things you have to do from any other user account (e.g. the admins account)

####To ssh into your machine with the <SERVER_SHORTNAME>:

Insert following three lines in ~/.ssh/config on the host:

Host <SERVER_SHORTNAME>
    USER <SERVER_USERNAME>
    HostName <SERVER_HOSTNAME>

####For ssh autologin run (on host):
cat ~/.ssh/id_rsa.pub | ssh <SERVER_SHORTNAME> "mkdir -p ~/.ssh && cat >> .ssh/authorized_keys"

####Login with your \ (`ssh `)
git config --global user.name "<FIRST_NAME> <LAST_NAME>"
git config --global user.email "<EMAIL_ADDRESS>"
git clone https://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick
~/.homesick/repos/homeshick/bin/homeshick clone mamiu/dotfiles

**If you don't want a ssh login message:** Clear the file `/etc/motd` (**m**essage **o**f **t**he **d**ay) to remove the login message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment