PDA

View Full Version : For general purpose server



martinkong
06-23-2004, 07:49 PM
Is there any mini Knoppix variant out there that's more suitable for server purposes:

- no need for desktop app. or even X windows
- support more harddrive mount points (from reading doc., my understanding is that only /home is supported)
- with enhanced security, e.g. with SELinux

Thanks!

arkaine23
06-24-2004, 04:36 PM
/home is writeable because it exists in ram. Likewise /etc/ and /var have some limited space that can be written in ram for logs and configuration changes. However, you can create many mountpoints for permanent mediums such as hard disks, optical disks, and usb pen drives....

Most if not all of these remasters feature some form of Xwindows manager. However, it would be simple to take a CD you like and set it to run in text mode (there's even a cheatdoce for this). X would still be installed, but it would not be using any resources.

martinkong
06-24-2004, 04:51 PM
/home is writeable because it exists in ram. Likewise /etc/ and /var have some limited space that can be written in ram for logs and configuration changes. However, you can create many mountpoints for permanent mediums such as hard disks, optical disks, and usb pen drives

The only see persistent /home in knoppix documentation. That's why I thought you can only map /home to hd. So does it mean I can map other mount points (e.g. /usr/local, /var/log, /opt, etc) onto HD?

ja30278
06-25-2004, 03:37 PM
I am working on a hybrid live-cd/HD based remaster for server use.

Basically, all directories that contain config files and/or commonly writable dirs (/etc, /var/www, /var/lib/mysql) are symlinks pointing back to a single directory (in this case /bbix/var/www). Then, I can add an entry to the fstab file to mount a volume by label(LABEL=bbix /bbix auto rw,exec 0 0); if the volume is present, it will mount into the tree at /bbix, in effect overwriting the default configs and allowing changes to persist acrosss reboots. If no volume is present with the correct label, the mount fails and default configs are used. I am working on some python based install scripts to automate partitioning/labeling/rsyncing of the drive (also handling automatic set up of /etc/raidtab for mirroring)

custardweasel
02-23-2005, 01:17 AM
How are you getting on with your server re-master? this is something i've been wanting to do for ages. If you've had any success please let me know!
Thanks
Dylan

markpreston
02-23-2005, 08:52 AM
I have set up a LAMP server remaster of Knoppix 3.3
See

http://truth.positive-internet.com/~mpreston/tp/tp0412intro.html

and

http://truth.positive-internet.com/~mpreston/rm/remastering1.html

For my Toophpix distro I put the following scripts in the /KNOPPIX/usr/local/bin/
directory, linked to Desktop icons

For save to USB the commands I am using are:
(Desktop icon runs sudo /usr/local/bin/saveToUSB)
and
#!/bin/bash

# Back up toophpix data to USB device.
modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysqldump --opt -u root toophpix > /mnt/usbstore/toophpix.sql
umount /mnt/usbstore


For restore from USB the commands I am using are:
(Desktop icon runs sudo /usr/local/bin/restoreFromUSB)
and

#!/bin/bash

# Restore MySQL toophpix database from USB device
modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysql -u root toophpix < /mnt/usbstore/toophpix.sql
umount /mnt/usbstore

The umount commands at the end help ensure that the USB device can be
mounted if the user clicks on the
Desktop icon (Hard-Disk Partition sda1) that appears once Knoppix has
booted up or when the USB device is identified when inserted.
toophpix is the name of the database that is backed up. I am sure these could be improved
upon.

markpreston
02-23-2005, 08:27 PM
The commands I am using to start my LAMP server are

/etc/init.d/apache start
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &

once knoppix is running from the CDROM.
Hope this helps.