Saturday, January 12, 2013

How do you develop a website with a zip code / City, State lookup?

Q. How do you develop a website with a zip code look up for various stores, and locations? A website similar to Yelp.com?

Also, how much does a website like that cost to make approximately?

Thanks.

A. Use the LAMP stack

Linux as an OS - Cost - free
Apache for a web server - cost - free
MySQL for a database - cost - Free
Use a scripting language like Python, Perl, or PHP to handle the interface between the web page and the HTML pages on the web site - cost - free

Create the web site
Link the clicks and dialog windows to the scripts
set up the database
load your data
Test
Debug
Test
Debug
Test
Debug
......
Some time much later
......
Go Live

Have fun

How do you install a program on linux?
Q. I am new to linux and do not understand the file extensions, i have a tar.gz file that is the Wicd Network Manager because it doesn't work so i am trying to install it because it is not found on the system. How do i go about installing this file.

A. The file tar.gz is a compressed file, much like a .zip file so first you must uncompress it. Usually double clicking in many distros will work.
Then you will have to install it. The methods to do this depend on the linux distro (ubuntu, SUSE, mint, knoppix, red hat, DSL) you are using and the file type (.deb, .sh) that is compressed in the tar.gz file (also called a tarball).
Also, you have to understand what dependencies you need to fulfill to install the program (what libraries you need).
Search the forums for the program you wish to install for the specific linux distribution you are using.
I highly reccomend that you buy a book for your new linux distro. That is how I learned. Linux is not windows, you can't just doubleclick everything you want to install. It makes it harder to install programs but in the end provides a more stable and secure system.

Can anyone help me with installing programs on Linux?
Q. I dont have internet on the computer i have linux on, am i screwed or is there still a way?

A. Some software is distributed in "Source form". This means you download a file containing all the source code for the application you want to install, unpack it, and compile it on your system. Compiling is the process of turning the source code into an executable binary. It is a fairly straight forward process.

Typically applications you must compile from source will come as a ".tar.gz", ".tar.bz2", or ".zip" file.

You'll probably want to operate from inside your home directory. If your user is (for example) username, your home directory will be /home/username/. Downloaded your zip file containing install files to /home/username/src. If you do not have a src directory, you can create it with the following "mkdir" (make directory) command:


Code:
mkdir /home/username/src/
So, we have our source package in /home/username/src/.

Change to the /home/username/src/ directory with the "cd" (change directory) command like so:


Code:
cd /home/username/src/
Use the "ls" (list directory contents) command, to see the file is present:


Code:
ls

We now need to unzip the zipped file, this is done differently depending on the file extension.

for files ending in .tar.gz, use:

Code:
tar -zxvf <filename>
(replacing <filename> with the name of the file).

for files ending in .tar.bz2, use:

Code:
tar -jxvf <filename>
for files ending in .zip, use:

Code:
unzip <filename>
You should now have a new directory, containing all of the source files. To confirm it exists, and to get its name, use the "ls" command again.

Code:
ls
we now need to go into the new directory, so use the cd command:

Code:
cd <directory>



This is where things will differ. Some packages will have an INSTALL or README file which will contain installation instructions. use "ls" to see if the software has an install or readme file. If it does have one, you can use the "more" command to read it, like so:

Code:
more INSTALL
Generally, the final 3 stages are as follows:
- Configure the installation
- Compile the software
- Install the binaries

The pre-installation configuration is done by executing ./configure:

Code:
./configure
This will perform some requirements testing on your system, and create a "Makefile" which will explain to the "make" utility how the software should be compiled.

The next stage is to compile the software, this is done using "make". When you run "make" it will read the instructions in the Makefile and build the application binaries.

Code:
make

The final stage is to install these binaries, ie, copy them to a more permanent location. Typically only the "root" user can do this, so you will need to swich to the root user with the "su" command:

Code:
su
Once you are root, install the binaries using the "make" command, followed by "install", like so:

Code:
make install




Powered by Yahoo! Answers

No comments:

Post a Comment