FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


preparation:installing.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
Last revision Both sides next revision
preparation:installing.html [2018/03/14 01:25]
kurihara
preparation:installing.html [2018/07/29 23:47]
kurihara
Line 30: Line 30:
 HISTSIZE=10000 HISTSIZE=10000
 HISTFILESIZE=10000 HISTFILESIZE=10000
-HISTTIMEFORMAT='%Y-%m-%dT%T%z '+HISTTIMEFORMAT='%%T %z ' 
 +PROMPT_COMMAND="history -a" 
 + 
 +PS1="[\u@\h \w \t]\$ "
 @ @
 </sxh> </sxh>
Line 86: Line 89:
  
 ~]# yum install epel-release ~]# yum install epel-release
 +~]# yum info fabric
 ~]# yum install fabric ~]# yum install fabric
 +~]# fab --version
 +Fabric 1.14.0
 +Paramiko 1.16.1
 </sxh> </sxh>
  
Line 94: Line 101:
 ~]# yum install gcc python-devel python-setuptools ~]# yum install gcc python-devel python-setuptools
 ~]# easy_install pip ~]# easy_install pip
-~]# pip install fabric+~]# pip search fabric 
 +~]# pip install fabric==1.14.0 
 +~]# fab --version 
 +Fabric 1.14.0 
 +Paramiko 1.16.1 
 +</sxh> 
 + 
 +\\ 
 +=== RHEL/CentOS with virtualenv, pip=== 
 +<sxh text toolbar:false gutter:false> 
 +~]# yum install gcc python-devel python-setuptools 
 + 
 +~]# sudo su - fasthandle 
 +~]# pip install virtualenv 
 +~]# cd /home 
 +~]# virtualenv env_fasthandle -p python2.7 
 +~]# source env_fasthandle/bin/activate 
 +~]# pip install fabric==1.14.0 
 + 
 +~]# deactivate 
 + 
 +~]$ cat << END >> ~/.bashrc 
 + 
 +#virtualenv 
 +source env_fasthandle/bin/activate 
 + 
 +END
 </sxh> </sxh>
  
Line 142: Line 175:
 \\ \\
 ===== Installing FastHandle ===== ===== Installing FastHandle =====
 +
 +You can install FastHandle "From GitHub(Method 1 or 2)" or "Make it yourself(Method 3)".
 +
 ==== Method 1 : From GitHub ==== ==== Method 1 : From GitHub ====
  
 <sxh text toolbar:false gutter:false> <sxh text toolbar:false gutter:false>
 ~]$ cd /home/fasthandle ~]$ cd /home/fasthandle
 +~]$ test -d fhhome && mv fhhome fhhome.`date +%Y%m%d`
 +
 ~]$ git clone https://github.com/kuritaka/fasthandle.git  fhhome ~]$ git clone https://github.com/kuritaka/fasthandle.git  fhhome
 +
 ~]$ tree -a -I '.git'  fhhome ~]$ tree -a -I '.git'  fhhome
-~]$ chmod 755 fhhome/fhscripts/*+~]$ chmod 755 fhhome/bin/*
 </sxh> </sxh>
  
Line 160: Line 199:
 ~]$ mkdir fhhome ~]$ mkdir fhhome
 ~]$ cp -pr fhhome.`date +%Y%m%d`/ fhhome/ ~]$ cp -pr fhhome.`date +%Y%m%d`/ fhhome/
-~]$ chmod 755 fhhome/fhscripts/*+~]$ chmod 755 fhhome/bin/*
 </sxh> </sxh>
  
-/*+
 \\ \\
-==== Method : Make it yourself ====+==== Method : Make it yourself ====
  
-You can install "From GitHub(Method 1)" or "Make it yourself(Method 2)". 
  
 Reference **[[preparation:directory-structure.html|]]** Reference **[[preparation:directory-structure.html|]]**
Line 177: Line 215:
 ~]$ mkdir fhhome ~]$ mkdir fhhome
 ~]$ cd fhhome ~]$ cd fhhome
-~]$ mkdir -p fhscripts fabfile hosts key scripts conf/os conf/httpd conf/named  bin src rpm deb log tmp output+~]$ mkdir -p bin fabfile hosts key log target/bin target/deb target/key target/linux  target/rpm  target/scripts  target/src  tmp
 </sxh> </sxh>
  
Line 189: Line 227:
  
 == 3. Copy FastHandle Scripts == == 3. Copy FastHandle Scripts ==
-Please copy the necessary files and change permission like ''chmod 755 xxxx.sh''.+Please copy the necessary files and change permission like ''chmod 755 bin/xxxx.sh''.
   *[[:index.html#FastHandle Scripts|FastHandle Scripts]]   *[[:index.html#FastHandle Scripts|FastHandle Scripts]]
-*/+ 
 +== 4. Change mode the bash scripts == 
 +<sxh bash toolbar:false gutter:false> 
 +~]# chmod 755 $FHHOME/bin/*.sh 
 +</sxh> 
  
 \\ \\


preparation/installing.html.txt · Last modified: 2020/01/23 01:11 by kurihara