ntpd problemsolving

Filed under: Uncategorized on Friday, October 3rd, 2008 by johnny | No Comments
ntp.conf:

server nanna prefer minpoll 4 maxpoll 6 iburst
server 127.127.1.0     # local clock
fudge 127.127.1.0 stratum 12
driftfile /etc/ntp/drift
multicastclient                 # listen on default 224.0.1.1
broadcastdelay  0.008

# ntpd -A

ntpd 4.2.0
==========
Disconnected, and timed out
# ntpq -c peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 nanna           .INIT.          16 u  663   64    0    0.000    0.000 4000.00
*LOCAL(0)        LOCAL(0)        12 l   15   64  377    0.000    0.000   0.001

# ntpq -c as
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 52924  a023   yes   yes  none    reject  lost reach  2
  2 52925  9614   yes   yes  none  sys.peer   reachable  1

# ntpq -c "rl 52924"
assID=52924 status=a023 unreach, conf, 2 events, event_unreach,
srcadr=nanna, srcport=123, dstadr=192.168.113.21, dstport=123, leap=11,
stratum=16, precision=-20, rootdelay=0.000, rootdispersion=0.000,
refid=INIT, reach=000, unreach=25, hmode=3, pmode=4, hpoll=6, ppoll=6,
flash=00 ok, keyid=0, ttl=0, offset=0.000, delay=0.000,
dispersion=0.000, jitter=4000.000,
reftime=cc90469c.790c484d  Fri, Oct  3 2008  7:22:04.472,
org=00000000.00000000  Thu, Feb  7 2036  6:28:16.000,
rec=00000000.00000000  Thu, Feb  7 2036  6:28:16.000,
xmt=cc90492e.c8feef5e  Fri, Oct  3 2008  7:33:02.785,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
filtoffset=    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
filtdisp=   16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0

Connected, and reachability=377:
# ntpq -c peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*nanna           LOCAL(0)         8 u    4   64  377    0.219   -0.004   0.004
 LOCAL(0)        LOCAL(0)        12 l   40   64  377    0.000    0.000   0.001

# ntpq -c as
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 52924  b634   yes   yes  none  sys.peer   reachable  3
  2 52925  9014   yes   yes  none    reject   reachable  1

# ntpq -c "rl 52924"
assID=52924 status=b634 reach, conf, sel_sys.peer, 3 events, event_reach,
srcadr=nanna, srcport=123, dstadr=192.168.113.21, dstport=123, leap=00,
stratum=8, precision=-20, rootdelay=0.000, rootdispersion=11.444,
refid=LOCAL(0), reach=377, unreach=0, hmode=3, pmode=4, hpoll=6,
ppoll=6, flash=00 ok, keyid=0, ttl=0, offset=-0.004, delay=0.219,
dispersion=3.559, jitter=0.004,
reftime=cc904c2c.790ac84b  Fri, Oct  3 2008  7:45:48.472,
org=cc904c4d.c9081bf6  Fri, Oct  3 2008  7:46:21.785,
rec=cc904c4d.c9109070  Fri, Oct  3 2008  7:46:21.785,
xmt=cc904c4d.c8feac42  Fri, Oct  3 2008  7:46:21.785,
filtdelay=     0.23    0.22    0.22    0.22    0.22    0.22    0.24    0.24,
filtoffset=   -0.01   -0.01   -0.01   -0.01    0.00   -0.01    0.00    0.00,
filtdisp=      0.00    0.99    1.95    2.90    3.87    4.85    5.79    6.74

ntpd 4.2.4
==========
Disconnected, and timed out
# ntpq -c peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 nanna           LOCAL(0)         8 u  528   64    0    0.212    0.093   0.011
*LOCAL(0)        .LOCL.          12 l    8   64  377    0.000    0.000   0.001

# ntpq -c as
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 55492  8023   yes   yes  none    reject  lost reach  2
  2 55493  9614   yes   yes  none  sys.peer   reachable  1

# ntpq -c "rl 55492"
ntpq -c "rl 55492"
assID=55492 status=8023 unreach, conf, 2 events, event_unreach,
srcadr=nanna, srcport=123, dstadr=192.168.113.31, dstport=123, leap=00,
stratum=8, precision=-20, rootdelay=0.000, rootdispersion=11.581,
refid=LOCAL(0), reach=000, unreach=1, hmode=3, pmode=4, hpoll=6,
ppoll=6, flash=400 peer_dist, keyid=0, ttl=0, offset=0.093, delay=0.212,
dispersion=3943.599, jitter=0.011,
reftime=cc90469c.790c484d  Fri, Oct  3 2008  7:22:04.472,
org=cc9046c9.936f28dc  Fri, Oct  3 2008  7:22:49.575,
rec=cc9046c9.93700405  Fri, Oct  3 2008  7:22:49.575,
xmt=cc9048e2.93608950  Fri, Oct  3 2008  7:31:46.575,
filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.21    0.22,
filtoffset=    0.00    0.00    0.00    0.00    0.00    0.00    0.09    0.08,
filtdisp=   16000.0 16000.0 16000.0 16000.0 16000.0 16000.0    7.82    8.76

Connected, and reachability=377:
# ntpq -c peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 nanna           LOCAL(0)         8 u    7   64  377    0.211   -0.011   0.126
*LOCAL(0)        .LOCL.          12 l    8   64  377    0.000    0.000   0.001

# ntpq -c as
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 55492  9034   yes   yes  none    reject   reachable  3
  2 55493  9614   yes   yes  none  sys.peer   reachable  1

# ntpq -c "rl 55492"
assID=55492 status=9034 reach, conf, 3 events, event_reach,
srcadr=nanna, srcport=123, dstadr=192.168.113.31, dstport=123, leap=00,
stratum=8, precision=-20, rootdelay=0.000, rootdispersion=11.658,
refid=LOCAL(0), reach=377, unreach=0, hmode=3, pmode=4, hpoll=6,
ppoll=6, flash=800 peer_loop, keyid=0, ttl=0, offset=-0.011,
delay=0.211, dispersion=2.831, jitter=0.126,
reftime=cc904b68.790ac78a  Fri, Oct  3 2008  7:42:32.472,
org=cc904b98.936847bb  Fri, Oct  3 2008  7:43:20.575,
rec=cc904b98.93719179  Fri, Oct  3 2008  7:43:20.575,
xmt=cc904b98.9360ac0d  Fri, Oct  3 2008  7:43:20.575,
filtdelay=     0.22    0.22    0.21    0.22    0.21    0.21    0.22    1.13,
filtoffset=   -0.03   -0.03   -0.01   -0.01   -0.04   -0.04   -0.02    0.32,
filtdisp=      0.00    0.95    1.91    2.85    3.81    4.80    5.79    6.74

Firefox extensions

Filed under: Uncategorized on Wednesday, October 1st, 2008 by johnny | No Comments

Open up Mozilla extensions
Install these (links on all):
SwiftTabs, Video downloader, Foxytunes, Bookmark Duplicate detector, AdBlock Plus, FlashGot, Session Manager, Forecastfox, Mouse Gestures, Linky, Answers, Flashblock, PDF Download, DictionarySearch, FoxClocks, TorrentSearch, Foxmarks Bookmark Synchronizer, Downloads in tab, Download statusbar
SwitchProxy Tool, Mediaplayer Connectivity, Greasemonkey, Firefox Environment Backup Extension
Developer stuff:
Firebug,Web Developer, Selenium, Selenium Recorder, HTML Validator, EditCSS, Checky, iMacro

Greasemonkey scripts:
Google image relinker, Google pagerization, Google extras

zsh tips and tricks

Filed under: Uncategorized on Tuesday, August 19th, 2008 by johnny | No Comments
csh             zsh
=====         ==========
!*           $*              (or $argv)
!^           $1              (or $argv[1])
!:1          $1
!:2          $2              (or $argv[2], etc.)
!$           $*[$#]          (or $argv[$#], or $*[-1])
!:1-4        $*[1,4]
!:1-         $*[1,$#-1]      (or $*[1,-2])
!^-          $*[1,$#-1]
!*:q         "$@"
!*:x         $=*             ($*:x doesn't work (yet))

Package management

Filed under: Uncategorized on Saturday, April 19th, 2008 by johnny | Comments Off

Some more meat on RPM

Info on installed package
RPM: rpm -qi package
APT:

Info on package
RPM: rpm -qpi package.rpm
APT:

List files in installed package
RPM: rpm -ql package
APT:

List files in package
RPM: rpm -qpl package
APT:

List all packages installed
RPM: rpm -qa
APT:

List packages required by package
RPM: rpm -q –requires package
APT:

List what a package provides
RPM: rpm -q –provides package

List packages that requires package/feature (explicitly mention said package. Ie won’t list where package is usually assumed, eg glibc)
RPM: rpm -q –whatrequires package
APT:

List packages that requires package/feature, full version
RPM:
rpm -q –whatrequires glibc > /tmp/glibc-dependencies.txt
rpm -q –provides glibc | xargs rpm -q –whatrequires >> /tmp/glibc-dependencies.txt
rpm -ql glibc | xargs rpm -q –whatrequires >> /tmp/glibc-dependencies.txt
sort -u /tmp/glibc-dependencies.txt | less
APT:

List package that provides certain feature
RPM: rpm -q –whatprovides feature
APT:

Verify files installed by package
RPM: rpm -V package

Position Symbol Meaning
1 S File size differs
2 M Mode or permissions differ
3 5 Checksum differs
4 D Device major or minor number differs
5 L Symlink changed
6 U User ownership changed
7 G Group ownership changed
8 T Last modified time changed

List only files changed: rpm -V k3b | grep -v ‘\.\.\.\.\.\.\.’
APT:

Effects of xanax
Generic cialis price
Guanabenz
50 mg tramadol
Tocainide
Hydrocodone bitartrate acetaminophen
Generic viagra viagrageneric
Description tramadol
Phenytoin interaction with xanax
Niacin
Phentermine buy cheap
How long does phentermine stay in your body
Hydrocodone drug
Hytrin
Cheap tramadol cod
Medical information on tramadol hc
Phentermine 6 pm order
Xanax prescription online
Cheap xanax no prescription
Oxyphencyclimine
Buy Didrex
Methadone and xanax
Cialis experiences
Viagra online ordering
Cheap tramadol
Phentermine 37.5 buy online no prescription
Zyprexa
Lozol
Phentermine in jonesboro arkansas
Terfenadine
Buy online viagra viagra
Paroxetine
Bontril phentermine adipex
Cetirizine
On line pharmacy phentermine
Cimetidine
Phentermine not working
Difference between viagra and levivia
Allegra
Order viagra canada
Phentermine feedback
_cialis et levitra
Ibuprofen
Phenobarbital
Praziquantel
Ritodrine
Granisetron
Isotretinoin
Atrovent
Cialis tablet
Prinivil
Avapro
Oxcarbazepine
Letrozole
Macrodantin
Loss phentermine story weight
Mirtazapine
Phentermine in florida
Generic viagra online pharmacy
Dimethothiazine
Lowest price tramadol
Viagra dose
Orphenadrine
Cialis drug interactions
Viagra patent
Echinacea
Appetite suppressants and phentermine
Hydrochlorothiazide
Tramadol cheap overnight inexpensive
Vicodin picture
Hydrocodone order
Viagra prescription online
Orlistat
Discount fioricet
Buy cialis soft tabs
Nexium
Fatal dose of xanax
Glyburide
Buy cheap meridia
Online viagra sales
Drug interactions with cialis
Viagra price list
Lethal dosage of xanax
How much weight will you lose on phentermine
Phentermine 30mg
Phentermine abuse
Dyazide
Minipress
Cialis on line
Clarithromycin
Xanax in pregnancy
Xanax death
Hydrocodone bitartrate
Physican’s desk reference phentermine
Famciclovir
Viagra cialis levitra
Phenolphthalein
Epivir
Griseofulvin
Amerge
Aciphex
Flomax
Diet medication online phentermine
What is phentermine
Cheap phentermine canada
Buy online salescom viagra
Generic name viagra
Aminoglutethimide
Indapamide
Isradipine
Cozaar
Lowest phentermine 37 5 prices
Cheap phentermine without prescription
Phentermine no prescription
Luvox
Melphalan
Cidofovir
Buy cialis in the uk
Cialis sample
Mepenzolate
Natural alternative viagra
Phentermine credit card or cod
Atarax
No prescription viagra
Adapalene
Xanax master card
Xanax suicide
Femara
Amiloride
Is phentermine safe
Estrace
Parnaparin
Prescription phentermine with cod payment
50mg viagra
Dothiepin
Buy Renova
Trifluoperazine
Pictures of xanax bars
Atorvastatin
Ecotrin
Amoxil
What is xanax used for
Miglitol
Phentermine for less
No prescription needed phentermine
Cimetidine
Drug interaction xanax and holy basil
Phentermine online pay with mastercard
Diltiazem
Trovafloxacin

Linux Mint Tipsn’tricks

Filed under: Uncategorized on Friday, January 18th, 2008 by johnny | No Comments

Install Internet Explorer
sudo apt-get install wine cabextract
cd /tmp
wget \
http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

Click OK

Add patch to rpm spec file

Filed under: Uncategorized on Wednesday, October 10th, 2007 by johnny | 1 Comment

cp oldfile newfile
emacs newfile
diff -Naur oldfile newfile >oldfile.patch

In specfile:
At top - near BuildRequires or so:
Patch0: oldfile.patch

Under %setup:
%patch0 -p0 -b .oldfile

drupal on Fedora Core 3

Filed under: Uncategorized on Monday, September 3rd, 2007 by johnny | No Comments

cd /var/www/html
wget http://ftp.drupal.org/files/projects/drupal-5.2.tar.gz
tar zxf drupal-5.2.tar.gz
ln -sf drupal-5.2 drupal
chown -R apache.apache drupal*
mysqladmin -u $user -p$password create drupal
mysql -u root -p
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON databasename.*
TO ‘username’@'localhost’ IDENTIFIED BY ‘password’;
mysql> FLUSH PRIVILEGES;

http://server/drupal

Ubuntu 7.04 installation

Filed under: Uncategorized on Friday, August 24th, 2007 by johnny | No Comments

sudo apt-get update
sudo apt-get upgrade

sudo wget http://medibuntu.sos-sts.com/sources.list.d/feisty.list -O /etc/apt/sources.list.d/medibuntu.list
sudo echo “deb http://download.skype.com/linux/repos/debian/ stable non-free” >>/etc/apt/sources.list
wget http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg
sudo apt-key add medibuntu-key.gpg

Administration->Software Sources
Uselect Install from CD-ROM

sudo apt-get update
sudo apt-get install tramp css-mode php-mode mmm-mode apt-file tofrodos convmv openssh-server jhead k3b libdvdcss2 libxine1-ffmpeg w32codecs vlc mplayer skype amarok emacs21 joe gqview flashplugin-nonfree ubuntu-restricted-extras msttcorefonts ttf-xfree86-nonfree kino meld smbfs mysql-admin mysql-query-browser acroread mozilla-acroread mozilla-mplayer acroread-escript ncftp mysql-client mysql-server googleearth xmms apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert phpmyadmin libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

sudo apt-get install postgresql-8.2 postgresql-client-8.2 pgadmin3 pgadmin3-data bum emma firestarter beagle gsynaptics thoggen k9copy dvdrip eclipse scribus mozilla-thunderbird bouml bluefish cssed gphpedit kdevelop mono monodevelop qt3-assistant qt3-designer qt3-linguist nagios-text

sudo apt-get install kde

/bin/bash
cd /bin
sudo ln -sf bash sh
apt-file update

Mysql:
sudo mysqladmin -u root password ‘new-password’

apache:
sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod suexec
sudo a2enmod include

postgres:
sudo su - postgres
createuser -P johnny
y
y
exit
createdb amarok
createuser -P amarok
amarok
amarok
n
n
n

Option “SHMConfig” “true”
i InputDevice i xorg.conf

Fedora Core 5 on Thinkpad R50

Filed under: Uncategorized on Sunday, August 19th, 2007 by johnny | No Comments

Installation

Installation is not very complicated and is discussed lots of places.

KDE

Log out and choose KDE from Session
Log in and set KDE as default

Update the system

Run pup/Software Updater from the System menu.
alternatively:
# yum -y update

Reboot if the kernel has been updated

Setup things using a terminal

Start a Terminal (found under System) and type this:
# su -

  • Sudo (will be done automatically in install personal files)

# visudo
Move to the bottom of the file, and to the end of the line
Press a (puts visudo in write mode) and enter
Type:
johnny ALL=(ALL) ALL
Change johnny for whatever username you’re using

Press Esc followed by :wq (this will save and quit)

  • Change default hostname (keep forgetting that during installation)

# joe /etc/sysconfig/network (will be set on next reboot)
Change HOSTNAME=
Press Ctrl-k x to quit and save
# hostname

Install personal files

# rpm -Uvh johnny-firstinstall-1.0.x-y.i386.rpm
This will install all my emacs dotfiles, gaim setup, xmms setup, vmware files, ncftp setup, mplayer setup, personalized .bashrc and a global bash setup. It will set up sudo and create rpm build directory in my home directory

Sleep mode
Rightclick the batteryindicator in the bottom right corner, and choose Options
Go to the ACPI tab, and enable everything there
Close the settings window and open it up again
Choose Sleep-mode when lid is closed
Change the profiles for power to your likings
Sleep mode when critical level is reached

Setup desktop environment

Right click panel (bottom) and choose properties
Arrangement - Size: small
Taskbar - Uncheck ‘Show windows from all ?’, check ‘Show only minimized windows’

Add gnome-terminal to panel (add non-KDE program)
Add Binary clock and KWireless to the panel

Setup gnome-terminal

Edit->Profiles
Edit Default
Set scrolling to 10000 lines

Setup keyboard shortcuts

Start Control Center in the menu
Regionalt og tilgjengelighet - Hurtigtaster
Remove Alt-F4 key binding
Add:
Alt-F1 - Raise window
Alt-F3 - Lower window
Alt-F9 - Minimize window
Then create a shortcut to toggle play/pause in amarok:
Regionalt og tilgjengelighet - Input-handlinger
Ny handling
General tab
Handling: Amarok pausePlay
Handlingstype: Snarveistaster->DCOP-kall (simple)
Keyboard shortcut: Pause
Instillinger fro DCOP-kall
Remote program: amarok
Remote object: player
Function: playPause
Now delete all entries for xmms, since they relate to the Pause button as well. There is one inside Menu Editor entries as well.

Setup window behaviour

In Control Center
Desktop - Window behaviour - Focus follows mouse

Setup Thinkpad support

depmod /lib/modules/`uname -r`/kernel/drivers/char/nvram.ko
/dev/nvram already exists, otherwise mknod /dev/nvram c 10 144
chmod 664 /dev/nvram

Install firefox extensions

Open up Mozilla extensions
Install these (links on all):
SwiftTabs,Video downloader,Foxytunes,Bookmark Duplicate detector,AdBlock Plus, FlashGot, Session Manager, Forecastfox, Mouse Gestures, Linky, Answers, Flashblock, PDF Download, DictionarySearch, FoxClocks, TorrentSearch, Foxmarks Bookmark Synchronizer, (Mozilla Calendar)
Developer stuff:
Firebug,
Web Developer, Selenium, Selenium Recorder, HTML Validator, EditCSS, Checky

Install neat stuff

Update 6/6-2006: This didn’t work very well (stopped midway, didn’t keep track of what was installed etc…)
so jump to the next section…
# su - (to become root)
# wget -c http://easylinux.info/uploads/frog.tar.gz
# tar zxf frog.tar.gz
# yum update (if you haven’t updated for a day or so)
# xterm -e ~/.frog/frog.run
Check the extra programs you want installed.
PS: Make sure you let this script run without interruption and that ‘Extra repositories’ is checked.
Some of the packages are for Gnome only, so don’t bother to install those if you switched to KDE.
You will have to answer questions if you select Java and Acrobat Reader.

Install neat stuff2

Download some repos
tar xf repos.tar -C /etc/yum.repos.d

rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/5/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm

rpm –import http://freshrpms.net/packages/RPM-GPG-KEY.txt
rpm –import http://dries.ulyssis.org/rpm/RPM-GPG-KEY.dries.txt
rpm –import http://rpm.livna.org/RPM-LIVNA-GPG-KEY

Install additional modules/remove modules

# rpm -e totem rhythmbox
XMMS
# yum -y install xmms xmms-mp3 xmms-skins xmms-wma xmms-cdread xmms-flac xmms-modplug xmms-aac xmms-alarm xmms-crossfade xmms-xosd
Multimedia stuff
# yum -y install amarok amarok-visualisation audacity streamtuner grip xine xine-lib xine-skins videolan-client kino mplayer* kdemultimedia-extras
# yum -y –enablerepo=livna install amarok-extras-nonfree totem-xine k3b-mp3
# rpm -Uvh http://www.linuxtips.info/mplayerplug-in-3.25-2.rf.i386.rpm
Miscellaneous
# yum -y install acroread firestarter tuxtype2 stellarium stellarium-doc alacarte xscreensaver-gl-extras xscreensaver-base fortune-mod install yumex flash-plugin rar unrar unace p7zip digikam gwenview kipi-plugins webmin pgadmin* bash-completion ncftp
Games
# yum -y install ppracer frozen-bubble gweled lbreakout2 lincity-ng powermanga starfighter scorched3d supertux
Nagios
# yum -y install nagios nagios-devel nagios-plugins nagios-nsca
Fonts
# yum -y install fonts-arabic fonts-chinese fonts-gujarati fonts-hebrew fonts-hindi fonts-japanese fonts-korean fonts-tamil fonts-bengali fonts-punjabi hunky-fonts xorg-x11-fonts*
# rpm -Uvh http://www.linuxtips.info/msttcorefonts-1.3-4.noarch.rpm
# service xfs restart
Java
# wget http://www.linuxtips.info/jre-1_5_0_06-linux-i586.bin
# sh jre-1_5_0_06-linux-i586.bin
# rm -f jre-1_5_0_06-linux-i586.bin
# mv jre1.5.0_06 /opt/
# ln -s /opt/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins
# wget http://www.linuxtips.info/java.sh
# mv java.sh /etc/profile.d/
# source /etc/profile.d/java.sh
# /usr/sbin/alternatives –install /usr/bin/java java /opt/jre1.5.0_06/bin/java 2
# echo 2 | /usr/sbin/alternatives –config java

Install codecs

Download all-xx from MPlayer
eg:
# wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/all-20060611.tar.bz2
# tar jxf all-xx
# mkdir /usr/local/lib/codecs
# mv all-xx/* /usr/local/lib/codecs
# rmdir all-xx
# ln -sf /usr/local/lib/codecs /usr/lib/win32

Enable/disable services

chkconfig httpd on
chkconfig isdn off
chkconfig irda on
chkconfig netplugd on
chkconfig smb on
chkconfig snmpd on
chkconfig snmptrapd on

service httpd start
service irda start
service snmpd start
service snmptrapd start

Setup PostgreSQL

# su - (to become root)
# chkconfig postgresql on
# service postgresql start
# su - postgres
# createuser -P johnny
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
# exit
# joe /var/lib/pgsql/data/pg_hba.conf
Change ident sameuser to md5 (bottom of the file, all three entries)
# service postgresql restart
# su - johnny
# psql postgres
postgres=# alter user postgres password ‘<new password’>;
postgres=# \q

Setup MySQL

chkconfig mysqld on
service mysqld start
/usr/bin/mysqladmin -u root password ‘new-password’

Setup ntp client

chkconfig ntpd on
joe /etc/ntp.conf #(check bottom for valid time servers)
service ntpd start

Setup samba server

chkconfig smb on
joe /etc/samba/smb.conf
(
Change the workgroup parameter to your liking
Add these lines to the [global] section
dos charset = 850
display charset = iso-8859-1
unix charset = iso-8859-1
Add these lines to the end of the file to share the whole root partition:
[lappen]
path = /
)
smbpasswd -a johnny
service smb start

Install dictionaries

Download language files. Norwegian from here: Norwegian language files
Alternatively, latest files of 1. May 06 is here
Unzip/untar the contents and extract the actual dictionary files (*.dic, *.aff, *.dat, *.idx)
Copy these files to /usr/lib/openoffice.org2.0/share/dict/ooo
Start OpenOffice.org and choose Tools->Settings… In Language, select the default language

Setup Thunderbird

-Add a mail account with my settings
-Other settings:
-Dictionary:
* Copy the *.aff/*.dic files from /usr/lib/openoffice.org2.0/share/dict/ooo to /usr/lib/thunderbird-1.5/components/myspell
This didn’t work:
-Add dictionary from http://www.mozilla.com/thunderbird/dictionaries.html
* Save the xpi-file to your home directory
* Tools->Extensions, Click Install
* Navigate to the xpi-file and install it

-Edit->Innstillinger…
* Visning->Skrifttyper->Tegnkodinger: UTF-8
* Skriving->Generelt->Videresend meldinger->Innbundet
* Skriving->Generelt->Automatisk lagring hvert 1 minutt
* Skriving->Stavekontroll->Språk: Norwegian

Setup amaroK

Using postgreSQL (revisit PostgreSQL setup if not already done):
[johnny@lappen ~]# createuser -P amarok
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE
[johnny@lappen ~]# createdb amarok
CREATE DATABASE
Set sound engine in settings to alsalink

Now start amarok and choose these settings in Settings…
Engine:
-Directories: /usr/local/RealPlayer/(common|plugins|codecs)
-Output plugin: alsa

Setup samba shares in fstab

These are the samba shares I mount on my machine.
Note that from Fedora Core 5 the filesystem is cifs and not smbfs
//server/podcasts /opt/mp3/_Podcasts cifs auto,credentials=/root/johnnycreds,uid=johnny,gid=navtek,rw 0
//server2/share /server2/share cifs auto,credentials=/root/johnnycreds,uid=johnny,gid=navtek,rw 0
/root/johnnycreds looks like this:
username=
password=

Install World Community Grid - Help fight AIDS

Download from here
Open a terminal and type
# mv boinc_5.2.13_i686-pc-linux-gnu.sh /opt
# cd /opt
# sh boinc_5.2.13_i686-pc-linux-gnu.sh
# /opt/BOINC/run_client &
# /opt/BOINC/boinc -attach_project www.worldcommunitygrid.org d22fd4b62d4987009c4e477dd439acef & (note: this is my account key. Please create your own at World Community Grid
# echo “/opt/BOINC/boinc -attach_project www.worldcommunitygrid.org d22fd4b62d4987009c4e477dd439acef&” >>/etc/rc.local
(Not used:
Download boinc from here and place it in /etc/rc.d/init.d/boinc
# chkconfig boinc on
# service boinc start
)

Setup wireless

Setup modem

Setup bluetooth

Setup firewire/dv-grabbing

Mount Windows NTFS partitions:

Use uname -rm to get the running kernel version.
Download and install NTFS module from:

Linux NTFS
Add the following line to /etc/fstab (Note: these are my personal lines. Find you own using fdisk -l)
/dev/hda1 /mnt/C ntfs ro,defaults,umask=0222 0 0
/dev/hda2 /mnt/D vfat defaults 0 0

Run these commands:
# depmod /lib/modules/`uname -r`/kernel/fs/ntfs/ntfs.ko
# mkdir -p /mnt/C /mnt/D
# mount /mnt/C
# mount /mnt/D

Update files in dump image using file images and loop device

Filed under: Uncategorized on Thursday, July 26th, 2007 by johnny | Comments Off

mkdir /tmp/dump
cp dumpimage.img /tmp/dump
cd /tmp/dump
/sbin/restore rf dumpimage.img
rm dumpimage.img
cd ..
mkdir newdump
cd newdump
dd if=/dev/zero of=ddimage.img bs=1024 count=1000000 (this is one GiB)
mkfs.ext3 -F ddimage.img
mkdir ddimage
mount -t auto ddimage.img -o loop ddimage
cp -r /tmp/dump/’ ddimage
change all files in ddimage
umount ddimage
/sbin/dump 0vz9f newdumpimage.img /tmp/newdump/ddimage.img