Raspberry PI: Raspbian – LAMP Stack (Linux, Apache, MySAL, PHP)

Type: sudo apt-get install mysql-client mysql-server

Enter Password for MySQL
Retype Password for MySQL

Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, and mcrypt can be installed as follows:

Type: sudo apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-ruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached

Web server to reconfigure automatically: <- apache2 Configure database for phpmyadmin with dbconfig-common? <- no Then run the following command to enable the Apache modules suexec, rewrite, ssl, actions, and include (plus dav, dav_fs, and auth_digest if you want to use WebDAV): Type: sudo a2enmod suexec rewrite ssl actions include

Type: sudo a2enmod dav_fs dav auth_digest

Next open /etc/apache2/mods-available/suphp.conf…

Type: sudo nano /etc/apache2/mods-available/suphp.conf

Comment out the <FilesMatch “\.ph(p3?|tml)$”> section
Add AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml

<IfModule mod_suphp.c>
    #<FilesMatch "\.ph(p3?|tml)$">
    #    SetHandler application/x-httpd-suphp
        AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
        suPHP_AddHandler application/x-httpd-suphp

    <Directory />
        suPHP_Engine on

    # By default, disable suPHP for debian packaged web applications as files
    # are owned by root and cannot be executed by suPHP because of min_uid.
    <Directory /usr/share>
        suPHP_Engine off

# # Use a specific php config file (a dir which contains a php.ini file)
#       suPHP_ConfigPath /etc/php5/cgi/suphp/
# # Tells mod_suphp NOT to handle requests with the type .
#       suPHP_RemoveHandler 

Restart Apache

Type: sudo /etc/init.d/apache2 restart

Raspberry PI: Raspbian – Headless Multi Boot From USB Hard Drive

Unfortunately these partitions share a boot directory and a kernel, so updates may break one of the systems. The kernel version will also most likely will have to be the same on both systems. However, since I wanted to keep developing my hardened raspbian and start setting up a server this allows me to do both without contaminating my hardened version of raspbian with server programs. Eventually both will get merged but until I have a complete understanding of hardening this is a good alternative.

sudo fdisk /dev/sda

delete partitions

+4G [enter]
+4G [enter]
+1G [enter]

The third partition as a swap is not needed. however, I may choose to enable it at some point.

copy system to partitions

sudo dd if=/dev/mmcblk0p6 of=/dev/sda1
sudo dd if=/dev/mmcblk0p6 of=/dev/sda2

Resize the partitions

sudo resize2fs /dev/sda1
sudo resize2fs /dev/sda2

Make our different boot options

sudo cp /boot/cmdline.txt /boot/sd.txt
sudo cp /boot/cmdline.txt /boot/security.txt
sudo cp /boot/cmdline.txt /boot/server.txt

Edit the text files we just created to load the partitions we want

sudo nano /boot/security.txt
change /dev/mmcblk0p6 to /dev/sda1

sudo nano /boot/server.txt
change /dev/mmcblk0p6 to /dev/sda2

Then to change boot partitions boot into the linux and just copy one of the text files you created to cmdline.txt then reboot.

sudo cp /boot/security.txt /boot/cmdline.txt
sudo reboot

Raspberry Pi: Raspbian – Boot From USB Hard Drive

While this is not a true boot from hard drive since an SD card is still required it will speed up your system and possibly reduce usage of the SD card to prevent SD card failure.

sudo fdisk /dev/sda

If partitions exist delete partitions using d then

[enter] Partition Type
[enter] Partition Number
[enter] Partition Size

If your current partition is on mmcblk0p6 and destination partition sda1 use

sudo dd if=/dev/mmcblk0p6 of=/dev/sda1

sudo resize2fs /dev/sda1

sudo nano /boot/cmdline.txt

change root=/dev/mmcblk0p6 to root=/dev/sda1

ctrl + o
ctrl + x

sudo reboot

Raspberry PI: Fix SD Card Partitions in Windows 8.1

Replace all occurrences of N with a number

Open a Command Prompt

Type: diskpart

A new window will open, In the new window

Type: list disk

Now select the drive number of your SD Card

Type: select disk N

Type: list partition

Repeat the following two steps for all partitions

Type: select partition N

Type: delete partition


Type: create partition primary

Type: format

Raspberry PI: Raspbian – Install

Go to the Raspberry PI Downloads Page.

Download “NOOBS Offline and network install” by clicking Download ZIP.

Once downloaded Open the zip file and copy the contents to an SD Card.

Insert the SD Card into your Raspberry PI.

Turn on your Raspberry PI by plugging it in.

A screen will show up with some options
-Select English US or your language
-Select Keyboard us or your keyboard language
-Select the Raspbian Check box
-click the install button at the top.

When the install finishes you will need to click OK

Once Raspbian has installed there will be a configuration menu. Just use the arrow keys to select Finish unless you have specific configurations you want at this point.

How to Make Money on the Internet


Swag Bucks
Index Dollars


Global Test Market
Swag Bucks
Index Dollars

Your Own Website






Google AdSense




Get A Coder

Sell Stuff


Coin Mining


Bit Coins
Doge Coins
Lite Coins





Cashback For Groceries


Maxtor Shared Storage II : Create New Disk

I have a 320GB version. This method was used to setup 320GB and 500GB drives for use in a Maxtor Shared Storage II single drive device.

Place drive into a linux box or use a LiveCD version of linux to create the drive. Download the firmware from seagate Maxtor Shared Storage II.

Replace all occurrences of X with the drive letter. If any partitions exist on the drive you will need to delete them all with the fdisk command d.

We partition the drive as follows

fdisk /dev/sdX
> n
> Type: p
> Partition: 1
> First: [enter]
> Last: +247M
> n
> Type: p
> Partition: 2
> First: [enter]
> Last: +247M
> n
> Type: p
> Partition: 3
> First: [enter]
> Last: +247M
> n
> Type: e
> First: [enter]
> Last: [enter]
> n
> First: [enter]
> Last: +490M
> n
> First: [enter]
> Last: [enter]
> a
> Partition: 1
> t
> Partition: 3
> Type: 82
> w

We format all the partitions of the drive.

mkswap /dev/sdX3
mkfs.ext3 -b 4096 /dev/sdX1
mkfs.ext3 -b 4096 /dev/sdX2
mkfs.ext3 -b 4096 /dev/sdX5
mkfs.ext3 -b 4096 /dev/sdX6

Extract the firmware image from the archive.

tar -zxvf MSS_V_3_1_28.bin

Put the image onto partition 1 and 2.

dd if=coyote-3.1.28.img of=/dev/sdX1 bs=1024k
dd if=coyote-3.1.28.img of=/dev/sdX2 bs=1024k

If all steps were completed correctly you may now place the drive into your Maxtor Shared Storage II.