SR、LR、ER、ZR常用于SFP+和XFP封装的模块.指的是传输距离,SR是短距离,通常几百米以内.LR10KM,ER40KM,ZR80KM
产品类型 | 传输距离 | 中心波长 | 接口 | 工作温度 | DDM |
SFP-10G-SR | 300m | 852nm | Duplex LC | 0-70℃ | D |
SFP-10G-LRM | 220m | 1310nm | Duplex LC | 0-70℃ | D |
SFP-10G-LR | 10km | 1310nm | Duplex LC | 0-70℃ | D |
SFP-10G-ER | 40km | 1550nm | Duplex LC | 0-70℃ | D |
SFP-10G-ZR | 70km-80km | 1550nm | Duplex LC | 0-70℃ | D |
none
备份到文件
show configuration |display set |save backup.txt
从备份载入配置
load set backup.txt
首先得安装有ipmitool或者OpenIPMI的包以及加载相应的内核模块
yum install ipmitool -y -q
modprobe ipmi_watchdog
modprobe ipmi_poweroff
modprobe ipmi_devintf
modprobe ipmi_si
执行例子
ipmitool exec ipmi.txt -I lanplus -U '用户' -P '密码' -H IP地址
ipmi.txt内容例子
power status
sensor
mc info
user list
lan print
主要是把所有的命令写在一个文本里面, 不用每次发送命令都带上IP 用户名密码等等
尤其是遇上更改IPMI的IP配置和用户配置的时候, 省去了一大部分的冗余操作.
首先,为了方便rsa免密码登陆要事先准备好.
其次,如果有堡垒机穿透也要事先在ssh/config下配置好.
方法一
ssh [email protected] "cli<< EOF
show configuration|dis set
EOF
" |grep set >junos.backup.txt
方法二
ssh [email protected] 'csh -s' <./backup.sh |grep set > junos.backup.txt
方法二是用csh -s将本地的脚本文件内容抛到juniper上执行.
server {
listen 8080;
resolver 1.1.1.1;
location / {
proxy_bind $server_addr;
proxy_pass $scheme://$http_host$request_uri;
proxy_set_header Host $http_host;
proxy_buffers 256 4k;
proxy_max_temp_file_size 0k;
proxy_connect_timeout 30;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_next_upstream error timeout invalid_header http_502;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
deny 127.0.0.1;
}
连接那个IP 出口就是那个 IP
没有DHCP 没有PXE 也没有netboot , IPMI又卡, 之前的老办法.
ks脚本需要提前准备一下
阅读剩余部分...
CPU: E3-1230V3 - RMB¥1380
主版 Supermicro X10SLH-F - RMB¥1300
內存 三星8GB UDIMM * 4 - RMB¥2000@
RAID 卡: LSI 9261-8i + BBU - RMB¥1200
硬盤: 西數1TB 黑色 * 4 - RMB¥1960
機箱, 散熱, 電源, 導軌 - RMB¥900
一共8740元
none
源码仓库安装
wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
yum -y install docker-ce
systemctl start docker
脚本安装
curl -fsSL https://get.docker.com |bash
sh get-docker.sh
源码安装
wget https://github.com/iredmail/iRedMail/archive/1.2.1.tar.gz -O -|tar xz
cd iRedMail-*
bash iRedMail.sh
Docker安装
docker volume create iRedMail
docker run \
--rm \
--name iredmail \
--env-file /iredmail/iredmail-docker.conf \
--hostname Your-domian..com \
-p 80:80 \
-p 443:443 \
-p 110:110 \
-p 995:995 \
-p 143:143 \
-p 993:993 \
-p 25:25 \
-p 465:465 \
-p 587:587 \
-v /iredmail/data/backup:/var/vmail/backup \
-v /iredmail/data/mailboxes:/var/vmail/vmail1 \
-v /iredmail/data/mlmmj:/var/vmail/mlmmj \
-v /iredmail/data/mlmmj-archive:/var/vmail/mlmmj-archive \
-v /iredmail/data/imapsieve_copy:/var/vmail/imapsieve_copy \
-v /iredmail/data/custom:/opt/iredmail/custom \
-v /iredmail/data/ssl:/opt/iredmail/ssl \
-v /iredmail/data/mysql:/var/lib/mysql \
-v /iredmail/data/clamav:/var/lib/clamav \
-v /iredmail/data/sa_rules:/var/lib/spamassassin \
iredmail/mariadb:nightly
groupadd mysql -g 27
useradd mysql -u 27 -g 27 -c "MySQL Server" -d /home/mysql -m
function代码
function install_mysql() {
groupadd mysql
useradd -s /sbin/nologin -M -g mysql mysql
if [ -n "$1" ] ; then mysqlrootpwd=$1; else mysqlrootpwd=`openssl rand -base64 32| tr -dc _A-Z-a-z-0-9 | head -c12`; fi
echo root $mysqlrootpwd ' | ' `date` >> /root/mysql.txt
yum -y -q install mariadb mariadb-server galera
ln -s /usr/lib/systemd/system/mariadb.service /usr/lib/systemd/system/mysql.service
systemctl enable mariadb
systemctl start mariadb
mysqladmin -u root password $mysqlrootpwd
setmyqlroot $mysqlrootpwd
sed -i 's/skip-locking/skip-external-locking/g' /etc/my.cnf
}
function setmyqlroot() {
if [ -n "$1" ] ; then mysqlrootpwd=$1; else mysqlrootpwd=`openssl rand -base64 32| tr -dc _A-Z-a-z-0-9 | head -c12`; echo root $mysqlrootpwd ' | ' `date` >> /root/mysql.txt ; fi
mysql -uroot -p$mysqlrootpwd <<EOF
UPDATE mysql.user SET Password=PASSWORD("$mysqlrootpwd") WHERE User='root';
DELETE FROM mysql.user WHERE User='';
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
FLUSH PRIVILEGES;
exit
EOF
}
执行安装
install_mysql()
mysql_install_db --user=mysql --datadir=/home/mysql --no-defaults &
mysqladmin -u root password $mysqlrootpwd
lvcreate -L 50G -n /dev/vg0/home
阅读剩余部分...
wget https://minecraft.azureedge.net/bin-linux/bedrock-server-1.10.0.7.zip
unzip bedrock-server-1.10.0.7.zip
apt
apt install zip
unzip bedrock-server-1.10.0.7.zip
LD_LIBRARY_PATH=. ./bedrock_server
sysname 主机名
#配置默认账户密码以及权限
aaa
local-user admin password irreversible-cipher 密码
local-user admin privilege level 15
local-user admin service-type terminal ssh http
#配置默认路由
ip route-static 0.0.0.0 0.0.0.0 172.20.20.1
#配置上联通信IP
interface Vlanif2
ip address 172.20.20.20 255.255.255.0
#配置上联
interface GigabitEthernet0/0/50
description UPLINK
port link-type trunk
port trunk allow-pass vlan all
#port trunk permit vlan all
#配置端口
interface GigabitEthernet0/0/1
description 简介内容
port link-type access
port default vlan 10 #分配VLAN ID (也可以在三层vlan里面进行限速)
qos lr outbound cir 102400 cbs 12800000 #二层限制服务器的流入流量100Mbps
qos lr inbound cir 10240 cbs 1280000 #二层限制服务器的流出流量10Mbps
#配置SNMP
snmp-agent community read cipher Public_community
snmp-agent sys-info version v2c
undo snmp-agent sys-info version v3
#配置DHCP转发 DHCP Relay
dhcp-server 1 ip 192.168.0.10
配置rsa免密码记录在 http://www.kvm.la/1161.html
阅读剩余部分...
有很久没用vsftpd了, 最近做自动备份需要用到ftp服务器, 思来想去也只有vsftp简单粗暴快捷了.
function setftpuser() {
setpassword=`openssl rand -base64 12|tr -dc _A-Z-a-z-0-9`;
adduser $1
echo $1 >> /etc/vsftpd/chroot_list
chmod 750 /home/$1
echo $1:$setpassword|chpasswd
echo $1 $setpassword;
echo $1 $setpassword > /root/vsftp.txt;
}
function vsftp-setup{
yum -y install vsftpd
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.default
sed -i 's#anonymous_enable=YES#anonymous_enable=NO#g' /etc/vsftpd/vsftpd.conf
sed -i 's#listen=NO#listen=YES#g' /etc/vsftpd/vsftpd.conf
sed -i 's#listen_ipv6=YES#listen_ipv6=NO#g' /etc/vsftpd/vsftpd.conf
sed -i 's/#chroot_/chroot_/g' /etc/vsftpd/vsftpd.conf
systemctl enable vsftpd
systemctl start vsftpd
}
vsftp-setup #安装vsftpd
setftpuser 用户名 #添加用户
ssh jail环境没有弄, 后面有精力再弄上.
/ip firewall nat
add chain=srcnat src-address=内网IP段/24 protocol=tcp action=masquerade
add action=dst-nat chain=dstnat dst-address=公网IP dst-port=80,443,5900 protocol=tcp to-addresses=内网IP to-ports=0-65535
add action=dst-nat chain=dstnat dst-address=公网IP dst-port=623 protocol=udp to-addresses=内网IP to-ports=0-65535
怕忘记了,懒得到处找.
- 1
- 2
- »