Showing entries with tag "Linux".

Found 14 entries

Linux: Fedora 29 major package versions

Fedora 29 has these versions of some core packages:

Package Version
Apache 2.4.34
GCC 8.2.1
Kernel 4.18.16
Perl 5.28.0
PHP 7.2.11
Vim 8.1.483
Git 2.19.1
Leave A Reply

SSH to hosts with older ciphers

We have some older Cisco equipment that runs SSH with some untrusted ciphers. Specifically the key exchange is still using SHA1, which modern Linux distributions have deprecated. You may see something like this:

Unable to negotiate with 234.234.234.234 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

You can work around this by putting this in your ~/.ssh/config

Host 234.234.234.234
    KexAlgorithms +diffie-hellman-group1-sha1

Borrowed from StackExchange.

Leave A Reply

Linux: Fedora 28 major package versions

Fedora 28 has these versions of some core packages:

Package Version
Apache 2.4.33
GCC 8.0.1
Kernel 4.16.3
Perl 5.26.1
PHP 7.2.5
Vim 8.0.1788
Git 2.17.0
Leave A Reply

Fedora: Enable h264 video on Firefox with Fedora 28

The h264 video codec is the most popular codec on the internet right now. Unfortunately it's patent encumbered so it cannot be included in Firefox unless Mozilla were to pay a licensing fee. To enable h264 support in Firefox on Fedora 28 you'll need to enable the RPM Fusion repository.

dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

After you've configured RPM Fusion you'll need to install some FFMpeg libraries to handle the actual h264 decoding:

dnf install ffmpeg-libs compat-ffmpeg28
Leave A Reply

Linux: Fedora 27 major package versions

Fedora 27 has these versions of some core packages:

Package Version
Apache 2.4.29
GCC 7.2.1
Kernel 4.13.3
Perl 5.26.1
PHP 7.1.11
Vim 8.0.1187
Git 2.14.3
Leave A Reply - 1 Reply

Linux: Fedora 26 major package versions

Fedora 26 has these versions of some core packages:

Package Version
Apache 2.4.26
GCC 7.1.1
Kernel 4.11.8
Perl 5.24.1
PHP 7.1.6
Vim 8.0.662
Git 2.13.0
Leave A Reply

Linux: Debian 9 major package versions

Debian 9 ships with these versions of some core packages:

Package Version
Apache 2.4.25
GCC 6.3.0
Kernel 4.9.0
Perl 5.24.1
PHP 7.0.19
Vim 8.0.550
Git 2.11.0
Leave A Reply

Tar: Auto detecting the compression type

The Linux tar command has a cool feature to auto-detect the file compression based on the archive suffix.

-a, --auto-compress

use archive suffix to determine the compression program

This allows you to change file compressions by just changing the archive suffix:

tar -cvpaf /tmp/backup.tar.gz ~/
tar -cvpaf /tmp/backup.tar.bz2 ~/
tar -cvpaf /tmp/backup.tar.xz ~/

This saves you having to specify -z -j or -J respectively.

Leave A Reply

Linux: Fedora 25 major package versions

Fedora 25 has these versions of some core packages:

Package Version
Apache 2.4.23
GCC 6.2.1
Kernel 4.8.6
Perl 5.24.0
PHP 7.0.12
Vim 7.4.1989
Leave A Reply

Linux: Remote desktop client

For a long time I have used rdesktop on Linux to connect to remote Windows boxes. Redhat is deprecating rdesktop because it does not the support modern encryption technologies that Window uses. Instead they are recommending that users switch to xfreerdp. Here is the syntax you'll need to use to connect to a remote Windows server:

xfreerdp /u:Administrator /v:10.1.8.93
Leave A Reply

Linux: Build a base VM image

When a new version of a distro comes out I like to build a base VM image that I can use later to turn up new VMs quicker. Here are the steps I use on a CentOS or Fedora VM image:

  1. Install minimal system via GUI
  2. Install default packages
  3. Setup Vim config
  4. Disable/remove SELinux
  5. Setup default bash prompt
  6. Remove SSH keys
    1. rm /etc/ssh/*key*
    2. New keys will be generated on boot
  7. Set generic hostname
    1. echo new-virt.web-ster.com > /etc/hostname
  8. Remove mac address line from network config
  9. Replace chrony with NTPd
    1. yum -y swap chrony ntp
  10. Enable NTPd
  11. Disable firewalld
    1. systemctl mask firewalld
  12. Set grub default boot time to two seconds
    1. perl -pi -e 's/GRUB_TIMEOUT=\d/GRUB_TIMEOUT=2/' /etc/default/grub
    2. grub2-mkconfig -o /boot/grub2/grub.cfg
  13. Shutdown VM and archive the disk image
Leave A Reply

Linux: write a network image to an SD card

If you have a fast network connection you can read an ISO directly from the Internet and write to a flash drive, or SD card. Just pipe curl to dd (requires root) and you're done.

curl ftp://mirror.web-ster.com/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-NetInstall-1511.iso | sudo dd of=/dev/sde
Leave A Reply

Linux: Fedora 22 major package versions

Fedora 22 has been released and I gathered the versions of some core packages:

Package Version
Perl 5.20.2
PHP 5.6.9
Vim 7.4.640
Apache 2.4.12
Kernel 4.0.4
Leave A Reply

Linux: Count CPU instructions

Zend published this infographic and it got me thinking about CPU instructions. According to the graphic, the Wordpress homepage required 9.4 billion machine instructions to render, but they've optimized PHP7 and it's now down to 2.6 billion. To count CPU Instructions on a Linux box you can use the perf command:

perf stat -e instructions <my_command>

In comparison, some very simple Linux commands take a significant amount of instructions:

# Approximately 640,000 instructions
perf stat -e instructions echo '' 

# Approximately 2 million instructions
perf stat -e instructions cd ~

# Approximately 700,000 instructions
perf stat -e instructions clear
Leave A Reply