Ext JS - Learning Center

Tutorial:Prepare Your Machine for EXTJS Tutorial

From Learn About the Ext JavaScript Library

Revision as of 12:13, 15 July 2009 by Tjyang (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Summary: Pre-works to get your testing environment ready for EXTJS tutorials.
Author: T.J. Yang
Published: 02/26/2009
Ext Version: all versions
Languages: en.png English

extjs is a javascript framework you can use to create professional graphical web user interface and AJAX web application.

web-browser/
`-- javascript-framework
    |-- extjs
    `-- script-language
        |-- C
        |-- asp
        |-- databases
        |   |-- mysql
        |   `-- oracle
        |-- perl
        |-- php
        `-- python

As you can see from above diagram, there are many different paths to build a web application using different database backends and middle scripting languages to do the data processing between web frondend and database backend. This tutorial is to help making the pre-work needed for running the community extjs tutorial examples.

This article started with using Fedora 10 since most of extjs need software can be installed easily by just "yum install pkgname".

Please contribute your successful notes here for OS not listed here.

Contents

Fedora 10

Download and install Fedora 10 and you see following release note.

[me@fedora10 Tutorial_Part_12]$ cat /etc/redhat-release
Fedora release 10 (Cambridge)
[me@fedora10 Tutorial_Part_12]$


Package Manager

  • Get yum pass through a machine behind a firewall
[me@fedora10 ~]$ grep proxy  /etc/yum.conf
proxy=http://firewall.test.com:8080
proxy_username=myname
proxy_password=mypassword
[me@fedora10 ~]$

  • "SELINUX=disabled" in /etc/selinux/config.
  • yum search httpd

Web Server

  • /var/www/html

Scripting Language

Python

Perl

PHP

Make sure your php have mysql library compiled within.

[me@fedora10 ~]$ cat phpinfo.php
<?
phpinfo();
?>
[me@fedora10 ~]$ php  phpinfo.php |grep mysql
Configure Command =>  './configure'  '--build=i386-redhat-linux-gnu'
<snip>
'--with-ldap-sasl' '--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/bin/mysql_config' '--enable-dom=shared'
'--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-pgsql=shared'
'--with-snmp=shared,/usr' '--enable-soap=shared'
'--with-xsl=shared,/usr' '--enable-xmlreader=shared'
'--enable-xmlwriter=shared' '--enable-fastcgi' '--enable-pdo=shared'
'--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr'
'--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr'
'--enable-json=shared' '--enable-zip=shared' '--with-readline'
'--enable-dbase=shared' '--with-pspell=shared'
'--with-mcrypt=shared,/usr' '--with-mhash=shared,/usr'
'--with-tidy=shared,/usr' '--with-mssql=shared,/usr'

/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo_mysql.ini,
mysql
MYSQL_SOCKET => /var/lib/mysql/mysql.sock
MYSQL_INCLUDE => -I/usr/include/mysql
MYSQL_LIBS => -L/usr/lib/mysql -lmysqlclient
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
<snip>
mysqli.reconnect => Off => Off
PDO drivers => mysql, pgsql, sqlite
pdo_mysql
[me@fedora10 ~]$

Databases

Oracle

References:

#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
ORA_OWNER=oracle

if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
    echo "Oracle startup: cannot start"
    exit
fi

case "$1" in
    'start')
        # Start the Oracle databases:
        # The following command assumes that the oracle login
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
        su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
        ;;
    'stop')
        # Stop the Oracle databases:
        # The following command assumes that the oracle login
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
        su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
        ;;
esac
  • Oneliner for install needed software in Fedora 10.
yum install binutils  glibc glibc-common libgcc \
libstdc++ make elfutils-libelf elfutils-libelf-devel \
glibc-devel gcc gcc-c++ libstdc++-devel unixODBC \
unixODBC-devel libaio libaio-devel sysstat compat-libstdc++-33 xterm ksh

MySQL

  • Knowing your MySQL version infomation
[tjyang@ibm ~]$ mysqladmin version
mysqladmin  Ver 8.41 Distrib 5.0.67, for redhat-linux-gnu on i386
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          5.0.67
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 21 days 2 hours 59 min 15 sec

Threads: 1  Questions: 1259  Slow queries: 0  Opens: 31  \
Flush tables: 1  Open tables: 21  Queries per second avg: 0.001
[tjyang@ibm ~]$

Postgresql

TBC.