Welcome to WebmasterWorld Guest from 34.225.194.144

Forum Moderators: bakedjake

Message Too Old, No Replies

Please Help With "Compiling"

I need to add an application to a VPS

     
2:31 am on Sep 30, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2003
posts:705
votes: 0


Hello, I hope this is the appropriate place to post this.

I just changed web hosting to my own VPS (linux) but have run into a delimma as a result. My previous host had Swish-e set up on the server and I used it on several sites.

When I moved, no Swish-e.

So I download Swish-e and the docs say "compile .." and that stops me. I don't really know what a compiler is, how to load one onto my server and how to use one.

I've searched around quite a lot and haven't been able to find a tutorial that I can understand .. most don't start simple enough.

Can someone point me to a really basic tutorial on compilers.

12:21 pm on Sept 30, 2005 (gmt 0)

New User

10+ Year Member

joined:Sept 21, 2005
posts:30
votes: 0


You need to have shell access and usually root permissions.

There are several programs that you will need to have on your system. gcc is a compiler, make is a program that allows users to build and install packages without any significant knowledge about the details of the build process. All of the instructions are provided for make in the program's makefile.

On to the good stuff.
When you download a copy of the programs source, you need to compile it. There should be install or readme instructions with it and they will let you know of any special considerations, any dependancies or special configure flags needed.
But for you let say there are no special consideration and you can do a simple compile. First thing you need to do is on your shell prompt and go into the directory of your downloaded archive. Usually issuing a "./configure" command will kick off a shell script that will do most of the setup for you to start compiling.

***Pay attention to errors during all of these steps, if the compiler stops you will need to do some googling for the answer.***

After the ./configure script has run you can run the next command "make". Usually after that you can run "make install", after that finishes then your done.

Pretty simple? Only issues will be if the configure or make process end with an error. Make sure you make note of the error and then remember your are probably not the first person who got the error and there will be plenty of information about how to fix the error.

Again, please read the install instructions or readmes or whatever there might be things that you need to do or add to the configure line, like for example php wants to know what modules you are going to compile and sometimes there can be tons of them, these configure flags will usually be noted in the install or readme instructions.

Good luck.

10:22 am on Oct 1, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2003
posts:705
votes: 0


Hello iceman42, thanks for the help. But I need some clarification please.

"You need to have shell access and usually root permissions."

I have shell (I usually use Putty) and I should have root access, it being a VPS

"There are several programs that you will need to have on your system. gcc is a compiler, make is a program that allows users to build and install packages without any significant knowledge about the details of the build process. All of the instructions are provided for make in the program's makefile."

So can I use either or do I need to use both Gcc and Make?

"On to the good stuff.
When you download a copy of the programs source, you need to compile it."

I assume that I downlod it directly into the directory on the server?

Do I also load Gcc into that directory? Do I load Make into that directory?

"There should be install or readme instructions with it and they will let you know of any special considerations, any dependancies or special configure flags needed.'

Okay

"But for you let say there are no special consideration and you can do a simple compile. First thing you need to do is on your shell prompt and go into the directory of your downloaded archive."

Okay so far.

"Usually issuing a "./configure" command will kick off a shell script that will do most of the setup for you to start compiling."

I assume I can do that with Putty?

***Pay attention to errors during all of these steps, if the compiler stops you will need to do some googling for the answer.***

Is this going to crash my server? I really don't want to do that.

"After the ./configure script has run you can run the next command "make"."

So is the command just 'make'?

"Usually after that you can run "make install", after that finishes then your done."

Same question about the command. 'make install'?

"Pretty simple? Only issues will be if the configure or make process end with an error. Make sure you make note of the error and then remember your are probably not the first person who got the error and there will be plenty of information about how to fix the error."

Understand

"Again, please read the install instructions or readmes or whatever there might be things that you need to do or add to the configure line, like for example php wants to know what modules you are going to compile and sometimes there can be tons of them, these configure flags will usually be noted in the install or readme instructions."

Thanks!:)

"Good luck."

I'm going to need some!

7:50 pm on Oct 4, 2005 (gmt 0)

New User

10+ Year Member

joined:July 5, 2005
posts:6
votes: 0


"So can I use either or do I need to use both Gcc and Make?"

You will require both to compile a program, these should already exist on most linux installations.

"I assume that I downlod it directly into the directory on the server? Do I also load Gcc into that directory? Do I load Make into that directory? "

These do not need to be 'loaded' as they are commands available to most users on the machine. You will require root permissions to execute the 'make install' command as you need to copy to directories owned by root. (eg: /usr/bin)

It is a good practice to download source code (tar.gz files) to /usr/src, then run 'tar -zxvf file-version.tar.gz'
This will unpack the file and you will end up with /usr/src/file-version/

Enter /usr/src/file-version and execute a './configure' command, this will run through a script and look for requirements on your machine, as described above, PAY ATTENTION if this stops on an error, where it stops is what you have to fix!

"Is this going to crash my server? I really don't want to do that."

No, running a configure command will NOT crash your computer. It will only exit itself and output an error message if it fails. A successful configure will end at the shell prompt without an error message, there is not a "configure OK" confirmation.

Once it is configured, the standard install process is to execute a 'make', this will actually compile the files needed to run on your system (using variables and options it finds during the ./configure process)

After the make process completes, execute a 'make install'. This will copy the files created during the make process to the directories needed to run. As described above.

READ the INSTALL and README files, they contain specific instructions on how to compile/install your application. Including options to use during the configure command. (./configure --help will output a list of options available, eg: ./configure --bindir=/usr/local/bin to install into the /usr/local/bin directory instead of the default directory.) Different developers use different methods, described above is the de facto standard used in most of the linux source code packages.

Hope this helps you get your server operational.

424Boyz

de facto, adjective, being such in effect though not formally recognized

8:07 pm on Oct 4, 2005 (gmt 0)

New User

10+ Year Member

joined:Sept 21, 2005
posts:30
votes: 0


^^^ what he said ^^^
2:56 am on Oct 5, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2003
posts:705
votes: 0


Iceman and 424boyz, thanks loads for taking the time to explain this in such great details.

Hopefully, I can now get my site search working again.:)

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members