FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
preparation:target:fasthandle-init.htmlt [2017/11/13 01:09] kurihara ↷ Page moved and renamed from conf:minimum.html to preparation:fasthandle-init.html |
preparation:target:fasthandle-init.htmlt [2019/02/13 22:07] (current) kurihara |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FastHandle-init ====== | + | [[: |
+ | ====== FastHandle-init | ||
\\ | \\ | ||
{{INLINETOC}} | {{INLINETOC}} | ||
Line 9: | Line 10: | ||
\\ | \\ | ||
===== How to use FastHandle-init ===== | ===== How to use FastHandle-init ===== | ||
- | -OS preparation | + | -OS preparation |
-Create fasthandle-init.sh <sxh bash toolbar: | -Create fasthandle-init.sh <sxh bash toolbar: | ||
- | vi fasthandle-init.sh | + | vi fh-init.sh |
</ | </ | ||
-Change Permission <sxh bash toolbar: | -Change Permission <sxh bash toolbar: | ||
- | chown 755 fasthandle-init.sh | + | chown 755 fh-init.sh |
</ | </ | ||
-Execute fansthandle-init.sh <sxh bash toolbar: | -Execute fansthandle-init.sh <sxh bash toolbar: | ||
- | ./fasthandle-init.sh test-server-01 | + | ./fh-init.sh test-server-01 |
</ | </ | ||
Line 23: | Line 24: | ||
\\ | \\ | ||
- | ===== FastHandle-init Examples===== | + | ===== fh-init.sh (FastHandle-init Examples)===== |
==== RHEL7/ | ==== RHEL7/ | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
#!/bin/bash | #!/bin/bash | ||
- | # fasthandle-init.sh | + | #================================================= |
+ | # fh-init.sh | ||
+ | # | ||
+ | # How to use | ||
+ | # | ||
+ | # | ||
+ | # | ||
# Hostname Settings | # Hostname Settings | ||
- | HOSTNAME=$1 | + | if [ ! -z $1 ] ; then |
- | hostname $HOSTNAME | + | |
- | hostnamectl set-hostname $HOSTNAME | + | hostname $HOSTNAME |
+ | hostnamectl set-hostname $HOSTNAME | ||
+ | fi | ||
# Create fasthandle user | # Create fasthandle user | ||
useradd fasthandle | useradd fasthandle | ||
echo ' | echo ' | ||
+ | |||
+ | |||
+ | # sudoers | ||
+ | cp -p / | ||
+ | |||
+ | cat << @ >> / | ||
+ | |||
+ | |||
+ | # FastHandle | ||
+ | fasthandle | ||
+ | |||
+ | @ | ||
</ | </ | ||
+ | ==== RHEL6/ | ||
+ | <sxh bash toolbar: | ||
+ | #!/bin/bash | ||
+ | # | ||
+ | # fh-init.sh | ||
+ | # | ||
+ | # How to use | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # Hostname Settings | ||
+ | if [ ! -z $1 ] ; then | ||
+ | HOSTNAME=$1 | ||
+ | hostname $HOSTNAME | ||
+ | | ||
+ | #/ | ||
+ | cp -p / | ||
+ | grep -v HOSTNAME / | ||
+ | cat / | ||
+ | echo HOSTNAME=$H >> / | ||
+ | fi | ||
+ | # Create fasthandle user | ||
+ | useradd fasthandle | ||
+ | echo ' | ||
+ | |||
+ | # sudoers | ||
+ | cp -p / | ||
+ | |||
+ | cat << @ >> / | ||
+ | |||
+ | |||
+ | # FastHandle | ||
+ | fasthandle | ||
+ | |||
+ | @ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | <WRAP box 90%> | ||
+ | [[: | ||
+ | <catlist -noAddPageButton -noHead> | ||
+ | </ | ||
+ | \\ | ||
+ | [[: |
My Sites
SNS
Copyright (c) 2024 FastHandle - IT Operations Examples All Rights Reserved.