Category Archives: Hardware

Webserver on Raspberry Pi

As an experiment this site is now running on my Raspberry Pi.

Assumptions you have setup your Raspberry Pi with Raspbian with a static IP, and allowed port 80 through your firewall to that static IP address.

Please remember to make sure you OS is up to date:

sudo apt-get update; sudo apt-get upgrade

Installing Nginx

The first peace of software you will need to install is Nginx

sudo apt-get install nginx

Now we can start Nginx

sudo /etc/init.d/nginx start

You can now test if it’s working by putting in the IP address of your server in a browser to see if it works e.g. http://192.168.0.1

The browser will now display a Page saying “Welcome to nginx”

Install PHP

Use the next command to install PHP

sudo apt-get install php5-fpm

Now we need to make some configuration changes, now we need to make some configuration changes

sudo nano /etc/nginx/sites-available/default

Scroll down the configuration file and uncomment by removing the #

listen 80; ## listen for ipv4; this line is default and implied

Set the serve name to your server name

server_name www.webwhitenoise.com;

Change the index line to the following

index index.php index.html index.htm;

Uncomment the next section in the configuration file

location ~ \.php$ {
 fastcgi_split_path_info ^(.+\.php)(/.+)$;
 # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
 
 # # With php5-cgi alone:
 # fastcgi_pass 127.0.0.1:9000;
 
 # # With php5-fpm:
 fastcgi_pass unix:/var/run/php5-fpm.sock;
 fastcgi_index index.php;
 include fastcgi_params;
 }

Now exit from nano and remember to save the changes

Now we need to edit the php.ini configuration file

sudo nano /etc/php5/fpm/php.ini

Find cgi.fix_pathinfo in the file and change it as follows

cgi.fix_pathinfo=0

Now we need to reload PHP and Nginx

sudo /etc/init.d/php5-fpm reload && sudo /etc/init.d/nginx reload

You can now test if PHP is working on Nginx by adding a index.php file tot he root of the server

cd /usr/share/nginx/www
sudo nano index.php

Add the following line to the file

<?php phpinfo(); ?>

If you now refresh the webpage we opened earlier in the browser it shlould display the PHP info page.

Install MySQL server

Now we install MYSQL

sudo apt-get install mysql-server

As a part of this process you will be prompted to enter a password, this password will be the root password for MySQL.

Once this process completes install MySQL Client and MySQL PHP components

sudo apt-get install mysql-client php5-mysql

Now we need to setup a database and user in MySQL

Connect to the MySQL Server using the root user, you will be prompted for the password

mysql -uroot -hlocalhost -p

We now create a database, wordpressdb represents the name of the database

CREATE DATABASE wordpressdb;

Now we create a user for WordPress to use to access the database, wordpressuser represents the user id and password_here a password. Root should not be used

CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password_here';

Now we grant this user access tot he database

GRANT ALL PRIVILEGES ON wpdb.* TO 'wordpressuser'@'localhost';

Flush the privileges for the changes to take effect

FLUSH PRIVILEGES;

Now press CTRL + C to exit MySQL

Now test the username against the database

mysql -uwordpressuser -hlocalhost wordpressdb -p

Now press CTRL + C to exit MySQL

Finished

You now have a working server server with Nginx, PHP and MySQL ready to use.

Gator DVR Car Recorder Camera DVR308

Here is a warning about the Gator DVR Car Recorder Camera DVR308 that Supercheap Auto as selling in Australia.

  • The picture quality of the video is grainy, this is not a serious problem as it’s good enough to see what is happening in the picture.Screen Grab from Video
  • Video files are broken into 15min files, a program like VirtualDub can join these files with little problem. (Join AVI files with VirtualDub)
  • The big problem is the quality of the suction cup and it’s mechanism, the plastic is heat sensitive and will deform if left in your car. The spring is strong enough for the suction cup to cause it to deform the plastic while installed in a hot car. In Australia cars get hot inside the mount just doesn’t cope.
    Heat Dent

    Dent from spring pressure and Heat

    Gator Platic Melt

    Plastic has melted around base

  • The spring loaded clip has a seam in the plastic at the hinge this breaks if you keep removing it from a surface. (Design flaw)seam

I would advise people to get something better than this camera.

Fuji Xerox WorkCentre 4250

The default username and password for the Xerox WorkCentre 4250 is as follows:

Username: admin
Password: 1111

When accessing the web interface of the Xerox WorkCentre 4250 Default if you attempt to change any settings you will be prompted for this username and password. The default that the copier is set to is in my experience not clearly identified in the manual.

When accessing the administrator menus on the copier the code 1111 is used.

Fuji Xerox DocuCentre-IV C2260 Default Password

The default username and password for the Fuji Xerox DocuCentre-IV C2260 is as follows:

Username: 11111
Password: x-admin

When accessing the web interface of the Fuji Xerox DocuCentre-IV C2260 if you attempt to change any settings you will be prompted for this username and password. The default that the copier is set to is in my experience not clearly identified in the manual.

When accessing the administrator menus on the copier the code 11111 is used.

Fuji Xerox DocuCentre-III 2007 Default Password

The default username and password for the Fuji Xerox DocuCentre-III 2007 is as follows:

Username: 11111
Password: x-admin

When accessing the web interface of the Fuji Xerox DocuCentre-III 2007 if you attempt to change any settings you will be prompted for this username and password. The default that the copier is set to is in my experience not clearly identified in the manual.

When accessing the administrator menus on the copier the code 11111 is used.

Fuji Xerox DocuCentre-II 4000 Default Password

The default username and password for the Fuji Xerox DocuCentre-II 4000 is as follows:

Username: 11111
Password: x-admin

When accessing the web interface of the Fuji Xerox DocuCentre-II 4000 if you attempt to change any settings you will be prompted for this username and password. The default that the copier is set to is in my experience not clearly identified in the manual.

When accessing the administrator menus on the copier the code 11111 is used.