开发者

Using autotools for a LAMP application

开发者 https://www.devze.com 2022-12-22 12:56 出处:网络
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I\'ve never used it, I\'m thinking about using autotools for it开发者_JS百科, to make the configuration and inst

I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon.

Even if I've never used it, I'm thinking about using autotools for it开发者_JS百科, to make the configuration and installation process easier (for the customer and for me, in the future).

Have you ever done (or thought) such a thing? Are there any drawbacks? Does it make a bit of sense?


Autotools is used mostly when you are trying to compile your programs for multiple target platforms. This applies for C code in general and checks stuff like available libs, size of data types, libc functions etc. So unless your program is written in C and you have a need for supporting all kinds of Unix flavors, dont bother with autotools.

If you are trying to build some kind of installation program for Linux, I suggest you look into rpmbuild (for redhat distros). Rpmbuild is easy to use if all you are doing is packaging files for easier distribution. A good tutorial is available here. One great aspect of rpmbuild is that you can specify requirements on the target system, for example: apache, mysql and even specific php-modules that you need.


For configuration and deployment, you can have a look at ant.

In my previous employment, we were using ant for deployment/configuration of a mix of perl, php, xml, xsl, unit test , Apache config ...

You have a build.properties file where you can put some default values and the customer will jsut have to create a local.properties where its values will overwrite the one from build.properties.

Also if you need to launch some scripts that are parts of the setup, you can also do that with ant.


simple idea

I may be stating obvious, but wouldn't it be easier for the sake of it, just to use

phpinfo();

?

From it you may mostly read everything - server version, PHP version, MySQL version and running PHP extension, compare it against what you need and advice to your client or their hoster that "I need this and that installed".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号