Correction compilation
This commit is contained in:
parent
cec500da25
commit
8f021d2940
@ -7,8 +7,8 @@ Utilisation : <?php echo $argv[0]; ?> [actions]
|
||||
|
||||
Installation :
|
||||
- install list
|
||||
- install version
|
||||
Configuration :
|
||||
- install version
|
||||
Configuration :
|
||||
- config initscript
|
||||
- config logrotate
|
||||
- config list
|
||||
@ -31,9 +31,9 @@ $SPHINX_VERSION = array(
|
||||
* ============
|
||||
* GCC : gcc g++
|
||||
* MySQL : libmysqld-dev
|
||||
*
|
||||
*
|
||||
* tree
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@ -46,12 +46,20 @@ if ($argv[1]=='install')
|
||||
$version = $argv[2];
|
||||
|
||||
//Vérification nécessaires
|
||||
|
||||
|
||||
//Compilation
|
||||
$cmd = array();
|
||||
$cmd[] = "tar xzvf ".$SPHINX_VERSION[$version]['archive'];
|
||||
$cmd[] = "cp libstemmer_c.tgz ".$SPHINX_VERSION[$version]['dir']."/";
|
||||
$cmd[] = "cd ".$SPHINX_VERSION[$version]['dir']."/";
|
||||
$cmd[] = "cp libstemmer_c.tgz ".$SPHINX_VERSION[$version]['dir']."/";
|
||||
|
||||
foreach($cmd as $c){
|
||||
passthru($c);
|
||||
}
|
||||
|
||||
//Changement du répertoire pour la compilation
|
||||
chdir($SPHINX_VERSION[$version]['dir']);
|
||||
|
||||
$cmd = array();
|
||||
$cmd[] = "tar xzvf libstemmer_c.tgz";
|
||||
$cmd[] = "./configure --with-libstemmer --prefix=/usr/local/sphinx";
|
||||
$cmd[] = "make";
|
||||
@ -64,8 +72,8 @@ if ($argv[1]=='install')
|
||||
if ($argv[1]=='config')
|
||||
{
|
||||
//Initscript
|
||||
if ($argv[2]=='initscript') {
|
||||
exec("cp -v initscript/sphinxsearch /etc/init.d/");
|
||||
if ($argv[2]=='initscript') {
|
||||
exec("cp -v initscript/sphinxsearch /etc/init.d/");
|
||||
exit;
|
||||
}
|
||||
//Logrotate
|
||||
@ -74,24 +82,23 @@ if ($argv[1]=='config')
|
||||
exec("cp -v logrotate/searchd /etc/logrotate.d/");
|
||||
exit;
|
||||
}
|
||||
|
||||
//Liste des configuration
|
||||
|
||||
//Liste des configurations
|
||||
if ($argv[2]=='list') {
|
||||
echo passthru("tree config/".$hostname."/");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
//Configuration
|
||||
if (!file_exists("config/".$hostname."/".$argv[2])){
|
||||
echo "Erreur\n"; exit;
|
||||
echo "Erreur\n"; exit;
|
||||
}
|
||||
$server = $argv[2];
|
||||
|
||||
|
||||
$concat = '';
|
||||
for($i=3;$i<count($argv);$i++){
|
||||
$concat.= " config/".$hostname."/".$server."/".$argv[$i];
|
||||
}
|
||||
//@todo :
|
||||
exec("cat config/".$hostname."/".$server."/sphinx.conf".$concat." > /usr/local/sphinx/etc/sphinx.conf");
|
||||
exec("cat config/".$hostname."/sphinx.conf".$concat." > /usr/local/sphinx/etc/sphinx.conf");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user