Linux

Benchmark for Linux

Here are a few CPU oriented benchmarks for Linux.

I am not sure if they are available in packages for CentOS, so I have only given the Ubuntu packages:

(Please note that you will have to enable the community repositories for these)

rebuilding initrd

#to unpack into a new folder
initfile=/mnt/initrd-2.6.18-194.11.1.el5.img
mkdir new; cd new
gunzip < $initfile | cpio -id

#make changes and rebuild with:
find ./ | cpio -H newc -o > ../initrd.cpio
cd ..
gzip initrd.cpio
mv $initfile ${initfile}.old
mv initrd.cpio.gz $initfile

Linux remote access

Gnome shortcut keys

General keyboard shortcuts

Ctrl+A = Select all (In Documents, Firefox, Nautilus, etc, not Terminal)
Ctrl+C = Copy (In Documents, Firefox, Nautilus, etc, not Terminal)
Ctrl+V = Paste (In Documents, Firefox, Nautilus, etc, not Terminal)

F9 = Toggle Sidebar
F2 = Rename
Ctrl+Shift+N = Create new folder

Ctrl+N = New (Create a new document, not in terminal)
Ctrl+O = Open (Open a document, not in terminal)
Ctrl+S = Save (Save the current document, not in terminal)

Installing NX Server

  • Install NX (info from this page: http://www.nomachine.com/download-package.php?Prod_Id=355 )

    CentOS 6.0 64bit

    yum install wget #must be logged on as root
    NXVER=3.5.0
    CVER=7
    NVER=9
    SVER=5
    ARCH=x86_64
    NXURL=http://64.34.173.142/download
    wget $NXURL/$NXVER/Linux/nxclient-$NXVER-$CVER.$ARCH.rpm
    wget $NXURL/$NXVER/Linux/nxnode-$NXVER-$NVER.$ARCH.rpm
    wget $NXURL/$NXVER/Linux/FE/nxserver-$NXVER-$SVER.$ARCH.rpm
    rpm -i nxclient-$NXVER-$CVER.$ARCH.rpm
    rpm -i nxnode-$NXVER-$NVER.$ARCH.rpm
    rpm -i nxserver-$NXVER-$SVER.$ARCH.rpm

yum

Documentation:

  • access.redhat.com/…tories.html
  • www.centos.org/…yum/index.html
  • from Redhat:
    To define a new repository, you can either add a [repository] section to the /etc/yum.conf file, or to a .repo file in the /etc/yum.repos.d/ directory. All files with the .repo file extension in this directory are read by yum, and it is recommended to define your repositories here instead of in /etc/yum.conf.

Strategy for MX backup for email reliability

How to chroot

Here is a good link on how to Recover a Non-booting Linux System
http://roderick-greening.blogspot.com/2009/09/recover-non-booting-linux-...

and the core:

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot
ubuntu@ubuntu:~$ sudo mount /dev/sda7 /mnt/home

Verify everything looks correct before proceeding (i.e. you got the partitions correct and mounted in the correct places).

Next, you need to take care of /proc and /dev as follows:

ubuntu@ubuntu:~$ sudo mount -t proc none /mnt/proc

dynamic DNS

To use a dynamic DNS system, register an account with http://www.zoneedit.com
Documentation on: http://www.zoneedit.com/doc/dynamic.html
download http://ddclient.sourceforge.net/
You will need to change the section for zoneedit near the bottom, plus at the top set the interval to what you want (from 300) and uncomment:
use=web
There may be a problem if the password contains punctuation characters

Samba Server Setup

This is very "quick and dirty" using the CentOS gui tools as much as possible

-install server & open firewall to samba
-create office and supervisor groups and a /home/common folder
-create all users on server and make them part of office, (+supervisor)
-add all users to Samba with Windows names and passwords
-share all home drives and set user access on shares as appropriate
-set permissions in the directory at the root of each share, appropriate to users
-chmod g+w -R * #at the top level of each shared directory so groups can read and write
Syndicate content