原创 Linux搭建rsync服務器

1 服務端配置1.1 關閉SELinux setenforce 0 1.2 安裝rsync yum install -y rsync 1.3 配置rsync vi /etc/rsyncd.conf [rsync] path

原创 Linux搭建NTP服務器

1.安裝ntp ntpdate yum install -y ntp ntpdate 2.修改配置文件 #備份配置文件 cp /etc/ntp.conf /etc/ntp.conf-bak #修改配置文件 vi /etc/ntp.conf

原创 Centos網卡相關

1.查看接口狀態 ip link 2.安裝ifconfig yum install -y net-tools.x86_64 3.查看網口信息 ethtool 網卡名稱

原创 Centos 下搭建DNS服務器

安裝BIND yum -y install bind bind-chroot bind-utils 2.配置named.conf #/etc/named.conf listen-on port 53 { any; }; //IPv4監

原创 centos安裝python netsnmp擴展

1.下載setuptools-0.6c11-py2.7.egg(地址https://pypi.python.org/pypi/setuptools/0.6c11#downloads) #添加執行權限 chmod +x setuptools-

原创 firewalld使用筆記

1.開放指定源IP和目的端口的放行策略 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.2" port proto

原创 Centos安裝php snmp擴展

1.基礎環境準備 yum install net-snmp php-snmp net-snmp-devel 2.進入PHP源碼包3.進入ext文件夾下的snmp文件夾4.設置配置文件 ./configure --with-php-confi

原创 js工具

1.使用js生成隨機密碼 function create_password(min_len=8,max_len=16) { let passwordArray=['abcdefghijklmnopqrstuvwxyz','ABCDE

原创 掃雷遊戲

HTML文件<!DOCTYPE HTML> <html lang="zh-en"> <head> <meta charset="UTF-8" /> <title>Document</title> <link rel="styleshe

原创 貪吃蛇遊戲

HTML文檔:<!DOCTYPE HTML> <html lang="zh-en"> <head> <meta charset="UTF-8" /> <title>Document</title> <link rel="stylesh

原创 Mysql筆記

1.創建擁有所有權限的用戶 CREATE USER 'username'@'host' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'username'@'host'

原创 PHP筆記

1.判斷是否使用了HTTPS ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&

原创 Ceontos7安裝LAMP

1.安裝rz工具 yum install lrzsz 2.切換爲阿里源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.re

原创 Django使用筆記

1.視圖返回HTTP內容 #直接返回文字內容 return HttpResponse('Hello Word! You\'re at the polls index') #使用模版返回內容 template = loader.get_te

原创 Centos7下搭建Zabbix

安裝Mysql5.61.下載MySQL的repo源 #wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2.安裝mysql-community-relea