Explore Yourself !!!


Useful Linux Commands
March 31, 2009, 8:32 pm
Filed under: LAMP | Tags: , ,

PHP is best suited with Linux but Linux is not easy OS like windows. On the other hand, so far i feel, LINUX is more speedy/powerful then windows not only in server pc but also developer pc. So when i plan to switch to linux i need to think about some issues one by one and try to solve.

PHP Editor->
-> Windows: e-text editor
-> Mac: textmate
-> Linux: gphpedit, netBeans, bluefish

Web Server->
-> Windows: WAMP, XAMP
-> Linux: I am searching. May be built in

There are millions of linux command over the net. but here are some commands  i use so far. my target is to learn minimum number of commands what are always used. I am using Linux Fedora 10 version. i feel, linux command changed over version of linux(not basic commands).

TO install a Software(Say yuuguu)
=> # vi /etc/yum.repos.d/yuuguu.repo
[yuuguu]
name=Yuuguu
baseurl=http://update.yuuguu.com/repositories/yum/
enabled=1
gpgcheck=0
=> # yum install yuuguu

TO uninstall a Software(Say yuuguu)
=> # yum remove yuuguu (Best One)
=> # rpm -e yuuguu-build.2257-1.i386
=> # rpm -e yuuguu-build.2257-1.i386 –nodeps
=> # rpm -e yuuguu-build.2257-1.i386 –force

TO update a Software(not Sure)
=> # yum update yuuguu

Check a software installed or not
=> # rpm -qa | grep yuuguu

So far these are all. I am trying to move forward and i shall fillup this white board :)



How to install subversion in shared hosting
March 30, 2009, 9:39 pm
Filed under: LAMP | Tags: , ,

we all know the feature and advantages of serversion. although, i like DRY(Don’t Repeat Yourself), but i like to introduce a scanario. say we are developing a project where a number of folders and hundred or thousands of files exists. this is common scanario for projects developed using framework. now, in order to develop or fix a module, its tough for developers to keep in mind which files he had changed or write last night or couple of hours ago. in addition, this is an extra headake(incorrect spelling ;) ) for developers to keep in mind these things. on top of, subversion allow you to rollback whole sites days back or month back.

well, previously i thought, it’s not possible to install subversion in shared hosting. its’ only for dedicated hosting and as though, shopno-dinga is not dedicated server, it’s not possible to get subversion huge huge benifit. but i was 100% wrong. i have googled and find out myself, it’s possible for both dedicated and shared hosting. what to do ? how to setup? these are the commmon question in my mind. to install subversion in shared server first requirermnt is to activate SSH. i have go through two shared hosting cpanel. one have SSH option and other don’t have. so, i have to request to get SSH feature in cpanel(for non-existant SSH). now another one, one cpanel have SSH feature and i thought it’s activated. but once again, i am 100% wrong. i start trying to activate SSH. to do so, i need to create public key(shopno-dinga-key.pub) and private key(shopno-dinga-key.ppk). that’s all ?? NOP !!! after create these keys i need to submit my photo id and i do so. But still my request is pending. because i am not owner of my shared hosting :D , which mean the owner have to sent an email from his account to activate SSH. i have called bluehost 24 hour live support and using Yes-No-Verygood english i understand, it’s not possible for me to activate SSH without my hosting orinigal owner. So i am waiting for that activation !!!

As soon as SSH will be activated, i shall start intall subversion into my shopno-dinga.com shared hosting. :)



Fedora: Install and Configure Network / Internet
March 28, 2009, 7:41 pm
Filed under: LAMP | Tags: , ,

Yes right now i have two pc. One is running Windows and another Linux. I have installed Fedora 10. But configure network and internet was really a nightmare for me. But last night i was able to do it successfully (after one week failure). By one of my junior friends(Rony) help here is the configuration. All these configurations i create from fedora terminal.

Install Linux(Huge resource over the net):

http://www.howtoforge.com/the_perfect_desktop_fedora7

LINUX COMMANDS
====================================================

#ifconfig
=> Display configuration

#iptables -F
=> Flash Firewall

To Set IP “Addrerss” and Netmask
================================
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
DEVICE=eth0
IPADDR=192.168.2.119
NETMASK=255.255.255.0
BOOTPROTO=static
MACADDR=00:13:D3:9E:65:7F

:wq (This is save file)
To Set IP “Gateway”
========================
#vi /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=aminul-sumon
GATEWAY=192.168.2.1

:wq (This is save file)

To Check Cable Connectivity
=====================
#mii-tool
Correct Output =>  eth0: negotiated 100baseTx-FD, link ok

Most Easy Way is
=============
#netconfig
#service network restart

Now after configure my network here are the output taken from terminal:

here are the output of my linux machine:
————————————————
# mii-tool
eth0: autonegotiation failed, link ok

[root@aminul-sumon network-scripts]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:13:D3:9E:65:7F
inet addr:192.168.2.118  Bcast:192.168.2.255  Mask:255.255.255.0
inet6 addr: fe80::213:d3ff:fe9e:657f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:64706 errors:45 dropped:0 overruns:0 frame:0
TX packets:43550 errors:6 dropped:0 overruns:0 carrier:12
collisions:2513 txqueuelen:1000
RX bytes:70177860 (66.9 MiB)  TX bytes:5549528 (5.2 MiB)
Interrupt:21 Base address:0xc000

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7007 (6.8 KiB)  TX bytes:7007 (6.8 KiB)

pan0      Link encap:Ethernet  HWaddr E2:FF:9B:26:8C:DE
BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@aminul-sumon network-scripts]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]

[root@aminul-sumon network-scripts]# vi ifcfg-eth0
ONBOOT=yes
DEVICE=eth0
IPADDR=192.168.2.119
NETMASK=255.255.255.0
BOOTPROTO=none
MACADDR=00:13:D3:9E:65:7F
USERCTL=no
IPV6INIT=no
NM_CONTROLLED=no
GATEWAY=192.168.2.1
TYPE=Ethernet

#vi /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=aminul-sumon
GATEWAY=192.168.2.1

ENJOY LINUX !!!!!!

::::::::::::::========= LAMP =========:::::::::::::::

Installl LAMP(Linux, Apache, Mysql and Php) in one shoot.
#yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel



Web standards checklist
March 2, 2009, 5:48 am
Filed under: Web Technology

[100% copy paste from http://www.maxdesign.com.au/presentation/checklist.htm]

Web standards – more than just ‘table-free sites’

The term web standards can mean different things to different people. For some, it is ‘table-free sites‘, for others it is ‘using valid code‘. However, web standards are much broader than that. A site built to web standards should adhere to standards (HTML, XHTML, XML, CSS, XSLT, DOM, MathML, SVG etc) and pursue best practices (valid code, accessible code, semantically correct code, user-friendly URLs etc).

In other words, a site built to web standards should ideally be lean, clean, CSS-based, accessible, usable and search engine friendly.

About the checklist

This is not an uber-checklist. There are probably many items that could be added. More importantly, it should not be seen as a list of items that must be addressed on every site that you develop. It is simply a guide that can be used:

  • to show the breadth of web standards
  • as a handy tool for developers during the production phase of websites
  • as an aid for developers who are interested in moving towards web standards

The checklist

  1. Quality of code
    1. Does the site use a correct Doctype?
    2. Does the site use a Character set?
    3. Does the site use Valid (X)HTML?
    4. Does the site use Valid CSS?
    5. Does the site use any CSS hacks?
    6. Does the site use unnecessary classes or ids?
    7. Is the code well structured?
    8. Does the site have any broken links?
    9. How does the site perform in terms of speed/page size?
    10. Does the site have JavaScript errors?
  2. Degree of separation between content and presentation
    1. Does the site use CSS for all presentation aspects (fonts, colour, padding, borders etc)?
    2. Are all decorative images in the CSS, or do they appear in the (X)HTML?
  3. Accessibility for users
    1. Are “alt” attributes used for all descriptive images?
    2. Does the site use relative units rather than absolute units for text size?
    3. Do any aspects of the layout break if font size is increased?
    4. Does the site use visible skip menus?
    5. Does the site use accessible forms?
    6. Does the site use accessible tables?
    7. Is there sufficient colour brightness/contrasts?
    8. Is colour alone used for critical information?
    9. Is there delayed responsiveness for dropdown menus (for users with reduced motor skills)?
    10. Are all links descriptive (for blind users)?
  4. Accessibility for devices
    1. Does the site work acceptably across modern and older browsers?
    2. Is the content accessible with CSS switched off or not supported?
    3. Is the content accessible with images switched off or not supported?
    4. Does the site work in text browsers such as Lynx?
    5. Does the site work well when printed?
    6. Does the site work well in Hand Held devices?
    7. Does the site include detailed metadata?
    8. Does the site work well in a range of browser window sizes?
  5. Basic Usability
    1. Is there a clear visual hierarchy?
    2. Are heading levels easy to distinguish?
    3. Is the site’s navigation easy to understand?
    4. Is the site’s navigation consistent?
    5. Does the site use consistent and appropriate language?
    6. Does the site have a sitemap page and contact page? Are they  easy to find?
    7. For large sites, is there a search tool?
    8. Is there a link to the home page on every page in the site?
    9. Are links underlined?
    10. Are visited links clearly defined?
  6. Site management
    1. Does the site have a meaningful and helpful 404 error page that works from any depth in the site?
    2. Does the site use friendly URLs?
    3. Do your URLs work without “www”?
    4. Does the site have a favicon?