Thursday, July 12, 2012

Apache 403 Forbidden Error and Solution


Make sure correct directory permissions are set on directory:


Directory "/home/domain/www/">

    Options +Index FollowSymLinks +ExecCGI
    AllowOverride AuthConfig FileInfo
    Order allow, deny
    Allow from all

</Directory>


Tuesday, June 30, 2009

Summer - Burnaby Lake Trail


We went to the Burnaby Lake on a summer afternoon. It is not as hot as it should be in an average summer afternoon. We walked around the Burnaby Lake, a trail about 13 km, which is a pretty easy trail without uphills and downhills.

It took about two hours for us to finish the trail. We enjoyed the nature and fresh air, our bodies got a terrific exercise.


Thursday, March 5, 2009

Ubuntu 8.04 - Installation of HP 1020 printer

After installing HP 1020 by using system->administration->Printing
I couldn't use it to print anything.

By searching on internet, I got the way to install HP 1020 printer properly.

- Download file foo2zjs.tar.gz, unzip it:

$ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz

$ tar zxf foo2zjs.tar.gz

$ cd foo2zjs

$ sudo make uninstall

compile:

$ sudo make

Download file from web for HP 1020:
$ ./getweb 1020

Install:

# sudo make install

Install program for hotplug:

# make install-hotplug

This step must be done: unplug the printer and then plug it, let your computer searching for your printer. (remember to unplug and plug your printer once with the printer powered, you will see your printer has reaction.)


If you use CUPS to manage your printers, you must restart cupsd:

$ sudo make cups


System->Administration->Printing

delete the original printer, add a new printer. when there are two printer drivers are displayed, remember to select the recommended one

ok,enjoy it.


主要参考网站:
http://forum.ubuntu.org.cn/viewtopic.php?f=42&t=138609&p=1160219#p1160219
http://foo2zjs.rkkda.com/
http://foo2zjs.rkkda.com/INSTALL
http://www2.oklinux.cn/html/Basic/jyjq/ ... 52710.html

Friday, January 2, 2009

About the Auto start program for Redhat Linux Server

About the Auto start program for Redhat Linux Server

YP
Oct 6, 2005



Auto start script
================================
- The start script of program is usually put under the folder: /etc/rc.d/init.d

- There are rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d six folder coressponding to six run level of Operating system.

- The are many links(?) under each rc?.d folder, which reperants what start script should run for this runlevel, each link point to a start scritp under init.d folder.



for example: Tomcat



- put tomcat's start (stop) script "catalina.sh" under folder: /etc/rc.d/init.d
- put a link point to the script "catalina.sh", the link name could be "s81tomcat", because the link for apach is s85httpd and Tomcat is supposed to start before Apache start for the 'Apache+Tomcat work together' reason.


root@LinuxServer etc]# ln -s /etc/rc.d/init.d/catalina.sh rc5.d/s81tomcat


- the script with a smaller number runs earlier than the script with a greater number.


service script
================================

- A file named xinetd.conf is under the folder /etc, usually a line like "includedir /etc/xinetd.d" is inside this file.

- Underneath the folder named "/etc/xinetd.d", there are many server files there for different server.

- For example, for cvs server, there is a file named "cvsserver" and with following content.
------------------------------
service cvspserver
{
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
env = HOME=/home/cvsroot
server_args = -f --allow-root=/home/cvsroot pserver
}
-----------------------------------------------------------

Thursday, December 25, 2008

Watch Youtube Video on Centos 5

Download:

flash-plugin-10.0.15.3-release.i386.rpm

from adobe website.

Install:

rpm -Uvh flash-plugin-10.0.15.3-release.i386.rpm

Close all firefox windows.

Restart firefox, you should be able to watch the video on youtube website.

Wednesday, December 24, 2008

Static IP configuration on Ubuntu 8.10ic

1. Edit interfaces file

sudo gedit /etc/network/interfaces

add lines:

auto eth0
iface eth0 inet static
address 192.168.0.108
netmask 255.255.255.0
gateway 192.168.0.1

If there is a line like:

iface eth0 inet dhcp

need to add # before the line to comment it.

2. Edit file /etc/resolv.conf

sudo gedit /etc/resolv.conf

Add lines:

search 64.59.144.93
nameserver 64.59.144.92

These are DNS, that might be different for different ISP

If you do only step 1, not step 2, you can only visite web site by using number IP not domain name.

3. Restart network

sudo /etc/init.d/networking restart

You should see the static IP you setup.

Note: the graphic thing (for net work configure) on the top bar is not working even I set up everything there.

Install Eclipse 3.4 (jee) in Ubuntu 8.10

Download packages

Java - Application--Add/Remove -- Programming to get the latest version, as the time this is written, the version is 1.6
There are many articles about the java installation.

Eclipse - Eclipse website -eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
I download this one is because no plugin is required to run with Apache-tomcat

Tomcat -- apache website - the version i got is apache-tomcat-6.0.18.tar.gz

Install packages

Sun's Java JDK: Many ways to do this. there are many different way on the website. I will put one here later.

Tomcat:

tar xzf apache-tomcat-6.0.18.tar.gz
sudo mv apache-tomcat-6.0.18 /usr/local
cd /usr/local
sudo chown -R root:root apache-tomcat-6.0.18
sudo chmod -R +r apache-tomcat-6.0.18
sudo chmod +x `sudo find apache-tomcat-6.0.18 -type d`
sudo ln -s apache-tomcat-6.0.18 tomcat

Edit tomcat users:
sudo gedit /usr/local/tomcat/conf/tomcat-users.xml

And add an admin and your username and password:


user name="admin" password="admin" roles="manager,admin"
user name="yourname" password="blah" roles="manager,admin"
Eclipse:
Extract the eclipse download and move to opt.

tar zxvf eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
sudo mv eclipse /opt/eclipse
cd /opt
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`

Then create an eclipse executable in your path

sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo gedit /usr/bin/eclipse

With this contents

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*

Then create a gnome menu item

sudoedit /usr/share/applications/eclipse.desktop

With this contents

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

Configure

You now have a working eclipse.
But run this command first to initialise the set up.

/opt/eclipse/eclipse -clean

Then from here on you can run from the menu item
applications/programming/eclipse