my life

day to day

Archive for the 'HOWTO' Category

DJabberd Debian HOWTO

Saturday, August 11th, 2007

Checkout the latest SVN copy

svn co http://code.sixapart.com/svn/djabberd/ /usr/src/djabberd/

First install dependencies

apt-get install openssl libdbd-sqlite3-perl  libnet-ssleay-perl libnet-dns-perl libdigest-sha1-perl  libxml-sax-perl libxml-libxml-perl liblog-log4perl-perl subversion libdigest-hmac-perl libdanga-socket-perl libsys-syscall-perl

Now install DJabberd

cd /usr/src/djabberd/trunk/DJabberd/ perl Makefile.PL make all install

Now create the SSL certificates

mkdir /etc/djabberd cd /usr/src/djabberd/trunk/ openssl req -x509 -newkey rsa:1024 -keyout /etc/djabberd/server-key.pem -out /etc/djabberd/server-cert.pem -days 365 -nodes htdigest -c /etc/djabberd/djabberd.users djabberd [your-username-without-at-sign]

Create the server configuration file /etc/djabberd/server.conf

OldSSL  enable
# health checks from this IP (directive can be repeated) won't log and
# won't allocate a connection id
DeclareMonitor 127.0.0.1
AdminPort 5200
ClientPort 5222
ServerPort 5269
SSLCertificateFile    /etc/djabberd/server-cert.pem
SSLCertificateKeyFile /etc/djabberd/server-key.pem 

<VHost alliance.com>
  S2S enable
  RequireSSL yes
  <Plugin DJabberd::Authen::HTDigest>
    Realm djabberd
    HtDigest /etc/djabberd/djabberd.users
  </Plugin>
  <Plugin DJabberd::RosterStorage::SQLite>
    Database /etc/djabberd/djabberd.sqlite
  </Plugin>
  <Plugin DJabberd::Authen::MySQL>
    DBName               djabberd
    DBHost               127.0.0.1
    DBPort               6723
    DBUsername           dbusername
    DBPassword           dbpassword
    DBTable              user
    DBUsernameColumn     username
    DBPasswordColumn     password
    DBEncryptedPasswords 1
    DBWhere              canjabber = 1
  </Plugin> 

</VHost>

Start the server

/usr/local/bin/djabberd --conf=/etc/djabberd/server.conf --daemon

add to del.icio.us    add to technorati favs   email this

MogileFS HOWTO

Sunday, June 3rd, 2007

Check out the latest copy of the MogileFS source code (recommended)

svn checkout http://code.sixapart.com/svn/mogilefs

Install common prereqs

[download:prereqs.sh]

perl -MCPAN -e ‘install Danga::Socket’ perl -MCPAN -e ‘install Gearman::Client’ perl -MCPAN -e ‘install Gearman::Server’ perl -MCPAN -e ‘install Gearman::Client::Async’ perl -MCPAN -e ‘install Net::Netmask’ perl -MCPAN -e ‘install IO::WrapTie’ perl -MCPAN -e ‘install IO::AIO’ perl -MCPAN -e ‘install List::MoreUtils’ perl -MCPAN -e ‘install Path::Class’ perl -MCPAN -e ‘install Perlbal’

[/download]

Go ahead and install the servers

cd mogilefs/trunk/server perl Makefile.PL chmod 755 /usr/bin/mogilefsd adduser mogile mkdir /home/mogilefs

Install the client module

cd api/perl/MogileFS-Client perl Makefile.PL make install

Install the admin utility scripts

cd utils perl Makefile.PL make install

Create the MySQL database

mysqladmin create mogilefs

Setup the SQL Permissions

grant all on mogilefs.* TO ‘mogile’@'%’ identified by ’some-password’; flush privileges;

Load the schema

./mogdbsetup --dbhost=localhost --dbname=mogilefs --dbuser=mogile --dbpass=some-password

Create configurations

mkdir /etc/mogilefs

Add the following to /etc/mogilefs/mogilefsd.conf

db_dsn DBI:mysql:mogilefs:tracker.yourdomain.com db_user mogile db_pass some-password conf_port 7001 listener_jobs 5 old_repl_compat 0 lib /usr/lib/perl5/site_perl/5.8.8/

* you may need to change the lib path relative to your system

Create the storage server config in /etc/mogilefs/mogstored.conf

httplisten=0.0.0.0:7500 mgmtlisten=0.0.0.0:7501 docroot=/home/mogilefs/

Start the tracker

su mogile -c “mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon”

Start the storage server on all the servers that will be providing the role

su mogile -c “mogstored --daemon”

Configure your domains and replication patterns

mogadm domain add [domain] mogadm class add [domain] [className]

Tell the tracker about all the hosts and devices acting as a storage server (mogstored)

mogadm host add [hostname] mogadm device add [hostname] [devX]

Make the device directory (device names need to be GLOBALLY unique; thus dev1 can never exist anywhere else on any other mogstored server. The prefix must be dev, followed by an integer greater than 0)

mkdir /home/mogilefs/dev1

add to del.icio.us    add to technorati favs   email this

Swish-e RPM HOWTO

Friday, June 1st, 2007

Install the dependencies

yum install pcre-devel perl-Date-Calc perl-HTML-Template perl-Template-Toolkit libxml2-devel

Download the latests source

cd /usr/src/ wget http://swish-e.org/distribution/latest.tar.gz tar -zvxf latest.tar.gz rm -f latest.tar.gz

Make the RPM tar

./configure --enable-incremental make dist

Copy the resulting tarball to RPM’s redhat/SOURCES directory

cp *.tar.gz /usr/src/redhat/SOURCES cp rpm/swish-e.xpm /usr/src/redhat/SOURCES

Build the RPM

rpmbuild -ba rpm/swish-e.spec

Install the new sources

rpm -Uvh /usr/src/redhat/RPMS/i386/swish*

 

add to del.icio.us    add to technorati favs   email this

NVIDIA Kernel Module Compilation

Thursday, May 24th, 2007

apt-get install nvidia-kernel-source nvidia-kernel-common nvidia-settings nvidia-xconfig module-assistant cd /usr/src tar -zvxf nvidia-kernel-source.tar.gz CC=/usr/bin/gcc-4.0 module-assistant --unpack-once build nvidia dpkg -i nvidia-kernel-2.6.16-2-686-smp*.deb

add to del.icio.us    add to technorati favs   email this

Cygwin + Ports HOWTO

Sunday, March 25th, 2007

Why? Because you want to run something in this list ftp://sunsite.dk/projects/cygwinports/portslist.txt For me, it was that I wanted to run KCacheGrind.

Run this http://www.cygwin.com/setup.exe, when it lets you add a url, enter the ports location ftp://sunsite.dk/projects/cygwinports

 

add to del.icio.us    add to technorati favs   email this

Downgrading packages in Fedora

Monday, December 11th, 2006

# Download yum-utils yum install yum-utils # Download packages yumdownloader [packages to downgrade] # Install old packages rpm -Uvh --oldpackage *.rpm

add to del.icio.us    add to technorati favs   email this

TMobile WiFi Hotspot Login Script

Friday, October 20th, 2006

curl -d username=username -d password=password -d Login= -d postURL=https://hotspot.t-mobile.com/user/homs/ https://service2.hotspot.t-mobile.com:443/pages/checkInput.jsp

add to del.icio.us    add to technorati favs   email this