When it comes to making a website for mobile devices, a lot of things needs to be throw out of your site. :)
mobile devices are powered by low power processors; something which your laptop or desktop computer is far more advanced with.
Steps:
Place a detection on your index.php page (or your homepage) to redirect mobile users to a different site. Typically, your mobile version of site will begin with http://m.mysite.com
The mobile site should use 1 column layout for development. You cannot build a website with multiple columns (since mobile browsers decode html differently on many occassions; you do not want to mess up your site)
Use images which are low resolution, but suitable for viewing on mobile devices. In mobile devices, every penny counts when it comes to size of website. It is best to get rid of images which are around 50kb or more for mobile devices.
use lightweight css. (prevent mobile processors from doing a lot of job for you. So use, lightweight css for your website to load up faster on mobile devices.)
Below are links that can help you get started.
Redirect php website to mobile device
Developing light weight css for php website on mobile devices
PAMP (Open source by nokia for mobile devices)
Monday, November 23, 2009
Wednesday, November 4, 2009
install java in centos 5
Strangly, Java does not come installed in centos. Hence, here is the procedure.
Download jdk (which automatically includes jre) through Java JDK Download (Also, see the screenshot attached.)
Once downloaded, you can follow instructions over here,
Say you downloaded a .bin file, such as jdk-6u17-linux-i586.bin
$pwd
$ls
$chmod +x jdk-6u17-linux-i586.bin
going to directory where I want java to be installed
$cd /usr/local/
executing the .bin file
$/home/myName/jdk-6u17-linux-i586.bin
it will display some text on screen, that is the license agreement. Keep pressing enter to scroll. It is a long document, so you might want to press enter around 50 times or more. When the license agreement ends, you will see a question
type yes and press enter.
and watch it installed.
After installation is done, the prompt will come back to you.
Now for the one last step. We need to create a link.
$ln -s /usr/local/jdk1.6.0_17/bin/java /usr/bin/java
(I am assuming, upon running the .bin file, you will see a folder named jdk1.6.0_17 in /usr/local/. The folder name could change, but it will be created in /usr/local/)
$java -version
It should show you the version installed.
$whereis java
will show you were java files and jave executable are placed.
If above two, does not work, it means java did not set in the path.
Your java is installed in /usr/local
Go there and look for folder. It should be jdk-1.6.0_17 (or something like that),do
$cd jdk-1.6.0_17/bin/
$pwd
Your path to java is /usr/bin/java (which is link to /usr/local/jdk-1.6.0_17/bin/java). You will need to set path in your .bash_profile
Look for my previous post on how to do it.
Download jdk (which automatically includes jre) through Java JDK Download (Also, see the screenshot attached.)
Once downloaded, you can follow instructions over here,
Say you downloaded a .bin file, such as jdk-6u17-linux-i586.bin
$pwd
/home/myName
$ls
jdk-version-6-u17-linux-i586.bin
$chmod +x jdk-6u17-linux-i586.bin
going to directory where I want java to be installed
$cd /usr/local/
executing the .bin file
$/home/myName/jdk-6u17-linux-i586.bin
it will display some text on screen, that is the license agreement. Keep pressing enter to scroll. It is a long document, so you might want to press enter around 50 times or more. When the license agreement ends, you will see a question
Do you agree above license terms? [yes or no]
type yes and press enter.
and watch it installed.
After installation is done, the prompt will come back to you.
Now for the one last step. We need to create a link.
$ln -s /usr/local/jdk1.6.0_17/bin/java /usr/bin/java
(I am assuming, upon running the .bin file, you will see a folder named jdk1.6.0_17 in /usr/local/. The folder name could change, but it will be created in /usr/local/)
$java -version
It should show you the version installed.
$whereis java
will show you were java files and jave executable are placed.
If above two, does not work, it means java did not set in the path.
Your java is installed in /usr/local
Go there and look for folder. It should be jdk-1.6.0_17 (or something like that),do
$cd jdk-1.6.0_17/bin/
$pwd
/usr/local/jdk-1.6.0_17/bin/
Your path to java is /usr/bin/java (which is link to /usr/local/jdk-1.6.0_17/bin/java). You will need to set path in your .bash_profile
Look for my previous post on how to do it.
Making path change in .bash_profile and then how to refresh or reload
whenever you log into your linux and open a terminal, do this.
$pwd
This will show you your home directory. Typically, if you are root it is
If you are having a user account in your name, it should be
Now, try this at the prompt,
$ls -all
And look for .bash_profile This file is the one who knows what paths are set in your account
You can add more paths to it and then save it. Once .bash_profile is saved, in order to make changes effective, you will need to do
$. .bash_profile
[Note the two dots before bash_profile]
OR
$source .bash_profile
And then do,
$echo $PATH
you will be able to see new paths shown.
$pwd
This will show you your home directory. Typically, if you are root it is
/root
If you are having a user account in your name, it should be
/home/myName
Now, try this at the prompt,
$ls -all
And look for .bash_profile This file is the one who knows what paths are set in your account
You can add more paths to it and then save it. Once .bash_profile is saved, in order to make changes effective, you will need to do
$. .bash_profile
[Note the two dots before bash_profile]
OR
$source .bash_profile
And then do,
$echo $PATH
you will be able to see new paths shown.
Subscribe to:
Posts (Atom)

