178babyhanggege
-
mysql復制與備份
備份策略: 完全+差異+binlog 完全+增量+binlog binlog最好能實時備份到另一個節點上。 完全備份,多久一次? 數據變化量:有20%,建議使用完全備份。 可用的備份存儲空間: 數據變化量很大,可以每天做一個完全備份,每周做一次增量備份。 數據變化量不大,可以每月做一次完全備份,每天做一次增量或者差異。 數據 備份工具: mysqldump:…
-
ansible配置與應用
無法上傳圖片 一、程序主要文件: ansible ansible-playbook ansible-doc 二、程序發布: 要求: 1.不能影響用戶體驗 2.系統不能停機 3.不能導致系統故障或造成系統完全不可用。 發布路徑: /webapps/tuangou /webapps/tuangou-1.1 /webapps/tuangou-1.2. 在調度器上下…
-
Nginx相關配置及其應用
LB Cluster: 傳輸層:lvs、nginx、haproxy 應用層:nginx(http, https, smtp, pop, imap), haproxy(http), httpd(http/https), ats, perlbal, pound, … nginx load balancer: tcp/udp nginx …
-
keepalived配置
前兩個配置做完實驗沒截圖,后面的實驗有圖片。 keepalived的的單獨設置 1.確保時間同步 ntpdate 10.1.0.1 2.保證/etc/hosts文件可以解析到 3.本機配置ssh-keygen -t rsa -P '' ,然后ssh-copy-id -i .ssh/id_rsa.pub root@10.1.44…
-
nginx的模塊應用
1.location的定義 (1)當location中午定義時,默認使用server中的相關定義。 (2)當locating中有了相關定義,此時則啟用location中的定義的內容。 nginx -t檢查配置文件是否有語法錯誤 nginx -s reload重載nginx (3)即使server中的root中的目錄下有了/admin的目錄,但是同時又在loc…
-
LVS模型練習
本次涉及到的練習:nat練習、dr練習、FWM機制練習、mysql集群練習、httpd的集群練習、httpd和mysql結合調度的練習 yum install ipvsadm nat練習 設置: (1)centos7.2作為lvs調度,有兩塊網卡,(公網地址)其中…
-
LVS的四種模型
相關術語: vs:Virtual Server,Director,Dispatcher,Balancer rs:Real Server,upstream server,backend server lvs集群的類型: lvs-nat:修改請求報文的目標IP lvs-dr:操作封裝新的MAC地址; lvs-tun:在原請求IP報文之外新加一個IP首部; lvs…
-
rsyslog+mysql+loganalyzer安裝部署
log:syslog:syslogd,klogd 日志:歷史日志 級別: debug info notice warning,warn(same as warning) err,error(same as err) crit alert emerg,panic(same as emerg) facility:設施 auth authpriv cron dae…
-
LAMP的編譯安裝
一、編譯安裝amp: (1)系統環境:centos6,7 httpd依賴于apr和apr-util appache protable runtime (2)開發環境: Development Tools,Server Platform Development (3)各程序的版本: httpd:2.2,2.4 php:5.x mysql:5.1,5.5,5.6…
-
DNS配置
DNS配置 基本的配置準備 1.安裝bind 2.開啟named服務 一、正向解析庫 1、修改/etc/named.conf配置文件 vim /etc/named.conf 修改如下行 listen-on port 53 { 10.1.44.2; } allow-query { any; } recursion no;…
-
apache服務器
一、改變網頁的默認位置 1、修改DocumentRoot和Directory,修改新的存放路徑為/data/htdocs/ 2、創建/data/htdocs/index.html,注意權限問題 3、注意報錯You don't have permission to access /index.html,此時去查看SElinux的狀態。命令selinu…
-
加密的應用
加密的應用 一、實現對稱加密 1、openssl enc man enc 算法:3des, aes, blowfish, twofish 加密操作:openssl enc -e -des3 -a -salt -in testfile -out testfile.cipher 解密操作:openssl enc -d -des3 -a -…
-
管理systemd
管理systemd 一、systemd介紹 回顧一下centos的啟動流程 POST –> Boot Sequence –> Bootloader –> kernel + initramfs(initrd) –> rootfs –> /sbin/init 在…
-
數組知識與編譯安裝
數組知識與編譯安裝 一數組知識 1、定義數組 聲明數組: declare -a ARRAY_NAME declare -A ARRAY_NAME: 關聯數組 數組元素的賦值: (1) 一次只賦值一個元素; ARRAY_NAME[INDEX]=VALUE weekdays[0]="Sunday&quo…
-
grub知識與故障排除
知識點回顧 at 任務的存放位置:/var/spool/at/ crond 任務存放位置:/var/spool/cron/username 查看服務有沒有運行 centos6: service atd status chkconfig –list atd chkconfig atd o…