Posts

Showing posts from July, 2016

Go and NTP time synchronization on Arch Linux

The few minor things necessary to synchronize my data with Google cloud. NTP date/time synchronization:  timedatectl set-ntp true Installing go language: pacman -S go We will also need a git to start using Google Drive.

Tagging old commit

Some code was pushed to github. How to tag now some "older commit"? $ git tag -a v1.0.0 38726b391444e4cdd03dfa9ba04d8c01acc56f46 -m "First public release" $ git push origin --tags

How to verify the installed package - pacman and ArchLinux

Just had a doubt that all files are in place. It is easy to check the files presence and condition of installed package: [bart@server1 ~]$ pacman -Qk procps-ng procps-ng: 85 total files, 0 missing files BTW the way to keep your system always uptodate (thanks to rolling on releases): [bart@ server1  ~]$ sudo pacman -Syu

Arch Linux adding Samba

The need to access BTRFS through Samba is one of basic need. It is dead simple: pacman -S samba . Then just copy example configuration: cp /etc/samba/smb.conf.default /etc/samba/smb.conf Documentation suggests to add the following to [homes] section:  valid users = %S . however it is not necessary (maybe it is a hack for old Windows?). As final step enable samba service: systemctl enable smbd So far so good. The Arch Linux footprint so far (all posts to date) is less than 60MB of RAM. And we have fully blown system.

Installing Docker on Arch Linux

This shall be simply: [root@archt20 ~]# pacman -S docker resolving dependencies... looking for conflicting packages... Packages (4) bridge-utils-1.5-2  containerd-0.2.2-1  runc-0.1.1-2  docker-1:1.11.2-2 Total Download Size:   11.99 MiB Total Installed Size:  60.29 MiB :: Proceed with installation? [Y/n] ... Optional dependencies for docker     btrfs-progs: btrfs backend support [installed]     lxc: lxc backend support :: Running post-transaction hooks... Note that Docker service is managed by systemd and following file is service entry point: /lib/systemd/systemdocker.service . Also it seems that /var/lib/docker is not created by the installer, what would make easy "factory reset" easy, just by rm -rf /var/lib/docker : [root@archt20 system]# ls -a /var/lib/ .  ..  arpd  dbus  dhcpcd  ex  ip6tables  iptables  krb5kdc  logrotate.status  machines  misc  pacman  systemd The final steps - for instalation -  is simply to enable docker: systemctl

Finishing the Arch installation

Few things, I had to do after installation. Enable network. The easiest is to use systemd. Just: systemctl enable systemd-networkd systemctl enable systemd-resolved Install BTRFS utilities: pacman -S btrfs-progs Install micro-code updates for Intel procesors:  pacman -S intel-ucode As having 2 and 3 completed, we shall recreate our boot configuration (2 enables btrfs.fsck in early user space - previously binary was not avaiable so was skipped from initial ram disk): mkinitcpio -p linux grub-mkconfig -o /boot/grub/grub.cfg Replace relatime with noatime for /boot partition (as this is on USB) in /etc/fstab. Install SSH client and server: pacman -S openssh systemctl enable sshd.socket Finally add a user not to play root anymore (also note that root is disabled to login using password via ssh): useradd -m -G wheel -s /bin/bash bart passwd bart Install sudo: pacman -S sudo , then use visudo to uncomment wheel group permission. Generate SSH keys for your user:  ssh-keygen , upl

Modern ArchLinux on Dell T20

All what we need is: Server - in my case it is underpowered Dell T20 USB 3.0 stick Some hard drive We are going to install base OS in following setup: The hard disk will receive partitionless BTRFS file system The USB stick will have GRUB plus boot partition plus some "future use partition". Setup log: After booting USB installer, fix keyboard layout: loadkeys uk It is good to know haw devices were mapped (later fstab can use labels, but for now we need to know device names): lsblk -f Create BTFRS filesystem on main hard drive:  mkfs.btrfs -L ARCH_ROOT /dev/sda Use gdisk to create GPT partitions for Grub - 1M of type ef02 and 512M of type ef00 , rest of the disk will be used as spare partition gdisk /dev/sdb We shall format boot partition:  mkfs.fat -F32 -n ARCH_BOOT /dev/sdb2 After sync we can reboot . Now we shall mount our partitions: mount /dev/sda /mnt mkdir /mnt/boot mount /dev/sdb2 /mnt/boot Install the basic system:  pacstrap /mnt base Ge

Docker with ArchLinux part 1

Image
After of couple years of using cloud services to play with, I decided to go local. I feel that I'm missing quite large area of modern Linux development. Such things like BTRFS. It is quite relevant for me as Java developer not to lost focus on all underlying things. And a lot is happening those days and it is highest time to get the hands on experience. So the decision was made - I'm moving all from cloud to home server. And it is not going to be popular "home lab" - fat server with ESXi and couple of Linux and Windows VM guests. I decided to go green, with "underpowered" server. The decision was to get entry and cheap model. I decided for Dell PowerEdge T20. The idea is to go with low-fat OS - ArchLinux and use Docker for all applications. The effects are really stunning and the experience gained is priceless.