分类 系统搭建 下的文章

防火墙状态 service iptables status

永久关闭防火墙 chkconfig iptables off

启用systemctl systemctl disenable auto-proxy.service

停用systemctl systemctl enable auto-proxy.service

查看systemctl所有运行服务 systemctl list-units --type=service --state=running

数据库备份mysqldump -u root -p -A > xx.xql

数据库还原 mysql -uroot -p < xx.xql

查看端口服务监听状态 netstat -nlp |grep LISTEN

查看socat进程个数 ps -ef | grep socat | wc -l

lnmp下开启thinkphp路由 cd到/usr/local/php/etc/php.ini 修改cgi.fix_pathinfo = 1 [修改后——如果没有,自行添加]

ip link set wlp2s0 promisc on

ip link set enp1s0 promisc on

docker stop $(docker ps -a -q) #停止所有服务

docker rm $(docker ps -a -q) #删除所有容器

docker network create -d macvlan --subnet=192.168.10.0/24 --gateway=192.168.10.1 -o parent=wlp2s0 maclan

docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=enp1s0 maclan

docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=enp1s0 macwan

docker network create -d bridge --subnet=192.168.10.0/24 --gateway=192.168.10.1 bridge_openwrt

docker network connect maclan openwrt

docker exec -it openwrt /bin/sh

create_ap -n wlp2s0 -g 192.168.10.21 xxx Donkey1213

ifconfig br-7875544b7a46 192.168.10.20 netmask 255.255.255.0

docker run --restart always -d --name=openwrt --network maclan --privileged kiddin9_openwrt /sbin/init

docker run --restart always -d --name=openwrt --privileged kiddin9_openwrt /sbin/init

docker run --net wifi --privileged -it OpenWrt /bin/bash

docker run --restart always -d --name=OpenWrt --network wifi --privileged kiddin9_openwrt /sbin/init

 docker run –restart always –name openwrt kiddin9_openwrt -d –network openwrt –privileged /sbin/init

nmcli device wifi hotspot con-name xxx ssid xxx password Donkey1213

nmcli connection modify xxx 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared ipv4.address 192.168.10.1/24 ipv4.gateway 192.168.10.2

nmcli connection up xxx

nmcli connection down xxx

nmcli con modify xxx ipv4.method manual

nmcli con modify xxx ipv4.gateway 192.168.10.1

nmcli con modify xxx ipv4.address 192.168.10.3/24

nmcli connection show xxx #查看热点信息

traceroute baidu.com

docker run --net wifi --ip 192.168.10.10 --mac-address=<MAC_ADDRESS> --device=<NIC_DEVICE_NAME> -it myimage /bin/bash

config interface 'lan'

    option ifname 'eth0'
    option proto 'static'
option netmask '255.255.255.0'
option gateway '192.168.0.1'
option ip6assign '60'
option dns '8.8.8.8 114.114.114.114'
option ipaddr '192.168.0.254'
option broadcast '192.168.0.255'

1.创建本地分支 git checkout -b backup origin/backup

2.保存帐号和密码,下次不需要再次输入 git config --global credential .helper store

3.添加到git本地仓库 文件:git add file 目录:git add document -A

4.提交本地仓库 git commit

5.拉取最新 git pull

6.推送到远程 git push

Mar 09, 2017 7:17:02 PM io.netty.util.internal.ThreadLocalRandom getInitialSeedUniquifier
WARNING: Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?

安装rng-tools包

以下命令安装rng-tools

yum install rng-tools

启动及检查rngd服务(CentOS 6)

service rngd start
service rngd status

启动及检查rngd服务(CentOS 7)

systemctl start rngd
systemctl status rngd

参考https://huataihuang.gitbooks.io/cloud-atlas/os/linux/device/random_number_generator.html

在/opt/lampp/etc/extra下 httpd-ssl.conf 文件

ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/opt/lampp/htdocs/Public"
ServerName xxx.com
ErrorLog "logs/dummy-host2.example.com-error_log"
CustomLog "logs/dummy-host2.example.com-access_log" common
# 添加 SSL 协议支持协议,去掉不安全的协议
SSLProtocol all -SSLv2 -SSLv3
# 修改加密套件如下
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
# 证书公钥配置
SSLCertificateFile /opt/lampp/cert/public.pem
# 证书私钥配置
SSLCertificateKeyFile /opt/lampp/cert/214************.key
# 证书链配置,如果该属性开头有 '#'字符,请删除掉
SSLCertificateChainFile /opt/lampp/cert/chain.pem