Installing a shiny new Debian Etch as a VMWare Jail Server

mkdir install
cd install

wget http://download3.vmware.com/software/vmserver/VMware-mui-1.0.6-91891.tar.gz
wget http://download3.vmware.com/software/vmserver/VMware-server-1.0.6-91891.tar.gz

tar zxf VMware-mui-1.0.6-91891.tar.gz
tar zxf VMware-server-1.0.6-91891.tar.gz

apt-get install linux-headers-`uname -r` x-window-system gcc psmisc

// Just accept whatever it says when it asks for screen resolution

10 x default

“Read license agreement” Enter + 25 x Space “yes” enter

5 x default

Using compiler “/usr/bin/gcc”. Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.18-6-686/build/include]

(Default value should work)

Do you want networking for your virtual machines? (yes/no/help) [yes]

(Default value should work)

Your computer has multiple ethernet network interfaces available: eth0, eth1,
eth2, eth3. Which one do you want to bridge to vmnet0? [eth0]

(Default value should work)

The following bridged networks have been defined:

. vmnet0 is bridged to eth0

Do you wish to configure another bridged network? (yes/no) [no]

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes]

NO!!!!

5 x default

Enter serial number

jail01:~/install/vmware-server-distrib# inetd

Connect with console and se that it is working before proceding

MUI (optional)

cd ..
cd vmware-mui-distrib/

./vmware-install.pl

Read and agree with eula, enter, 26x Space, “yes” enter

9 x default

And now connect to port : 8333 to se it working

Finally reboot, and confirm that all is allright once again

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Nulstil alle porte på en Cisco 3550

interface FastEthernet0/1
 no switchport
 no ip address
exit
interface FastEthernet0/2
 no switchport
 no ip address
exit
interface FastEthernet0/3
 no switchport
 no ip address
exit

interface FastEthernet0/4
 no switchport
 no ip address
exit
interface FastEthernet0/5
 no switchport
 no ip address
exit
interface FastEthernet0/6
 no switchport
 no ip address
exit

interface FastEthernet0/7
 no switchport
 no ip address
exit
interface FastEthernet0/8
 no switchport
 no ip address
exit
interface FastEthernet0/9
 no switchport
 no ip address
exit
interface FastEthernet0/10
 no switchport
 no ip address
exit
interface FastEthernet0/11
 no switchport
 no ip address
exit
interface FastEthernet0/12
 no switchport
 no ip address
exit
interface FastEthernet0/13
 no switchport
 no ip address
exit
interface FastEthernet0/14
 no switchport
 no ip address
exit
interface FastEthernet0/15
 no switchport
 no ip address
exit
interface FastEthernet0/16
 no switchport
 no ip address
exit
interface FastEthernet0/17
 no switchport
 no ip address
exit

interface FastEthernet0/18
 no switchport
 no ip address
exit
interface FastEthernet0/19
 no switchport
 no ip address
exit
interface FastEthernet0/20
 no switchport
 no ip address
exit
interface FastEthernet0/21
 no switchport
 no ip address
exit
interface FastEthernet0/22
 no switchport
 no ip address
exit
interface FastEthernet0/23
 no switchport
 no ip address
exit
interface FastEthernet0/24
 no switchport
 no ip address
exit
interface FastEthernet0/25
 no switchport
 no ip address
exit
interface FastEthernet0/26
 no switchport
 no ip address
exit
interface FastEthernet0/27
 no switchport
 no ip address
exit
interface FastEthernet0/28
 no switchport
 no ip address
exit
interface FastEthernet0/29
 no switchport
 no ip address
exit
interface FastEthernet0/30
 no switchport
 no ip address
exit
interface FastEthernet0/31
 no switchport
 no ip address
exit
interface FastEthernet0/32
 no switchport
 no ip address
exit
interface FastEthernet0/33
 no switchport
 no ip address
exit

interface FastEthernet0/34
 no switchport
 no ip address
exit
interface FastEthernet0/35
 no switchport
 no ip address
exit
interface FastEthernet0/36
 no switchport
 no ip address
exit
interface FastEthernet0/37
 no switchport
 no ip address
exit
interface FastEthernet0/38
 no switchport
 no ip address
exit
interface FastEthernet0/39
 no switchport
 no ip address
exit
interface FastEthernet0/40
 no switchport
 no ip address
exit
interface FastEthernet0/41
 no switchport
 no ip address
exit
interface FastEthernet0/42
 no switchport
 no ip address
exit
interface FastEthernet0/43
 no switchport
 no ip address
exit
interface FastEthernet0/44
 no switchport
 no ip address
exit
interface FastEthernet0/45
 no switchport
 no ip address
exit
interface FastEthernet0/46
 no switchport
 no ip address
exit
interface FastEthernet0/47
 no switchport
 no ip address
exit
interface FastEthernet0/48
 no switchport
 no ip address
exit

 

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

Cisco 2950 – STP With Uplinkfast, trunks and VLans

no service password-encryption

hostname HOSTNAME

enable secret 5 $ENCRYPTED PASSWORD/
enable password UNECRYPTED PASSWORD

ip subnet-zero
vtp domain pre-dmz
vtp mode transparent

spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
spanning-tree uplinkfast
no spanning-tree vlan 1


vlan 20
 name office
exit
vlan 30
 name drift
exit

interface FastEthernet0/1
 switchport mode trunk
 no ip address 
exit

interface FastEthernet0/2
 switchport mode trunk
 no ip address 
exit


interface FastEthernet0/3
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/4
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/5
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/6
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/7
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/8
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/9
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/10
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/11
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/12
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/13
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/14
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/15
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/16
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/17
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/18
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/19
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/20
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/21
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/22
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/23
 switchport access vlan 20
 no ip address 
exit

interface FastEthernet0/24
 switchport access vlan 20
 no ip address 
exit


interface Vlan10
 no ip address
 no ip route-cache
 shutdown
exit
interface Vlan20
 ip address 192.168.0.0 255.255.255.0
 no ip route-cache
exit
ip http server
exit

 

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

Music on website

It’s very simple to get music playing on your website:

<EMBED NAME=”Player” SRC=”music.mp3″ AUTOSTART=”true” LOOP=”false” TYPE=”audio/mp3″ showvideo=”0″ showcontrols=”0″ showdisplay=”0″ showstatusbar=”0″ ShowCaptioning=”false” ShowPositionControls=”false” nosave=”true”>

This line will start the file ‘music.mp3’ automatic. The options is simple to understand and edit

(The code will embed an invesible windows media player, and will only work with Internet explorer)

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

vmware tools in debian

install vmware-tools in debian:

uname -r and use the matching package for your headers:

apt-get install gcc make linux-headers-2.6.18-5-486

Insert the cd, mount it and unzip /mnt/cdrom/VMwareTools-1.0.4-56528.tar.gz to /tmp/

run the installer and answer all default questions

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Install CURL extension to PHP on debian

It’s simple to install the CURL extension on debian, ubuntu etc. with apt-get

First download curl extension:

apt-get install curl libcurl3 libcurl3-dev php5-curl

When this is done all you need is restarting your apache:

/etc/init.d/apache2 restart

And then it should work

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Fix broken CVS HEAD branch

# go to HEAD sandbox

# remove all sticky tags
cvs upd -A

# merge all changes from the branch point up untill now into HEAD.
# beware! If any changes exists in HEAD, they will be overwritten
cvs upd -j HEAD -j MCS_REL_1

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

Installing an alphaweb server

*********************
Setup etch backports:
*********************

echo “deb http://www.backports.org/debian etch-backports main contrib non-free” >> /etc/apt/sources.list
cat >> /etc/apt/preferences << EOF
Package: *
Pin: release a=etch-backports
Pin-Priority: 999
EOF

wget -O – http://backports.org/debian/archive.key | apt-key add –
apt-get update

***************************
Setup webserver, databases:
***************************

apt-get install apache2 mysql-server postgresql-8.2 php5-cgi php5-cli php5-mysql php5-pgsql php5-curl php5-mcrypt libapache2-mod-fcgid proftpd proftpd-mysql screen php4-cgi php4-common php4-mcrypt php4-mysql php4-pgsql php4-curl

***************************
Change PostgreSQL password:
***************************
su – postgres
psql -d template1 -U postgres
alter user postgres with password ‘newpassword’;

*********************
Install webExchanger:
*********************

Part 1:
mkdir /system
Unpack webExchanger.latest.tar.gz to /system

Part 2:
Create ftp user in mysql
mysql -u root -p

create database ftp;
GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO ‘proftpd’@’localhost’ IDENTIFIED BY ‘newpassword’;
GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO ‘proftpd’@’localhost.localdomain’ IDENTIFIED BY ‘newpassword’;
FLUSH PRIVILEGES;

mysql -u root -p ftp < install/proftpd.sql

Disable mod_postgres in /etc/proftpd/modules.conf

Part 3:
Edit webExchanger.inc
Edit webExchanger_IPs.conf

Part 4:
Add webExchanger vhosts to apache:
echo “Include /system/webExchanger_vhost.conf” >> /etc/apache2/httpd.conf
Create wrappers dir:
mkdir /home/wrappers

Part 5:
Replace /usr/lib/apache2/suexec with suexec in install
Enable suexec
a2enmod suexec

Part 6:
Open an screen and execute ./startWeb.sh

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

Roku Soundbrigde Streaming fra Icecast

I have to write this down while its fresh in my memory …

At the office we have a Roku Soundbridge which is a unit with a lot of potentiale and right now i unleashed just a bit more of it.

My goal was that i wanted to play music files in XMM on my computer and somehow route the sound to the soundbridge (and the stereo at the office)

I tried a lot and i installed a lot of crap which i may not be using, but what i think i did is the following:

I followed three different guides to install the icecast server. Icecast are installed from ubuntus repository We start ice cast with:

# icecast -p 5BQcAllxH1J3o

which is an encrypted password made with the command mkpasswd:

root@mike-desktop:~# mkpasswd foo
ceH4GRvoZ46vw

The hash is different everytime you run it … which for some reason is normal (i didnt bother looking into it)

The icecast config file looks like this:

——————–

location Just west of Mars
rp_email kirk@enterprise.space
server_url http://www.icecast.org/

max_clients 900
max_clients_per_source 900
max_sources 10
max_admins 5
throttle 10.0

use_meta_data 0
streamurllock 0
streamtitletemplate %s
streamurl http://10.0.0.255:8000/mike/
nametemplate %s
desctemplate %s

mount_fallback 1

encoder_password YAtutg4TIWqEA #hackme
admin_password YAtutg4TIWqEA #hackme
oper_password YAtutg4TIWqEA #hackme

touch_freq 5

port 8000
port 8001

server_name 10.0.0.255

force_servername 0

logfile icecast.log
accessfile access.log
usagefile usage.log
logfiledebuglevel 0
consoledebuglevel 0

reverse_lookups 1

console_mode 0

client_timeout 30

kick_clients 0

staticdir /usr/share/icecast/static

templatedir /usr/share/icecast/templates

logdir /var/log/icecast
stats_log stats.log
statshtml_log stats.html
stats_time 60

alias radiofri http://195.7.65.207:6903

kick_relays 10

transparent_proxy 0

acl_policy 1

———————

I stole this from one of the eight or some guides i looked at this night, dunno which one but this works.

Ubuntus repository has a package names “xmms-liveice” which gives you an effect plugin that will stream the played file to the icecast server.

And then i programmed:

http://10.0.0.255:8000/mike

into my Ruko as “Radio Skive” (that’s going to be fun next time my colleages wonder why the local radiostation plays the same artists all the time … ofcourse depending on if they’l read this before that happends)

Either way … this works for me … i spend three hours on it … and forgot to do my work … luckilly im the boss :p

.. as a small sidenote i found a program nammed “Soundbridge Commander”, written in java and it gives me remote access to the Roku’s display and on screen remote control.

http://sbcommander.sourceforge.net/

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

Sending SMS From Linux (Sony Ericsson and Gnokii)

the phone should show up in dmesg like:

usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
cdc_acm 2-1:1.1: ttyACM0: USB ACM device
cdc_acm 2-1:1.3: ttyACM1: USB ACM device

# apt-get install gnokii

edit /etc/gnokiirc and change the following values:

port = /dev/ttyACM0
model = AT

Now you should be able to id your phone:

mybox:~# gnokii –identify
GNOKII Version 0.6.14
IMEI : 359148001224827
Manufacturer : Sony Ericsson
Model : AAB-1022041-BV
Product name : AAB-1022041-BV
Revision : R4CH003 R4CH003

And send SMS’es like:

nagios:/# gnokii –sendsms +4500000000
GNOKII Version 0.6.14
Please enter SMS text. End your input with <cr><control-D>:Foobar

Send succeeded!
nagios:/#

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar