Editing
Infrastructure Machines
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== shell, ntp, ssh key, hosts === Shell autocompletion search: <pre>echo "\"\e[5~\": history-search-backward" >> ~/.inputrc echo "\"\e[6~\": history-search-forward" >> ~/.inputrc</pre> Setup ntp: <pre>vi /etc/ntp.conf server 10.1.2.1 server ntp.ubuntu.com</pre> Generate ssh keys: <pre>cd /root/ ssh-keygen -t dsa</pre> Defaults, no password Setup hosts: <pre>echo "69.55.230.10 backup2" >> /etc/hosts echo "69.55.230.11 backup1" >> /etc/hosts echo "10.1.2.4 bwdb2" >> /etc/hosts echo "10.1.2.3 backup3" >> /etc/hosts</pre> Copy keys to servers where we need passwordless login: <pre>cat .ssh/id_dsa.pub | ssh backup2 'cat - >> /root/.ssh/authorized_keys' cat .ssh/id_dsa.pub | ssh backup1 'cat - >> /root/.ssh/authorized_keys'</pre> Setup shell: <pre>vi /root/.bashrc (add to bottom) alias h='history' alias vi='vim' alias j='jobs' export PS1="[\u@\h \w]# " alias dr='screen -dr' export EDITOR=vim export GREP_OPTIONS='--color=auto' export HISTFILESIZE=1000 alias tip-switch-p20='cu -l ttyel00 -s 9600' alias tip-switch-p21='cu -l ttyel15 -s 9600' alias tip-switch-p22='cu -l ttyel14 -s 9600' alias tip-switch-p23='cu -l ttyel05 -s 9600' alias tip-switch-p24='cu -l ttyel06 -s 9600' alias tip-switch-p25='cu -l ttyel09 -s 9600' alias tip-switch-p26='cu -l ttyel07 -s 9600' alias tip-switch-p27='cu -l ttyel08 -s 9600' alias tip-firewall2='cu -l ttyel01 -s 115200' alias tip-nat2='cu -l /dev/ttyel02 -s 115200' alias tip-backup3='cu -l ttyel04 -s 38400' alias tip-bwdb2='cu -l ttyel03 -s 115200' alias tip-backup4='cu -l ttyel13 -s 115200' alias tip-jail3='cu -l ttyel11 -s 115200' Load new shell: source /root/.bashrc Setup snmpd (this is only valid for a server at castle): echo 'rocommunity jcread 10.1.4.5 rocommunity jcread 10.1.4.3 agentaddress 10.1.4.8:161' > /etc/snmp/snmpd.conf to see which iface it is, on backup2: snmpwalk -v 1 -c jcread 10.1.4.8 interface === nfs === Allow mounts from private net: echo '/data 10.1.2.0/24(rw,no_root_squash,async,no_subtree_check)' >> /etc/exports Restart nfsd: /etc/init.d/nfs-kernel-server restart === bb === Add user, group: echo "bb:x:1984:1984:Big Brother:/home/bb:/bin/bash" >> /etc/passwd echo "bb:x:1984:" >> /etc/group pwconv Create home: mkdir /home/bb chown bb.bb /home/bb cd ~bb Copy over and install files: <pre>scp backup2:/mnt/data4/build/bb/bb-linux.tar . tar xf bb-linux.tar cd /home/bb/bbc1.9e-btf/etc</pre> Configure main bb server: echo "69.55.230.2 mail.johncompanies.com # BBPAGER BBNET BBDISPLAY smtp ssh" > /home/bb/bbc1.9e-btf/etc/bb-hosts echo "10.1.2.3 backup3.johncompanies.com # ssh" >> /home/bb/bbc1.9e-btf/etc/bb-hosts Configure low disk alerts: <pre>echo "/:90:95 /var:90:95 /data:85:99" > /home/bb/bbc1.9e-btf/etc/bb-dftab</pre> vi /home/bb/bbc1.9e-btf/bin/bb-disk.sh (remove all | SORT xxxx since SORT is broken) chmod +r /var/log/messages ./bbchkcfg.sh (y to questions) ./bbchkhosts.sh (ignore ssh errors) <pre>cd ../.. chown -R bb . su bb cd cd bbc1.9e-btf/src</pre> <pre>make; make install cd .. ./runbb.sh start more BBOUT</pre> (look for errors) exit <pre>vi /etc/rc.local su - bb -c "cd /home/bb/bbc1.9e-btf; ./runbb.sh start" </pre> (before the exit 0) echo 'chmod o+r /var/log/messages' >> /etc/cron.weekly/sysklogd Add f/w rule: ipfw add 00096 allow ip from { 69.55.229.4 or 69.55.229.3 } to 69.55.230.2 1984 <pre>vi ~bb/bbc1.9e-btf/etc/bbdef-client.sh DFWARN=199 DFPANIC=199</pre>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information