mathz.nu

2009/11/13

Kannel install

Filed under: Server — Mathz @ 15:33

How to compile and install Kammel om Ubuntu:
sudo apt-get install make gcc libxml2 libxml2-dev mysql-server libmysql++-dev mysql-server mysql-client-5.0 phpmyadmin

http://kannel.com/download.shtml

./configure –with-mysql –enable-start-stop-daemon
make
sudo make install

http://www.chipmunkninja.com/Setting-up-Configuring-and-Using-13@

2009/10/31

Asterisk installation

Filed under: Asterisk,Server — Mathz @ 19:34

sudo apt-get install asterisk
sudo apt-get install mysql-client
sudo apt-get install asterisk-mysql

2009/10/24

TFTP server installation

Filed under: Server — Mathz @ 12:03

1. Install tftpd and related packages.

$ sudo apt-get install xinetd tftpd tftp

2. Create /etc/xinetd.d/tftp and put this entry:

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}

3. Make /tftpboot directory

$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot

4. Start tftpd through xinetd

$ sudo /etc/init.d/xinetd start

5. Testing. Tranfering file hda.txt from 192.168.1.100 (Client using tftp) to 192.168.1.100 (Server 192.168.1.100). Get an example file to transfer (eg. hda.txt)

$ touch /tftpboot/hda.txt
$ chmod 777 /tftpboot/hda.txt
$ ls -l /tftpboot/
total 0
-rwxrwxrwx 1 davids davids 0 2006-03-27 23:04 hda.txt
$ tftp 192.168.1.100
tftp> put hda.txt
Sent 722 bytes in 0.0 seconds
tftp> quit
$ ls -l /tftpboot/
total 4
-rwxrwxrwx 1 davids davids 707 2006-03-27 23:07 hda.txt

2009/10/22

Move and populate md device on different server

Filed under: Server — Mathz @ 20:58

sudo mdadm –assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1

re-add disk
sudo mdadm –add /dev/md1 /dev/sda1 /dev/sdc1

Start md
sudo mdadm -R /dev/md1

2009/09/11

How To Install VMware Server 2 On Ubuntu 9.04

Filed under: Server — Mathz @ 20:32

http://www.howtoforge.com/how-to-install-vmware-server-2-on-ubuntu-9.04:

sudo aptitude install linux-headers-`uname -r` build-essential xinetd

tar xvfz VMware-server-*.tar.gz
cd vmware-server-distrib
sudo ./vmware-install.pl

/etc/initramfs-tools/modules
pvscsi

sudo mkinitramfs -o /boot/initrd.img-2.6.28-18-server

gzip -dc ../initrd.img | cpio -ivd

2009/08/03

OpenDNSSec

Filed under: Server — Mathz @ 13:28

http://www.opendnssec.org/

sudo aptitude install build-essential

http://trac.opendnssec.org/wiki/Signer/Install

2009/07/10

md device

Filed under: Server — Mathz @ 18:34

mdadm –create /dev/md0 –chunk=4 –level=0 –raid-devices=2 /dev/sda4 /dev/sdb1

mdadm -A <md-device> <components> –homehost=<somestring> –update=homehost

  • sudo nano /etc/udev/rules.d/85-mdadm.rules

Then find this text, which should be the only uncommented text:

 

SUBSYSTEM=="block", ACTION=="add|change", ENV{IDFSTYPE}=="linux_raid*", \
       RUN+="watershed /sbin/mdadm --assemble --scan --no-degraded"

 

Replace the --no-degraded option with the --run option like so:

 

SUBSYSTEM=="block", ACTION=="add|change", ENV{IDFSTYPE}=="linux_raid*", \
       RUN+="watershed /sbin/mdadm --assemble --scan --run"

 

Then propagate the changes to every initrd with the following command:

  • sudo update-initramfs -u -k all

2009/06/29

pure-ftpd-mysql

Filed under: Server — Mathz @ 21:56

How to install and configure pure-ftpd

This is how to install and configure the pure-ftpd ftp server on your Ubuntu or Debian server or workstation.
First use apt to download and install the pure-ftpd package – it is available from default repositories :

root@box:~# apt-get install pure-ftpd
.
.
.
Setting up pure-ftpd (1.0.21-11ubuntu1) ...
Starting ftp server: Running: /usr/sbin/pure-ftpd -l pam -u 1000 -E -O clf:/var/log/pure-ftpd/transfer.log -B

As the latest line of apt output tells us, the server is already started with some default options passed to the binary via the command line.

The way to configure pure-ftpd is quite different from to other Debian / Ubuntu software. When installed as a service and started during the init process, pure-ftpd is invoked by a script called pure-ftpd-wrapper. What’s unusual is that instead of reading a single configuration file for all options, the script uses a directory full of one-line files. Let’s have a look in /etc/pure-ftpd/conf :

root@box:~# cd /etc/pure-ftpd/conf/
root@box:/etc/pure-ftpd/conf# ls -la
total 24K
-rw-r--r-- 1 root 36 2007-06-22 02:01 AltLog
-rw-r--r-- 1 root 5 2007-06-22 02:01 MinUID
-rw-r--r-- 1 root 4 2007-06-22 02:01 NoAnonymous
-rw-r--r-- 1 root 4 2007-06-22 02:01 PAMAuthentication
-rw-r--r-- 1 root 28 2007-06-22 02:01 PureDB
-rw-r--r-- 1 root 3 2007-06-22 02:01 UnixAuthentication

Each of those files describes a command-line option of the pure-ftpd server. For example, the file AltLog contains the format of, and path to, the tranfer log file :

root@box:/etc/pure-ftpd/conf# cat AltLog
clf:/var/log/pure-ftpd/transfer.log

Let’s now set some of the basic options by editing those one-liners (our server will listen to port 21 on all available interfaces, and will use IP 12.34.56.78 and ports 4500-4600 for passive mode – don’t forget to forward those from your NAT router if you are behind one):

root@box:/etc/pure-ftpd/conf# echo ,21 > Bind
root@box:/etc/pure-ftpd/conf# echo 12.34.56.78 > ForcePassiveIP
root@box:/etc/pure-ftpd/conf# echo 4500 4600 > PassivePortRange

Now for some recommended security stuff :

root@box:/etc/pure-ftpd/conf# echo yes > ChrootEveryone
root@box:/etc/pure-ftpd/conf# echo yes > ProhibitDotFilesRead
root@box:/etc/pure-ftpd/conf# echo yes > ProhibitDotFilesWrite
root@box:/etc/pure-ftpd/conf# echo yes > NoChmod
root@box:/etc/pure-ftpd/conf# echo yes > BrokenClientsCompatibility

Let’s also set some limits to avoid abuse :

root@box:/etc/pure-ftpd/conf# echo 4 > MaxClientsPerIP
root@box:/etc/pure-ftpd/conf# echo 20 > MaxClientsNumber

Now the important thing we need to decide is what user authorization method(s) our server will support. Options include Unix Authentication (anyone with a login account on the server will have ftp access), but I chose PureDB authentication, which involves a dedicated pure-ftpd “virtual users” base.
So let’s disable Unix and PAM auth, set the path to the PureDB user file, and add PureDB as an auth method by linking to it from the /etc/pure-ftpd/auth directory :

root@box:/etc/pure-ftpd/conf# echo no > PAMAuthentication
root@box:/etc/pure-ftpd/conf# echo no > UnixAuthentication
root@box:/etc/pure-ftpd/conf# echo /etc/pure-ftpd/pureftpd.pdb > PureDB
root@box:/etc/pure-ftpd/conf# ln -s /etc/pure-ftpd/conf/PureDB ../auth/50pure

Let’s now create a (system) user and group that will be bound to all ftp virtual users. For security reasons, that special user should have no home directory (-d /bin/null) and no shell access (-s /bin/false) :

root@box:/etc/pure-ftpd/conf# groupadd -g 2001 ftpgroup
root@box:/etc/pure-ftpd/conf# useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser

We can now use the pure-pw command to add our first virtual user (don’t forget the “pure-pw mkdb” command : it is required to commit/confirm changes to the user file)

root@box:/etc/pure-ftpd/conf# pure-pw useradd myfirstuser -u ftpuser -d /var/ftp/public/
Password:
Enter it again:
root@box:/etc/pure-ftpd/conf# pure-pw mkdb

Let’s add TLS/SSL support and generate a private certificate (you will be asked to provide some information to put in the cert)
root@box:/etc/pure-ftpd/conf# apt-get install openssl
root@box:/etc/pure-ftpd/conf# echo 1 > TLS
root@box:/etc/pure-ftpd/conf# openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
Generating a 1024 bit RSA private key
.
.
.
root@box:/etc/pure-ftpd/conf# chmod 600 /etc/ssl/private/pure-ftpd.pem

Let’s finally restart the server with our all-new config :

root@box:/etc/pure-ftpd/conf# /etc/init.d/pure-ftpd restart
Restarting ftp server: Running: /usr/sbin/pure-ftpd -l puredb:/etc/pure-ftpd/pureftpd.pdb -X -b -u 1000 -C 4 -E -S ,21 -x -c 20 -R -A -p 4500:4600 -O clf:/var/log/pure-ftpd/transfer.log -Y 1 -P 12.34.56.78 -B

All done ! Enjoy a simple, robust and secure ftp server.

How to configure pure-ftpd-mysql on ubuntu: http://www.ubuntu-howto.info/howto/how-to-install-and-configure-pure-ftpd

2009/05/22

Installera Zaptel

Filed under: Asterisk,Server — Mathz @ 21:15

Install Zaptel

Zaptel is a set of tools and drivers for the zapata telephony cards. Even if you don’t own a zapata card is wise to install this packages as it also contains a dummy driver that is used for generating clock ticks that asterisk uses for various tasks, example to play sound files or manage conferences.

Zaptel tools are precompiled in Ubuntu and you can install them like this :

apt-get install zaptel

The zaptel kernel modules are distributed as source only and you will need to use some extra tools to get them running:

apt-get install module-assistant

m-a prepare
m-a get zaptel-source
m-a build zaptel
If you are using 2.6.28 kernel you have problem with m-a build zaptel!

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518017

Untar /usr/src/zaptel.tar.bz2
Add this patch http://svn.debian.org/viewsvn/pkg-voip/zaptel/trunk/debian/patches/hrtimer_2628?view=markup&pathrev=6683
Tar the files to /usr/src/zaptel.tar.bz2, run then m-a build zaptel
m-a install zaptel

modprobe ztdummy

To get ztdummy module loaded at boot time:

echo ztdummy >> /etc/modules

2009/01/14

Zabbix

Filed under: Server — Tags: — Mathz @ 14:29

Ett bra övervakningsprogram som körs på Linux i en Apache och PHP miljö.

Finns klienter för de flesta operativ.

Manual

Source 1.6

För installation på Ubuntu behövs apt-get install gcc libmysqlclient15-dev make

Installera själva servern:

./configure –with-mysql –enable-server –enable-agent
make install

« Newer PostsOlder Posts »

Powered by WordPress