Koozali.org: home of the SME Server

How to compile and install from sourcecode ?

Offline arne

  • *****
  • 1,116
  • +0/-4
How to compile and install from sourcecode ?
« on: October 09, 2007, 04:11:06 PM »
I have done it on earlier versions of the SME server, but it was a while ago, I don't remember anymore and the new 7.2 version might be different.

If I want to make an installation from source code (in this case Asterisk PBX) how do I modify the SME server so it is able to compile and install programs from source code ?
......

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: How to compile and install from sourcecode ?
« Reply #1 on: October 09, 2007, 04:26:18 PM »
I have done it on earlier versions of the SME server, but it was a while ago, I don't remember anymore and the new 7.2 version might be different.

If I want to make an installation from source code (in this case Asterisk PBX) how do I modify the SME server so it is able to compile and install programs from source code ?
SME Server, certainly a production box, is not the suitable machine to build your software. Preferred method is to install a CentOS machine instead and install the necessary tools there.

I believe you need at least the e-smith-buildtools to be installed on SME Server. Other requirements like make and configure might also be needed depending on the package you would like to build.

I do not know any instructions to convert a SME Server to a development machine, but it might be along the same line.

I am also wondering if you really need to build asteriks PBX, does the selintra SAIL package not meet your requirements? This is a version developed for SME Server. It even resulted in it's own subforum for VoIP and asterisk here: http://forums.contribs.org/index.php?board=20.0
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: How to compile and install from sourcecode ?
« Reply #2 on: October 09, 2007, 05:17:25 PM »
Well I have done it before (on earlier versions of the sme server). I think it was not that difficult, but I forgot where I put the notes from that time  ..

The problem is that the Selintra RPM might give some strange firewall problems blocking off the firewall from inbound internet access. (Don't know if thats the reason but the Selintra Asterisik RPM is the only mod I have done on the new 7.2)

The reason for trying an Asterisk installation from source code was to get a bether control over the installation process to know that there is not any issues related to the firewall.

*****

By the way, is there any strong or good reason not to install a development environment on the SME server if it can be relatively easily done ? (By seacheing this forum I can se that the last time i did it was while I was using SME 7.0 R2 and that the answer were the same, don't do it, but I did, and it worked quite well. Stupid enough I did not write down any procedure.)

Well I find some of the info from last time here:
http://forums.contribs.org/index.php?topic=31890.0

And something here:
http://forums.contribs.org/index.php?topic=31917.0

I think that the Contribs forum has some good and some bad sides. The good side is generally a very qulified and high level of the discussion. The bad side is how some partisipants belong to a some kind of inner circle of members "delopers" that are alloved to know some "certain secrets" while other are trated as "not smart og good enough" to know about.

It did not crash and there was no problems last time I compiled Asterisk on the SME server. Should it be any reason to expect more problems this time ?

 
« Last Edit: October 09, 2007, 05:54:35 PM by arne »
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: How to compile and install from sourcecode ?
« Reply #3 on: October 09, 2007, 07:22:02 PM »
The problem is that the Selintra RPM might give some strange firewall problems blocking off the firewall from inbound internet access.

Since you believe that to be the case, then you should open a bug report in the Contribs section against the selintra RPM. The devels of that contrib should then ask you some questions so that you can help them to identify where the problem is.

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: How to compile and install from sourcecode ?
« Reply #4 on: October 09, 2007, 09:43:02 PM »
I do not know this is the case. I simply observed by coincidence that the firewall were locked up after I had made a data restore and a installation of the Asterisk rpm, and I don't know why it happened.

By the way, I find it more insteresting and exiting, to learn to install fron souce code than actually get the the Asterisk server running in some certain way. Actually it is running already, so then there is this more interesting general question: How to install from source code.

Actually I do not believe that it should need to be difficult at all. A downloadable module with the right program modules and a shellscript and it should be possible to do this mod during a few minutes.

(I did modify the SME 7.0R2 to compile and install from sourcode and if someone jus knew a few hints, I might spend some minutes or hours less to fint the solution this time.)

******

OK then, I did some testing and started on a procedure:

1. Go to the server-manager panel and enable the yum function (program installer)
2. yum install kernel-devel Kernel-headers
3. yum install gcc
4. yum install cvs
5. yum install openssl-devel

No problems at all this time and at the SME 7.2 I hope this should do it..

The source code installation environment should be there now (I believe..)

Should there be any good reason or arguments why it is not adviceable to install from source code ?



 
« Last Edit: October 10, 2007, 05:14:09 AM by arne »
......

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to compile and install from sourcecode ?
« Reply #5 on: October 10, 2007, 02:52:55 PM »

By the way, is there any strong or good reason not to install a development environment on the SME server if it can be relatively easily done ? (By seacheing this forum I can se that the last time i did it was while I was using SME 7.0 R2 and that the answer were the same, don't do it, but I did, and it worked quite well. Stupid enough I did not write down any procedure.)

if your server is hacked, everything can be compiled.. E V E R Y T H I NG.. i.e. binary files like "ls", "mv" ecc. could not be good..

nowadays the best thing to do is to install vmware (or other virtualization sw) and compile on virtual machine.. so, a virtualized sme on your pc or on your laptop can be used to compile and test.

Quote
I think that the Contribs forum has some good and some bad sides. The good side is generally a very qulified and high level of the discussion. The bad side is how some partisipants belong to a some kind of inner circle of members "delopers" that are alloved to know some "certain secrets" while other are trated as "not smart og good enough" to know about.

IMHO your point of view is wrong..

I think that if you use windows or linux (so, not only SME) for work, to earn money, you MUST know what you are doing.. and, doing things in the "windows style" (next, next, confirm) it's not the best choice: I mena, you can use wizards, but you have to know what wizards do and where they do...

one of the reasons because SME is a great product is its inner security: users (admin too) can't do configuration mistakes if they use web interface.. if you like to use only console and wish to install what you prefer in your favourite way maybe SME is not what you need/you are looking for.

my 2c and, of course, I'm not flaming you (I hope my english is good enough.. :-))

Ciao

Stefano

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: How to compile and install from sourcecode ?
« Reply #6 on: October 10, 2007, 03:57:41 PM »
But all use of open source is not for earning money ??!! (Ask Mr Steave Balmer about his opinion of open source, software patents, business secrets and etc.)

Why not also think that the fun and pleasure about playening with computers and software, and the freedom of learning in an open souce project is the most important aspect of it all.

Of cource if you are hacked and you have installed a deveopment environment the hacker will be free to compile any source code, but if he got root access to your server gateway, wouldn't he then be able to do whatever he wants including also installing a development environment ?

I think that a more relevant way of asking is: If there is an development environment on your server, will this increase the risk of being hacked.

My opinion is no. The capability of compiling sorcecode will not affect the overall risk of being hacked at all.

I now used FreeBSD for a while. For FreeBSD I used the port collectin method for installing software that is all based of compiling surcecode. Is a FreeBSD installation with the ports collection installed, and the ability to use the ports per definition an unsafe installation, because of the capability of compiling sourcecode ? I would belive not.

Which hacking methods should or could be used for a hacker to gain access to a SME server or a FreeBSD server with the capability of compiling  c or c+ sourcecode ?

According to my opinion: A server installation with the capability of compiling sourcecode is completely, and for all practical purposes, as secure as a server without the capability of compiling source code.

The capability of running a php script like the sme server does is a security risk. The capability of being able to compile a c program is not a risk in itself on the same level as the capability of executing or processing a php script (like most linux servers does.)

... Unless it is smething I have not thaught about .. And I should be courious to know what that is.

By the way .. open source for me first off all meens learning and understanding. The more I'm wrong and the more I am corrected with good arguments, the bether it is :-)
« Last Edit: October 10, 2007, 04:18:33 PM by arne »
......