Posts Tagged ‘debian’

vmware on debian 5

This will get vmware going on your Debian 5 box.

add “contrib non-free” after “main” to the various lines in your /etc/apt/sources.list file

before running the vmware installer, do some dependency installs: apt-get install gcc g++ make perl psmisc linux-headers-`uname -r`

download from: https://www.vmware.com/tryvmware/p/download.php?p=workstation-l. login or register then select your download. I suggest installing via the rpm, in which case: apt-get install alien.

converting the rpm to a deb takes about 15 minutes, but it is easier than installing from a tarball (.tar.gz).
alien --to-deb --scripts [vmware-rpm-name].rpm
after about 1-5 minutes should output a deb file
at which point run the command: dpkg -i [vmware-pkg-name].deb
take another 5-10 minutes to install all the files

start via vmware command, be sure to be connected via vnc or in some sort of X-Window environment.

Apache2 with Perl, PHP, Python and Ruby on Debian 5

This install assumes a semi-clean Debian 5 install and some access to a root console. The node must have around 220MB ram +/- 20 MB (or a large swap partition and a fast hard drive). The initial installs of some of these services take a heavy toll on ram. Tweaking will be done to speed up the services. This is meant as a multi-user development server, not a production server. I will be working on getting this working on nginx, so the speed and performance will be much better. For ease of installation, apache2 will have to do.

To do this with <400MB of ram we need to keep the applications that apt-get installs from starting.

1) Create a file /usr/sbin/policy-rc.d containing:

#!/bin/sh
exit 101

2) chmod +x /usr/sbin/policy-rc.d

After that, packages will install correctly, but not start.

Once you’re done and ready to snapshot your pristine chroot/image, just delete that file. That will let the service start as normal on future boots.

http://ubuntuforums.org/showthread.php?t=856815

install everything we need in one big apt-get install command
apt-get install ssh mysql-server apache2 php5 phpmyadmin openssl vsftpd libapache2-mod-python libapache2-mod-ruby rubygems libapache2-mod-perl2 libapache2-mod-wsgi libapache2-reload-perl libapache2-request-perl libapache2-mod-fcgid libfcgi-ruby1.8 libmysql-ruby libapache2-mod-scgi ruby libzlib-ruby rdoc irb rubygems rails eruby

hostgator banner

Once the installation is done, remove “/usr/sbin/policy-rc.d” – rm /usr/sbin/policy-rc.d – so that the various applications will be able to start.

I don’t know a whole lot about exim4, so I just start it without messing with the config files.
/etc/init.d/exim4 start

edit mysql config file – /etc/mysql/my.cnf
I like to comment out the bind-address line so that I can access the mysql database remotely in my other test environments.
start it when done: /etc/init.d/mysql start

edit vsftpd config file to your liking – /etc/vsftpd.conf
and start it: /etc/init.d/vsftpd start

edit apache2 main configuration file so that it takes up less ram
vi /etc/apache2/apache2.conf

—- Start File Excerpt —-
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to “Off” to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers          1
MinSpareServers       1
MaxSpareServers       1
MaxClients            3
MaxRequestsPerChild  20
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers          1
MaxClients           20
MinSpareThreads      25
MaxSpareThreads      75
ThreadsPerChild      25
MaxRequestsPerChild  20
</IfModule>
—- End File Excerpt —-

enable various apache2 modules that we need
a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include

edit apache vhost configuration file [/etc/apache2/sites-available/default] or .htaccess file to enable perl, python, and ruby. php should already be setup and good to go.

—- Start File Excerpt —-
<VirtualHost *:80>
ServerAdmin jzerbe@lizardking.biz
DocumentRoot /home/jason/www/
<Directory /home/jason/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
<Directory /home/jason/www/>
Options +ExecCGI
AddHandler cgi-script rb cgi pl
</Directory>
</VirtualHost>

—- End File Excerpt —-

finally start apache2
/etc/init.d/apache2 start

To test that this works, try the following test scripts: test.rb, test.pl, test.py, and test.php.

For more information about the ruby on rails installation see this howtoforge.com article.

On a side note: I was doing this on a vmware node and ran out of space, expanding a vmdisk is pretty easy to do: 1) cd into VMware Workstation/Server directory 2) vmware-vdiskmanager -x [500MB/5GB/etc.] "[path to vmdisk].vmdk" 3) program expands virtual disk.

Latitude C600 Debian Linux

This procedure outlines the setup that I ran to achieve a pretty solid Debian 5 setup on my Latitude C600. Works well even though ~ 500MHZ, 128MB ram, 20GB hdd. I also included the the setup for my PCMCIA DWL-G630 wireless card. Currently no native driver provides WPA support for the G630, so you’ll have to use ndiswrapper if you want WPA. I need to use a native driver for Kismet’s scanning ability to work properly. Grammar will not be focused on.

do netinstall with laptop packages enabled, default partitions will work just fine
apt-get install ssh xfs xdm fluxbox xorg – this should take care of the gui and remote administration
optionally you can install tightvncserver for remote gui access
modify /etc/X11/xdm/Xservers for your preferred depth and geometry

modify /etc/apt/sources.list to include contrib and non-free packages: deb [server uri] lenny main contrib non-free
add the line so installation of wicd will work later: deb http://apt.wicd.net lenny extras
to add the gpg key for the wicd repo: wget http://apt.wicd.net/wicd.gpg -O- | apt-key add -
do an apt-get update

just in case the netinstall didn’t already install this package for cardbus support: apt-get install pcmcia-cs
follow the instructions found here: http://acx100.sourceforge.net/wiki/Distribution_list/Debian [for installing the ACX based DWL-G630 pcmcia card]
remember to perform special instructions for ACX111 chipset (which the DWL-G630 is)

apt-get upgrade, and then install wicd and kismet

For battery details I put together the following bash script and stuck it in /bin/bat. This allows me to type “bat” to get details on the battery status.
#!/bin/bash
more /proc/acpi/battery/BAT0/state

Automounting is a must have: apt-get install autofs
enable the auto.misc file by vi /etc/auto.master and uncommenting. vi /etc/auto.misc and change the cdrom entry to cdrw and remove the “ro,” bits from the line. if you have a cdrw drive that is. restart the daemon to finish.

in case you are looking for a gui minimal dependency file manager go with thunar.
that wraps it up.

Return top