FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


languages:php:index.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
languages:php:index.html [2018/03/04 00:33]
kurihara [php.py]
languages:php:index.html [2019/02/11 00:48]
kurihara
Line 17: Line 17:
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
-$ fab  -H $H auth.pro  php.install_yum+$ fab  -H $H   php.install_yum
 </sxh> </sxh>
  
Line 26: Line 26:
 $ H=test-server-1,test-server-2 $ H=test-server-1,test-server-2
  
-$ fab  -H $H auth.pro  -- "php -v"+$ fab  -H $H   -- "php -v"
 </sxh> </sxh>
  
Line 47: Line 47:
 @task @task
 def check_php_rpm(): def check_php_rpm():
-    '''rpm -qa |grep php''' +    '''rpm -php''' 
-    sudo("rpm -qa |grep  php")+    run("rpm -php") 
 +    run("php --version")
  
  
Line 103: Line 104:
     run("rpm -q php")     run("rpm -q php")
     run("php --version")     run("php --version")
 +
 +
 +#----------------------------------------------------------------------
 +# Installing composer
 +#----------------------------------------------------------------------
 +@task
 +def install_composer():
 +    sudo("curl -sS https://getcomposer.org/installer | php")
 +    sudo("mv composer.phar /usr/local/bin/composer")
 +
  
 </sxh> </sxh>


languages/php/index.html.txt · Last modified: 2019/02/11 00:48 by kurihara