Coburn
Posts: 78
Joined: Tue Sep 06, 2011 2:57 am
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Tue Oct 23, 2012 7:46 am

Oh, I am such an idiot. :shock:

I was working on my 8GB "r-pi work" SD, not the 2GB SD that I've dedicated to Raspberry Server.
*sigh*

Tarball tomorrow. Sorry about this.

Coburn
Posts: 78
Joined: Tue Sep 06, 2011 2:57 am
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 2:58 am

Update: New 2GB SD Image is getting uploaded as I speak. Currently on 25%, about 3.5 hours to go until uploaded (I hate my ADSL2+ Uplink - 1Mbps is a joke).

This image is version 1.1-RC1 (Release Candiate 1 before it goes gold).
Updated to latest kernel and modules. Tested and confirmed working.

There's two folders on the boot partition for 256MB or 512MB pies. Copy them to the root folder of the SD boot parition, then delete the stock start.elf and rename the start_240.elf or start_496.elf to start.elf and presto.

Download link by 5PM GMT+10 today.

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 9:34 am

Coburn wrote:Update: New 2GB SD Image is getting uploaded as I speak. Currently on 25%, about 3.5 hours to go until uploaded (I hate my ADSL2+ Uplink - 1Mbps is a joke).

This image is version 1.1-RC1 (Release Candiate 1 before it goes gold).
Updated to latest kernel and modules. Tested and confirmed working.

There's two folders on the boot partition for 256MB or 512MB pies. Copy them to the root folder of the SD boot parition, then delete the stock start.elf and rename the start_240.elf or start_496.elf to start.elf and presto.

Download link by 5PM GMT+10 today.
YAYAYAYAYYAY!!!

Coburn
Posts: 78
Joined: Tue Sep 06, 2011 2:57 am
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 11:20 am

It's out. To prevent bots leeching the download, replace hxxp with http .

Use a quality archiver like 7z 9.29 Alpha to unzip.

Image: hxxp://dandere.net/rpi/raspberry-server-web-2gb-11rc1.img.xz

Use a tool like WinMD5 to ensure that your download isn't corrupt:

MD5Sums: hxxp://dandere.net/rpi/md5sum.txt

Use Win32 Disk Imager to write this to your SD. Then make sure you use the right boot loader "start.elf" file, see post above the one above, and boot. Then watch your R-Pi explode into fireworks... erm... turn into a lean mean webserver machine. 8-)

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 1:24 pm

Downloaded, checksum correct, 7-Zip can't open the .img file as archive, after successfully writing to the SD the led of the reader keeps flashing, can't access the boot partion in W7 64 to change start.elf ('needs to be formatted'), Pi just shows a steady red light when trying to boot.

:(

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 1:25 pm

Coburn wrote:It's out. To prevent bots leeching the download, replace hxxp with http .

Use a quality archiver like 7z 9.29 Alpha to unzip.

Image: hxxp://dandere.net/rpi/raspberry-server-web-2gb-11rc1.img.xz

Use a tool like WinMD5 to ensure that your download isn't corrupt:

MD5Sums: hxxp://dandere.net/rpi/md5sum.txt

Use Win32 Disk Imager to write this to your SD. Then make sure you use the right boot loader "start.elf" file, see post above the one above, and boot. Then watch your R-Pi explode into fireworks... erm... turn into a lean mean webserver machine. 8-)
Download is very slow? like 100kb/sec!

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 1:30 pm

poing wrote:Downloaded, checksum correct, 7-Zip can't open the .img file as archive, after successfully writing to the SD the led of the reader keeps flashing, can't access the boot partion in W7 64 to change start.elf ('needs to be formatted'), Pi just shows a steady red light when trying to boot.
:(
Did you try this?:
There's two folders on the boot partition for 256MB or 512MB pies. Copy them to the root folder of the SD boot parition, then delete the stock start.elf and rename the start_240.elf or start_496.elf to start.elf and presto.

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 1:34 pm

pigeorgetaylor wrote:
poing wrote:Downloaded, checksum correct, 7-Zip can't open the .img file as archive, after successfully writing to the SD the led of the reader keeps flashing, can't access the boot partion in W7 64 to change start.elf ('needs to be formatted'), Pi just shows a steady red light when trying to boot.
:(
Did you try this?:
There's two folders on the boot partition for 256MB or 512MB pies. Copy them to the root folder of the SD boot parition, then delete the stock start.elf and rename the start_240.elf or start_496.elf to start.elf and presto.
Well, I tried to access the boot partition but I can't access the card, which is the main problem. Other images' boot partitions were always visible in Windows. So no, I didn't :D

benzeman
Posts: 108
Joined: Fri Apr 20, 2012 12:04 pm
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 5:51 pm

No offence, but what's wrong with your server? I'm pulling 256KiB on a 4MiB connection! :(

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 5:53 pm

Coburn wrote:
There's two folders on the boot partition for 256MB or 512MB pies. Copy them to the root folder of the SD boot parition, then delete the stock start.elf and rename the start_240.elf or start_496.elf to start.elf and presto.
The newer versions of Raspbian have made dealing with different memory model RPi's a lot simpler. You can just add to the config.txt

# Set memory split depending on which memory type unit it is
gpu_mem_256=240
gpu_mem_512=496

Or what ever memory splits you want to use. Then you can use the same config on either memory model... and the number of elf files is reduced to:

start_cd.elf
start.elf

This was added in #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 6:13 pm

benzeman wrote:No offence, but what's wrong with your server? I'm pulling 256KiB on a 4MiB connection! :(
300kb/sec on a 51mib connection!

Boezelman
Posts: 40
Joined: Sun Aug 05, 2012 3:25 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 6:31 pm

Thanks for the image, its works great!

Question though: what are the default log-in details?

Main pogin = pi / raspberry
phpmyadmin = ??? (can't log in)
sql = ???

And the main dir for placing the website(s) is /home/pi/www instead of /var/www/ ?

benzeman
Posts: 108
Joined: Fri Apr 20, 2012 12:04 pm
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 6:33 pm

Dweeber wrote:
Coburn wrote:
There's two folders on the boot partition for 256MB or 512MB pies. Copy them to the root folder of the SD boot parition, then delete the stock start.elf and rename the start_240.elf or start_496.elf to start.elf and presto.
The newer versions of Raspbian have made dealing with different memory model RPi's a lot simpler. You can just add to the config.txt

# Set memory split depending on which memory type unit it is
gpu_mem_256=240
gpu_mem_512=496

Or what ever memory splits you want to use. Then you can use the same config on either memory model... and the number of elf files is reduced to:

start_cd.elf
start.elf

This was added in #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
FYI, those would give you 240 and 496 MB for the GPU. All you need is GPU_men=16 and the CPU will get whatever is left :)

the MySQL passwords will be root/root

Boezelman
Posts: 40
Joined: Sun Aug 05, 2012 3:25 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 6:40 pm

root/root doesn't work..!

Code: Select all

#2002 Cannot log in to the MySQL server

benzeman
Posts: 108
Joined: Fri Apr 20, 2012 12:04 pm
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 6:44 pm

Boezelman wrote:root/root doesn't work..!

Code: Select all

#2002 Cannot log in to the MySQL server
if you've tried pi raspberry then I have no idea. there should be a way to change it in sudo mysql, I have no idea how though :(

Boezelman
Posts: 40
Joined: Sun Aug 05, 2012 3:25 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 6:54 pm

tried both, didn't work.

found 2 tutorials that didn't work, to bad :)

joelkaberg
Posts: 14
Joined: Tue Oct 23, 2012 7:02 am

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 7:34 pm

you should really consider changeing apache for something more CPU / RAM friendly like

gatling: http://www.fefe.de/gatling/
thttpd: http://acme.com/software/thttpd/
nginx: http://nginx.org/

also (i dont know if this has been added, so im sorry if i overlooked) you should consider optimizing the build for sdcard usage. leting that poor sdcard get hammerd by the web (and/or mysql, ftp etc) will for sure end its life expectancy way to early.. how about loading some stuff into ram?

this is a shell script made for apache (modifiy if you use nginx etc), just chmod and execute (if you cant see what it does, dont use it)

Code: Select all

# Minimisation of swap usage
echo 0 > /proc/sys/vm/swappiness
# Minimisation of disk writes
# add ",commit=120" for ext3, 4
sed -i -e "s/errors\=remount\-ro/errors=remount-ro,noatime/g" /etc/fstab
# Adapt Grub
sed -i -e "s/ro  quiet/ro quiet acpi=force irqpoll/g" /boot/grub/grub.cfg
# Inform rc we are using ram
sed -i -e "s/RAMRUN\=no/RAMRUN=yes/g" /etc/default/rcS
sed -i -e "s/RAMLOCK\=no/RAMLOCK=yes/g" /etc/default/rcS
# Modify fstab for tmpfs
cat >> /etc/fstab << "EOF"
tmpfs           /var/tmp            tmpfs   defaults        0       0
tmpfs           /var/mail            tmpfs   defaults        0       0
EOF
# specific tuning for flash drive
cat >> /etc/sysctl.conf << "EOF"

# specific tuning for flash drive
vm.swappiness = 0
vm.laptop_mode = 0
vm.dirty_writeback_centisecs = 12000
vm.dirty_expire_centisecs = 12000
vm.dirty_ratio = 10
vm.dirty_background_ratio = 1
EOF
# Make delayed write in /etc/rsyslog.conf
sed -i -e "s/\t\//\t\-\//g" /etc/rsyslog.conf
# Install ramlog
wget http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb
apt-get -y install lsof
dpkg -i ramlog_2.0.0_all.deb
# Set ramlog to write to HDD every hour
cp /etc/cron.daily/ramlog /etc/cron.hourly/ramlog
# Edit collectd
sed -i -e "s/DataDir \"\/var\/lib\/collectd\/rrd\"/DataDir \"\/var\/log\/collectd\/rrd\"/g" /etc/collectd/collectd.conf
mkdir /var/log/collectd
sed -i -e "s/DATA\=\"\/var\/lib\/collectd\/rrd\/localhost\"/DATA\=\"\/var\/log\/collectd\/rrd\/localhost\"/g" /usr/sbin/omv-mkgraph
# Edit monit
echo "set statefile /var/log/monit/monit.state" >> /etc/monit/monitrc
sed -i -e "s/ARGS\=\"\-c \$CONFIG \-s \/var\/lib\/monit\/monit\.state\"/ARGS\=\"\-c \$CONFIG \-s \/var\/log\/monit\/monit\.state\"/g" /etc/init.d/monit
mkdir /var/log/monit
# Adjust ramlog config
sed -i -e "s/# Description: ramlog daemon moves \/var\/log to ramdisk on startup and copies it back to harddrive on shutdown or restart/# Description: ramlog daemon moves \/var\/log to ramdisk on startup and copies it back to harddrive on shutdown or restart\n#\n# X\-Start\-Before: \$syslog rsyslogd smbd nmbd apache2 proftpd php5 samba ups dmesg ssh nfs nfsd monit statd\n# X\-Stop\-After: \$syslog rsyslogd smbd nmbd apache2 proftpd php5 samba ups dmesg ssh nfs nfsd monit statd\n# X\-Interactive: true/g" /etc/init.d/ramlog
# To get apache logging on a tmpfs
cat > /etc/init.d/apache2-tmpfs << "EOF"
#!/bin/bash
#
### BEGIN INIT INFO
# Provides:          apache2-tmpfs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Required-Start:   
# Required-Stop:    
# Short-Description: Create /var/log/apache2/error.log on tmpfs at startup
# Description:       Create /var/log/apache2/error.log needed by Apache.
### END INIT INFO

#
# main()
#
case "${1:-''}" in
  'start')
   # create the /var/log/apache2/error.log needed by apache
   mkdir /var/log/apache2
   chmod 777 /var/log/apache2
   touch /var/log/apache2/error.log
   chmod 777 /var/log/apache2/error.log
   ;;
  'stop')
   ;;
  'restart')
   ;;
  'reload'|'force-reload')
   ;;
  'status')
   ;;
  *)
   echo "Usage: $SELF start"
   exit 1
   ;;
esac
EOF
chmod 755 /etc/init.d/apache2-tmpfs
insserv -v

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 8:29 pm

MY SQL
SSH
FTP

Fail at start up?

benzeman
Posts: 108
Joined: Fri Apr 20, 2012 12:04 pm
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 8:32 pm

pigeorgetaylor wrote:MY SQL
SSH
FTP

Fail at start up?
I've not got MySQL, but I have the other 2! When I try to start or restart mysql, it fails...

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 8:42 pm

benzeman wrote:
pigeorgetaylor wrote:MY SQL
SSH
FTP

Fail at start up?
I've not got MySQL, but I have the other 2! When I try to start or restart mysql, it fails...
Hmmmmm.... gonna check out the interfaces files.

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 8:50 pm

OK, Its just My SQL now! how do i uninstall it? Forgotten package name!

Coburn
Posts: 78
Joined: Tue Sep 06, 2011 2:57 am
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Wed Oct 24, 2012 9:55 pm

Good to hear that people are getting a mixed bag of results.
Also, sorry for forgetting to mention, the mysql root access is 'root' / 'RaspberryPi'

Also, with the mysql issue at boot, there's a bug in the init script. It fails to remove the socket file. So, to fix it, you just do

Code: Select all

rm /var/run/mysql/*.sock
And then either reboot or start mysql. I suspect this is just a problem with the Raspbian package.

Remember, I do not use Apache. If you like, the correct feature list is here on my site.

EDIT:
What's start_cd.elf ?
And what start.elf would I use? The one from the boot folder on the git?

EDIT2:
@joelkaberg : I've been considering doing tmpfs for /var/run and a few others. Might do so because then that would be helpful saving sdcard read/write cycles.

Coburn
Posts: 78
Joined: Tue Sep 06, 2011 2:57 am
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Thu Oct 25, 2012 6:58 am

RC2 has been built and I'm pleased to say that there's no errors on boot. Well, there is one about lighttpd's log files not being accessable, but there's a work around for that which is automatically applied.

I am also trying out making a RAR archive with the image. Hopefully it will be smaller than 512MB, which is the limit that I can upload per file, since a member was kind enough to link me to a file host that is decent.

pigeorgetaylor
Posts: 21
Joined: Sun Oct 07, 2012 5:59 pm

Re: [Distro] Raspberry Server: Web Edition

Thu Oct 25, 2012 7:15 am

Coburn wrote:RC2 has been built and I'm pleased to say that there's no errors on boot. Well, there is one about lighttpd's log files not being accessable, but there's a work around for that which is automatically applied.

I am also trying out making a RAR archive with the image. Hopefully it will be smaller than 512MB, which is the limit that I can upload per file, since a member was kind enough to link me to a file host that is decent.
This does look very light! It's also very fast to boot! Keep up the good work :)

User avatar
neophytte
Posts: 16
Joined: Thu Oct 11, 2012 5:58 am
Location: Perth, Australia
Contact: Website

Re: [Distro] Raspberry Server: Web Edition

Thu Oct 25, 2012 7:20 am

Coburn wrote:RC2 has been built and I'm pleased to say that there's no errors on boot.
Is it the same URL, or not available for d/l yet??

Thanks

Richard
{sig}
Pi1 [media]: Updated version Raspberry Pi (B, rev2, 512Mb), Samsung 58" Plasma (PN58C8000YFXZA), 8GB Class 6 SD Card with RaspBMC
Pi2 [webserver?]: Original Raspberry Pi (B, rev1, 256Mb), headless, 4Gb Class 6 SD Card
{/sig}

Return to “Networking and servers”