blog.up-link.ro
11Jun/100

OpenBSD: How To Install OpenBSD Ports and Packages Collection

OpenBSD is a fairly complete system of its own, but still there is a lot of software that one might want to see added.

The port collection, originally borrowed from FreeBSD and significantly rewritten, fills this gap. The concept is to have, for each third-party software, a Makefile that controls:

  • where to fetch it,
  • how to do the fetch,
  • what it depends upon (if anything),
  • how to alter the sources (if needed),
  • how to configure, build and install it.

This information is kept in a directory hierarchy under the /usr/ports directory.

Packages are the binary equivalent of ports. A compiled port becomes a package that can be easily installed and registered into the system using pkg_add utility.

Print This Post Print This Post
10Jun/100

OpenBSD: How To Install OpenBSD – OpenBSD 4.7 Installation Guide

OpenBSD is a Unix-like operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley.

The OpenBSD project produces a FREE, multi-platform 4.4BSD-based UNIX-like operating system. OpenBSD supports binary emulation of most programs from SVR4 (Solaris), FreeBSD, Linux, BSD/OS, SunOS and HP-UX.

This article is a step-by-step guide about how to install OpenBSD 4.7 using the installation CD. The installation guide will show a clean install, meaning any operating system or information already on the computer will be erased.

Print This Post Print This Post
3Jun/100

UNIX Tools: txt2regex – regular expression (regex) generator

^txt2regex$ is a regular expression wizard that leads the user through the construction of a regular expression. txt2regex can create RegExes for use with different programs, including awk, ed, egrep, Emacs, expect, find, grep, lex, Lisp, MySQL, OpenOffice.org, Perl, PHP, PostgreSQL, Procmail, Python, Sed, Tcl, VBscript and vi. It is a useful tool for users with little or no knowledge of regular expressions and is included in several Linux distributions ( including Debian, Gentoo, Ubuntu ), in FreeBSD, and in Fink for Mac OS X.

Print This Post Print This Post
31May/100

How to speed up the boot time in Ubuntu by profiling the boot process

There is way to improve the speed of boot process in Ubuntu Linux by profiling your boot. Profiling lets Ubuntu make a list of all the files that are accessed during bootup, it then sorts the files according to how they are stored on your hard-disk. So the next time the system is booted, the files would be read faster.

To profile boot you need to follow these steps:

  • At the grub menu highlight the kernel
  • Press e for edit
  • Choose the line starting with kernel and press e again. Now add the word profile to the end of this line. Hit Enter and then press b to boot

NOTE: The system will boot slower this one time, the next time however you should see an improvement. Also keep in mind that all this is machine-dependent and also depends on the arrangement of files on your hard-disk, so the difference you see might not be huge, or even nil in some cases.

Print This Post Print This Post
31May/100

Linux Tips: Keyboard shortcuts and command line tricks

In this article I will show you some keyboard shortcuts and other command line tricks to make entering commands easier and faster. Learning them can make your life a lot easier!

Here are some keyboard shortcuts you can use within terminal:

Alt-r              Undo all changes to the line.
Alt-Ctrl-e        Expand command line.
Alt-p              Non-incremental reverse search of history.
Alt-] x            Moves the cursor forward to the next occurrence of x.
Alt-Ctrl-] x      Moves the cursor backwards to the previous occurrence of x.
Ctrl-a             Move to the start of the line.
Ctrl-e             Move to the end of the line.
Ctrl-u             Delete from the cursor to the beginning of the line.
Ctrl-k             Delete from the cursor to the end of the line.
Ctrl-w            Delete from the cursor to the start of the word.
Ctrl-y             Pastes text from the clipboard.
Ctrl-l              Clear the screen leaving the current line at the top of the screen.
Ctrl-x Ctrl-u    Undo the last changes. Ctrl-_
Ctrl-r              Incremental reverse search of history.
!!                   Execute last command in history
!abc               Execute last command in history beginning with abc
!n                  Execute nth command in history
^abc^xyz       Replace first occurrence of abc with xyz in last command and execute it

Print This Post Print This Post
26May/100

How To Install and Configure ddclient in FreeBSD and Linux to work with OpenDNS

ddclient is an open-source dynamic IP update client written in Perl. ddclient is available here.

This article shows how to install and configure ddclient in FreeBSD and Linux so it will update your OpenDNS account with your dynamic IP from your ISP.

1. Installation

For CentOS / Fedora, install ddclient via yum:

yum install ddclient

For Debian and Ubuntu, install ddclient via apt-get:

apt-get install ddclient

For FreeBSD, install ddclient from the FreeBSD ports collection:

cd /usr/ports/dns/ddclient
make install clean

2. Configuration

After installing ddclient, you have to create / edit ddclient.conf ( for FreeBSD the configuration should be located in /usr/local/etc, for CentOS should be located in /etc/ddclient and for Debian or Ubuntu in /etc ) as follows:

Print This Post Print This Post
24May/100

How To change MTU size under FreeBSD and Linux

The maximum transmission unit (MTU) of a layer of a communications protocol is the size (in bytes) of the largest protocol data unit that the layer can pass onwards.

1. Changing the MTU size with ifconfig tool

In order to change the MTU size, use ifconfig as follows:

ifconfig [Interface] mtu [SIZE] up
ifconfig eth0 mtu 1500 up

NOTE: This will only work if supported by both the network interface card and the network components such as switch.

Print This Post Print This Post
23May/100

How To Update all CentOS/RHEL servers remotely using a shell script

#!/bin/bash
#
# A simply shell script to update remote CentOS/RHEL servers
# You must have ssh public and private key installed. This will save a lot of time if you
# have many servers.
#
# by Adi https://blog.up-link.ro
# May 2010

# an array to store ssh commands for each server
hosts=(
        "ssh root@192.168.1.1 yum update -y"
        "ssh root@192.168.2.1 -p 2222 yum update -y"
        "ssh adi@192.168.3.1 -t sudo  '/usr/bin/yum update -y'"
      )
# read the array and launch the ssh command
for sshcmd in "${hosts[@]}";do $sshcmd;done
Print This Post Print This Post
22May/100

How To Install OpenVPN in FreeBSD

OpenVPN is a an open source software application that implements virtual private network (VPN) solutions for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. OpenVPN uses SSL/TLS security for encryption and is capable of traversing network address translators and firewalls.

I. OpenVPN Server - Installation and Configuration

1. Installing OpenVPN Server

To install OpenVPN from FreeBSD ports, enter:

cd /usr/ports/security/openvpn
make install clean

OpenVPN Installation Screenshot 1

Print This Post Print This Post
21May/100

How To Update CentOS Linux 5.4 to CentOS 5.5

CentOS ( Community ENTerprise Operating System ) is a community-supported, mainly free software operating system based on Red Hat Enterprise Linux. It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution.

CentOS 5.5 has been released and available via mirrors for immediate update. For more information about this release you can read the release note.

If you have CentOS 5.4 already installed, before to do anything first back up anything you care about.

Print This Post Print This Post