page_header
hdr.is-a-geek.com
The moment you cheat for the sake of beauty, you know you're an artist
David Hockney
donderdag 22 augustus 2013
dinsdag 10 januari 2012
Enable CGI
Before enabling CGI I implemented a HTML redirect along these lines in the root of my public_html folder. Any user is now automatically forwarded to the file basics.html in the directory xhtml_css under cheat.
Created directory cgi-bin under my public html directory;
- mkdir ~/public_html/cgi-bin
To allow the execution of programs in the cgi-bin directory under public_html I added the following section in the configuration file /etc/apache2/mods-enabled/userdir.conf
<Directory /home/*/public_html/cgi-bin/>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
Next I restarted Apache;
- sudo service apache2 restart
To test cgi I first installed Ubuntu's development tools
- sudo apt-get install build-essential
created a small C test project in ~/dev/temp. I used the "Hello world" example from here.
- gcc test.c -o test.cgi
- cp test.cgi ~/public_html/cgi-bin
After delivering the binary I was able to access the functionality on http://192.168.1.249/~hans/cgi-bin/test.cgi
Great stuff!
Created directory cgi-bin under my public html directory;
- mkdir ~/public_html/cgi-bin
To allow the execution of programs in the cgi-bin directory under public_html I added the following section in the configuration file /etc/apache2/mods-enabled/userdir.conf
<Directory /home/*/public_html/cgi-bin/>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
Next I restarted Apache;
- sudo service apache2 restart
To test cgi I first installed Ubuntu's development tools
- sudo apt-get install build-essential
created a small C test project in ~/dev/temp. I used the "Hello world" example from here.
- gcc test.c -o test.cgi
- cp test.cgi ~/public_html/cgi-bin
After delivering the binary I was able to access the functionality on http://192.168.1.249/~hans/cgi-bin/test.cgi
Great stuff!
maandag 9 januari 2012
Started all over again II
Installed Ubuntu server on sda1 with /home on sda3 & included ssh
Changed to fixed IP address
Updated Ubuntu;
- sudo apt-get update
- sudo apt-get upgrade
Restarted Ubuntu;
- sudo shutdown -r now
Installed Apache;
- sudo apt-get install apache2
Edited file /etc/apache2/httpd.conf;
Added line "ServerName 192.168.1.249". File was empty before adding this line.
Restarted Apache;
- sudo /etc/init.d/apache2 restart
Created a directory public_html in my home directory and added a simple index.html file
Enabled Apache userdir module;
- sudo a2enmod userdir
To activate the new configuration I ran;
- sudo service apache2 restart
I could access the previously created html file on http://192.168.1.249/~hans/ !
Installed subversion
- sudo apt-get install subversion
Created a direcory dev in /home and made that directory the current directory
- mkdir dev
- cd dev
Downloaded my cheat sheets from Google code
- svn checkout https://cheat-sheets.googlecode.com/svn/trunk/ cheat-sheets --username myusr@gmail.com
Created a symbolic link to the cheat sheets in my development directory
- ln -s ~/dev/cheat-sheets ~/public_html/cheat
I could access the cheat sheets on http://192.168.1.249/~hans/cheat/ !
Changed to fixed IP address
Updated Ubuntu;
- sudo apt-get update
- sudo apt-get upgrade
Restarted Ubuntu;
- sudo shutdown -r now
Installed Apache;
- sudo apt-get install apache2
Edited file /etc/apache2/httpd.conf;
Added line "ServerName 192.168.1.249". File was empty before adding this line.
Restarted Apache;
- sudo /etc/init.d/apache2 restart
Created a directory public_html in my home directory and added a simple index.html file
Enabled Apache userdir module;
- sudo a2enmod userdir
To activate the new configuration I ran;
- sudo service apache2 restart
I could access the previously created html file on http://192.168.1.249/~hans/ !
Installed subversion
- sudo apt-get install subversion
Created a direcory dev in /home and made that directory the current directory
- mkdir dev
- cd dev
Downloaded my cheat sheets from Google code
- svn checkout https://cheat-sheets.googlecode.com/svn/trunk/ cheat-sheets --username myusr@gmail.com
Created a symbolic link to the cheat sheets in my development directory
- ln -s ~/dev/cheat-sheets ~/public_html/cheat
I could access the cheat sheets on http://192.168.1.249/~hans/cheat/ !
zondag 8 januari 2012
Started all over again
Installed Ubuntu Server on sda1
Changed to a fixed IP address
Forgot to mount home on sda3 so added this line to fstab;
/dev/sda3 /home ext3 defaults 0 0
Gave sda3 an appropriate label;
sudo e2label /dev/sda3 UbuntuHome
Installed Apache;
sudo apt-get install apache2
Added ServerName to /etc/apache2/apache2.conf;
ServerName 192.168.1.249
Restarted apache;
sudo /etc/init.d/apache2 restart
In home directory hans created;
subdirectory dev
In dev created www
In www created cgi-bin
Installed subversion;
sudo apt-get install subversion
In directory www executed;
svn checkout https://cheat-sheets.googlecode.com/svn/trunk/ cheat-sheets --username myusr@gmail.com
Checked /etc/apache2/envvars for Apache user and group (www-data)
Created group www-hdr;
sudo addgroup www-hdr
Added members hans & www-data to the new group;
sudo adduser hans www-hdr
sudo adduser www-data www-hdr
Changed group ownership of directories cgi-bin & cheat-sheets;
sudo chgrp www-hdr cgi-bin
sudo chgrp www-hdr cheat-sheets -R
Changed permissions on directories cgi-bin & cheat-sheets;
sudo chmod 750 cgi-bin
sudo chmod -R 740 cheat-sheets
Created symbolic link to directory cheat-sheets;
sudo ln -s /home/hans/dev/www/cheat-sheets /var/www/hdr
Changed ownerhip of the symbolic link;
sudo chown -h hans:www-hdr /var/www/hdr
Update the file default in the sites available directory;
sudo vim /etc/apache2/sites-available/default
sudo ln -s /home/hans/dev/www/cheat-sheets /var/www/hdr
Changed ownerhip of the symbolic link;
sudo chown -h hans:www-hdr /var/www/hdr
Update the file default in the sites available directory;
sudo vim /etc/apache2/sites-available/default
zaterdag 7 januari 2012
Enable CGI
Followed instructions on UbuntuGeek
Created a separate directory for cgi programs;
sudo mkdir /var/www/cgi-bin
Updated the Apache configuration file;
sudo vim /etc/apache2/apache2.conf
Restarted Apache server
Downloaded subversion client;
sudo apt-get install subversion
Downloaded my cheat sheet code;
cd ~
svn checkout https://cheat-sheets.googlecode.com/svn/trunk/ cheat-sheets --username xxx@gmail.com
Created a separate directory for cgi programs;
sudo mkdir /var/www/cgi-bin
Updated the Apache configuration file;
sudo vim /etc/apache2/apache2.conf
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory /var/www/cgi-bin/>
Options ExecCGI
AddHandler cgi-script cgi pl
</Directory>
Restarted Apache server
Downloaded subversion client;
sudo apt-get install subversion
Downloaded my cheat sheet code;
cd ~
svn checkout https://cheat-sheets.googlecode.com/svn/trunk/ cheat-sheets --username xxx@gmail.com
maandag 2 januari 2012
Ubuntu 11.10 to the rescue
I gave up on LFS after getting errors while running the test of the glibc compile. Wrong compiler flags, human errors, ... ? Time to move on
Just installed Ubuntu Server 11.10 on /dev/sda1 of NB100. Mapped /dev/sda3 to /home and included OpenSSH in the install.
Assigned a fixed IP address (process described in one of the earlier posts on this blog)
Updated Ubuntu
- sudo apt-get update
- sudo apt-get upgrade
Changed the volume labels
- sudo e2label /dev/sda2 UbuntuServer
- sudo e2label /dev/sda2 UbuntuDesk
Installed Apache
Executed: sudo apt-get install apache2
Worked like a charm, was able to access the server on http://192.168.1.249
Error message on deamon start-up: "Could not reliably determine the server's fully qualified ..."
Added servername to server configuration file;
- sudo vim /etc/apache2/apache2.conf
added line: ServerName 192.168.1.249
Please note that the correct configuration file is httpd.conf not http.conf as noted in an earlier post.
Restart server: sudo /etc/init.d/apache2 restart
Just installed Ubuntu Server 11.10 on /dev/sda1 of NB100. Mapped /dev/sda3 to /home and included OpenSSH in the install.
Assigned a fixed IP address (process described in one of the earlier posts on this blog)
Updated Ubuntu
- sudo apt-get update
- sudo apt-get upgrade
Changed the volume labels
- sudo e2label /dev/sda2 UbuntuServer
- sudo e2label /dev/sda2 UbuntuDesk
Installed Apache
Executed: sudo apt-get install apache2
Worked like a charm, was able to access the server on http://192.168.1.249
Error message on deamon start-up: "Could not reliably determine the server's fully qualified ..."
Added servername to server configuration file;
- sudo vim /etc/apache2/apache2.conf
added line: ServerName 192.168.1.249
Please note that the correct configuration file is httpd.conf not http.conf as noted in an earlier post.
Restart server: sudo /etc/init.d/apache2 restart
donderdag 29 december 2011
dinsdag 27 december 2011
Linux from scratch
Hardware chosen for building LFS 7.0: Toshiba NB 100
Host OS Ubuntu 10.04 LTS (desktop version)
Partitioning HD;
- /dev/sda1 LFS 47GB
- /dev/sda2 Ubuntu (ext3) 47GB
- /dev/sda3 Empty 58GB
- /dev/sda4 Swap 8GB
Use sudo where needed (this is Ubuntu after all)!
Started by formating /dev/sda1 (section 2.3 of the LFS book)
Labeled the partitions;
- sudo e2label /dev/sda1 LFS
- sudo e2label /dev/sda2 Ubuntu
Mounted the new partition (section 2.4)
Downloaded the source tarballs in a separate directory (section 3.1)
Used this command to download the tarballs;
wget -i http://www.linuxfromscratch.org/lfs/view/stable/wget-lis -P $LFS/sources
Created the tools directory (section 4.2)
Added user lfs and switched to this user (sections 4.3 & 4.4)
Chapter 5: Creating a temporary system
To proceed work after reboot execute the following steps;
1. Open terminal window
2. export LFS=/mnt/lfs
3. sudo mount -v -t ext3 /dev/sda1 $LFS
4. su - lfs
Notes on the general compilation instructions (section 5.3);
1. Locate the relevant package ls package*
2. Unpack the source tarball;
- untar .tar.gz: tar -zxf package.tar.gz
- untar .tar.bz2: tar -jxf package.tar.bz2
- untar .tar.xz: tar -Jxf package.tar.xz
3. Enter the newly created directory containing the source code
4. Follow the instructions in the LFS book (configure, make & make install)
5. Leave the directory and remove it; rm -rf dirname
To complete chapter 5 it was necessary to install patch and bison;
- sudo apt-get install patch
- sudo apt-get install bison
Host OS Ubuntu 10.04 LTS (desktop version)
Partitioning HD;
- /dev/sda1 LFS 47GB
- /dev/sda2 Ubuntu (ext3) 47GB
- /dev/sda3 Empty 58GB
- /dev/sda4 Swap 8GB
Use sudo where needed (this is Ubuntu after all)!
Started by formating /dev/sda1 (section 2.3 of the LFS book)
Labeled the partitions;
- sudo e2label /dev/sda1 LFS
- sudo e2label /dev/sda2 Ubuntu
Mounted the new partition (section 2.4)
Downloaded the source tarballs in a separate directory (section 3.1)
Used this command to download the tarballs;
wget -i http://www.linuxfromscratch.org/lfs/view/stable/wget-lis -P $LFS/sources
Created the tools directory (section 4.2)
Added user lfs and switched to this user (sections 4.3 & 4.4)
Chapter 5: Creating a temporary system
To proceed work after reboot execute the following steps;
1. Open terminal window
2. export LFS=/mnt/lfs
3. sudo mount -v -t ext3 /dev/sda1 $LFS
4. su - lfs
Notes on the general compilation instructions (section 5.3);
1. Locate the relevant package ls package*
2. Unpack the source tarball;
- untar .tar.gz: tar -zxf package.tar.gz
- untar .tar.bz2: tar -jxf package.tar.bz2
- untar .tar.xz: tar -Jxf package.tar.xz
3. Enter the newly created directory containing the source code
4. Follow the instructions in the LFS book (configure, make & make install)
5. Leave the directory and remove it; rm -rf dirname
To complete chapter 5 it was necessary to install patch and bison;
- sudo apt-get install patch
- sudo apt-get install bison
woensdag 15 december 2010
zondag 12 december 2010
Create the cheat solution in MonoDevelop
zaterdag 11 december 2010
MonoDevelop 2.4 install on Ubuntu 10.04
1. Followed instructions on Badgerports
2. Removed version MonoDevelop 2.2 from Ubuntu
3. Installed MonoDevelop (+ plugins) from the software center

4. Look version 2.4 in Ubuntu 10.04!

5. Registered a new Subversion repository in MonoDevelop
2. Removed version MonoDevelop 2.2 from Ubuntu
3. Installed MonoDevelop (+ plugins) from the software center

4. Look version 2.4 in Ubuntu 10.04!

5. Registered a new Subversion repository in MonoDevelop
maandag 6 december 2010
Subversion checkout using RabbitCVS
Installed the latest verion of RabbitSVN. Followed instructions on UbuntuGeek.com
Added repository
sudo add-apt-repository ppa:rabbitvcs/ppa
Updated source list
sudo apt-get update
Installed RabbitVCS
sudo apt-get install rabbitvcs-core
Installed RabbitVCS plugins
sudo apt-get install rabbitvcs-nautilus rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli
Checked out code
Added repository
sudo add-apt-repository ppa:rabbitvcs/ppa
Updated source list
sudo apt-get update
Installed RabbitVCS
sudo apt-get install rabbitvcs-core
Installed RabbitVCS plugins
sudo apt-get install rabbitvcs-nautilus rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli
Checked out code
vrijdag 5 november 2010
donderdag 4 november 2010
Restore Subversion repository
Followed instructions on ArchLinux
Logged on to previous install
Dumped the repository: svnadmin dump /var/svn > /tmp/svnrepo.dump
Logged on to Ubuntu server 10.10 install
mounted partition containing the previous install: sudo mount /dev/sda6 /mnt/temp
Dumped the repository: sudo svnadmin load /var/svn < /mnt/temp/tmp/svnrepo.dump
Change added group and changed permissions:
sudo groupadd svnusers
sudo usermod -a -G svnusers www-data
sudo usermod -a -G svnusers hans
sudo chown -R www-data:svnusers /var/svn
sudo chmod -R g+w /var/svn/db/
Logged on to previous install
Dumped the repository: svnadmin dump /var/svn > /tmp/svnrepo.dump
Logged on to Ubuntu server 10.10 install
mounted partition containing the previous install: sudo mount /dev/sda6 /mnt/temp
Dumped the repository: sudo svnadmin load /var/svn < /mnt/temp/tmp/svnrepo.dump
Change added group and changed permissions:
sudo groupadd svnusers
sudo usermod -a -G svnusers www-data
sudo usermod -a -G svnusers hans
sudo chown -R www-data:svnusers /var/svn
sudo chmod -R g+w /var/svn/db/
BubbleBoy install Subversion with Web access
Followed instructions on HowToGeek.com
Install the software: sudo apt-get install subversion libapache2-svn
Create a repository: sudo svnadmin create /var/svn
Edit the configuration file: sudo vim /etc/apache2/mods-enabled/dav_svn.conf
Uncomment the opening and closing Location tag
Uncomment the line DAV /svn
Set the correct path to the repository SVNPath /var/svn
Enable Basic Athentication uncomment AuthType, AuthName, AuthUserFile
Create the authentication file: sudo htpasswd -cm /etc/apache2/dav_svn.passwd [username]
Restart Apache server: sudo /etc/init.d/apache2 restart
I was able to access the Subversion repository on BubbleBoy
Install the software: sudo apt-get install subversion libapache2-svn
Create a repository: sudo svnadmin create /var/svn
Edit the configuration file: sudo vim /etc/apache2/mods-enabled/dav_svn.conf
Uncomment the opening and closing Location tag
Uncomment the line DAV /svn
Set the correct path to the repository SVNPath /var/svn
Enable Basic Athentication uncomment AuthType, AuthName, AuthUserFile
Create the authentication file: sudo htpasswd -cm /etc/apache2/dav_svn.passwd [username]
Restart Apache server: sudo /etc/init.d/apache2 restart
I was able to access the Subversion repository on BubbleBoy
dinsdag 2 november 2010
Add content to BubbleBoy
Mount previous install on /mnt/temp: sudo mount /dev/sda6 /mnt/temp
Copy content across
First created archive directory: sudo mkdir /var/www/archive
Copied a directory structure: sudo cp -rv /mnt/temp/var/www/dev /var/www/archive
Copied the index file: sudo cp /mnt/temp/var/www/index.html /var/www
Installed vim: sudo apt-get install vim
Used vim to change paths mentioned in the index file
Copy content across
First created archive directory: sudo mkdir /var/www/archive
Copied a directory structure: sudo cp -rv /mnt/temp/var/www/dev /var/www/archive
Copied the index file: sudo cp /mnt/temp/var/www/index.html /var/www
Installed vim: sudo apt-get install vim
Used vim to change paths mentioned in the index file
maandag 1 november 2010
BubbleBoy add Apache
Executed: sudo apt-get install apache2
Worked like a charm, was able to access the server: http://192.168.1.150
Error message on deamon start-up: "Could not reliably determine the server's fully qualified ..."
Added servername to server configuration file
sudo vi /etc/apache2/http.conf
Added line: ServerName hdr.is-a-geek.com
Restart server: sudo /etc/init.d/apache2 restart
Worked like a charm, was able to access the server: http://192.168.1.150
Error message on deamon start-up: "Could not reliably determine the server's fully qualified ..."
Added servername to server configuration file
sudo vi /etc/apache2/http.conf
Added line: ServerName hdr.is-a-geek.com
Restart server: sudo /etc/init.d/apache2 restart
zondag 31 oktober 2010
BubbleBoy to Ubuntu 10.10
Today started with new configuration of BubbleBoy
I will upgrade BubbleBoy to Ubuntu 10.10
Started with the download of the software
Can't really miss the big orange button, can you?

Burned the ISO (ubuntu-10.10-server-amd64) to a CD using Nero
Used secure shell to log on to existing install: ssh [user]@[ip address]
Stopped BubbleBoy: sudo shutdown -r now
Booted BubbleBoy from the Ubuntu 10.10 server CD
Performed install of Ubuntu 10.10 on /dev/sda1 (install incl openSSH)
/dev/sda5 still contains a working install of Ubuntu 9.10 desktop
/dev/sda6 still contains a working install of Ubuntu 9.10 server
Configured a fixed IP address
Edited the interfaces configuration file: sudo vi /etc/network/interfaces
Changed
# The primary network interface
auto eth0
iface eth0 inet dhcp
To
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
Restarted the networking services: sudo /etc/init.d/networking restart
I will upgrade BubbleBoy to Ubuntu 10.10
Started with the download of the software
Can't really miss the big orange button, can you?
Burned the ISO (ubuntu-10.10-server-amd64) to a CD using Nero
Used secure shell to log on to existing install: ssh [user]@[ip address]
Stopped BubbleBoy: sudo shutdown -r now
Booted BubbleBoy from the Ubuntu 10.10 server CD
Performed install of Ubuntu 10.10 on /dev/sda1 (install incl openSSH)
/dev/sda5 still contains a working install of Ubuntu 9.10 desktop
/dev/sda6 still contains a working install of Ubuntu 9.10 server
Configured a fixed IP address
Edited the interfaces configuration file: sudo vi /etc/network/interfaces
Changed
# The primary network interface
auto eth0
iface eth0 inet dhcp
To
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
Restarted the networking services: sudo /etc/init.d/networking restart
zondag 24 oktober 2010
zondag 29 augustus 2010
Test using Google Docs
Did a test today to find out if it's possible to publish the progress I'm making in regard to my weight goals as recorded in Google Docs

Abonneren op:
Posts (Atom)





