赞
踩
最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!
给大家整理的视频资料:
给大家整理的电子书资料:
如果本文对你有帮助,欢迎点赞、收藏、转发给朋友,让我有持续创作的动力!
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
[root@server3 html]# mkdir images
测试:
设置访问黑名单:
当访问失败时,给他定向到其他页面,例如:
另外一种方式(重定向)
server2和server3同样操作
[root@server2 html]# yum install php -y
[root@server3 html]# yum install php -y
[root@server3 html]# vim index.php
<html>
<body>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
[root@server3 html]# vim upload_file.php
[root@server3 html]# mkdir upload
[root@server3 html]# chmod 777 upload
<?php if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 2000000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } else { echo "Invalid file"; } ?>
注意:需要重启httpd
测试:
corosync是集群框架引擎程序,pacemaker是高可用集群资源管理器
下载及配置
[root@server4 ~]# yum install haproxy.x86_64
[root@server4 ~]# ssh-keygen
[root@server4 ~]# ssh-copy-id server1
[root@server4 ~]# yum install -y pacemaker pcs psmisc policycoreutils-python
[root@server4 ~]# ssh server1 yum install -y pacemaker pcs psmisc policycoreutils-python
[root@server4 yum.repos.d]# systemctl enable --now pcsd.service
[root@server4 yum.repos.d]# ssh server1 systemctl enable --now pcsd.service
[root@server1 haproxy]# scp /etc/haproxy/haproxy.cfg server4:/etc/haproxy/
[root@server4 ~]# passwd hacluster
[root@server4 ~]# ssh server1 passwd hacluster
## 给用户密码##
[root@server4 ~]# pcs cluster auth server1 server4
[root@server4 ~]# pcs cluster setup --name mycluster server
##在同一个节点上使用pcs集群设置来生成和同步crosync配置##
[root@server4 ~]# pcs cluster start --all
##启动集群##
[root@server4 ~]# pcs cluster enable --all
##开机自启动##
[root@server4 ~]# pcs status
##查看集群状态##
[root@server4 ~]# crm_verify -LV
##查看集群状态报错##
[root@server4 ~]# pcs property set stonith-enabled=false
##解决刚才集群状态报错问题##
Add a Resource
[root@server4 ~]# pcs resource --help
[root@server4 ~]# pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=172.25.1.100 op monitor interval=30s
[root@server4 ~]# pcs cluster stop server1
##当停止server1时查看集群状态##
[root@server4 ~]# pcs resource agents systemd | grep haproxy
##查看资源管理器中有没有haproxy程序管理##
[root@server4 ~]# pcs resource create haproxy systemd:haproxy op monitor interval=60s
##将haproxy与集群建立连接##
[root@server4 ~]# pcs resource group add hagroup ClusterIP haproxy
##建立资源管理组,约束资源,控制资源启动顺序,使其运行在统一服务器上##
如果ClusterIP或者haproxy服务停掉,集群就会自动重启服务或者添加ClusterIP
[root@server4 ~]# systemctl stop haproxy.service
测试:
如果将正在使用的服务器的网卡down掉,他会自动跳到集群另外一台服务器上
[root@server4 ~]# ip link set down eth0
测试:
[root@server4 ~]# yum install -y fence-virt.x86_64
[root@server4 ~]# ssh server1 yum install -y fence-virt.x86_64
##
[root@server1 ~]# echo c > /proc/sysrq-trigger
##使内核崩溃##
测试:
[root@Sun_s ~]# dnf install fence-virtd-libvirt.x86_64 fence-virtd-multicast.x86_64 fence-virtd.x86_64 -y
##在真机下载##
[root@Sun_s ~]# fence_virtd -c Module search path [/usr/lib64/fence-virt]: Available backends: libvirt 0.3 Available listeners: multicast 1.2 Listener modules are responsible for accepting requests from fencing clients. Listener module [multicast]: The multicast listener module is designed for use environments where the guests and hosts may communicate over a network using multicast. The multicast address is the address that a client will use to send fencing requests to fence_virtd. Multicast IP Address [225.0.0.12]: Using ipv4 as family. Multicast IP Port [1229]: Setting a preferred interface causes fence_virtd to listen only on that interface. Normally, it listens on all interfaces. In environments where the virtual machines are using the host machine as a gateway, this *must* be set (typically to virbr0). Set to 'none' for no interface. Interface [virbr0]: br0 The key file is the shared key information which is used to authenticate fencing requests. The contents of this file must be distributed to each physical host and virtual machine within a cluster. Key File [/etc/cluster/fence_xvm.key]: Backend modules are responsible for routing requests to the appropriate hypervisor or management layer. Backend module [libvirt]: The libvirt backend module is designed for single desktops or servers. Do not use in environments where virtual machines may be migrated between hosts. Libvirt URI [qemu:///system]: Configuration complete. === Begin Configuration === backends { libvirt { uri = "qemu:///system"; } } listeners { multicast { port = "1229"; family = "ipv4"; interface = "br0"; address = "225.0.0.12"; key_file = "/etc/cluster/fence_xvm.key"; } } fence_virtd { module_path = "/usr/lib64/fence-virt"; backend = "libvirt"; listener = "multicast"; } === End Configuration === Replace /etc/fence_virt.conf with the above [y/N]? y
注意:只有网络那里需要手动输入你的网桥名字,其余全部回车即可
最全的Linux教程,Linux从入门到精通
======================
linux从入门到精通(第2版)
Linux系统移植
Linux驱动开发入门与实战
LINUX 系统移植 第2版
Linux开源网络全栈详解 从DPDK到OpenFlow
第一份《Linux从入门到精通》466页
====================
内容简介
====
本书是获得了很多读者好评的Linux经典畅销书**《Linux从入门到精通》的第2版**。本书第1版出版后曾经多次印刷,并被51CTO读书频道评为“最受读者喜爱的原创IT技术图书奖”。本书第﹖版以最新的Ubuntu 12.04为版本,循序渐进地向读者介绍了Linux 的基础应用、系统管理、网络应用、娱乐和办公、程序开发、服务器配置、系统安全等。本书附带1张光盘,内容为本书配套多媒体教学视频。另外,本书还为读者提供了大量的Linux学习资料和Ubuntu安装镜像文件,供读者免费下载。
本书适合广大Linux初中级用户、开源软件爱好者和大专院校的学生阅读,同时也非常适合准备从事Linux平台开发的各类人员。
需要《Linux入门到精通》、《linux系统移植》、《Linux驱动开发入门实战》、《Linux开源网络全栈》电子书籍及教程的工程师朋友们劳烦您转发+评论
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
本书适合广大Linux初中级用户、开源软件爱好者和大专院校的学生阅读,同时也非常适合准备从事Linux平台开发的各类人员。
需要《Linux入门到精通》、《linux系统移植》、《Linux驱动开发入门实战》、《Linux开源网络全栈》电子书籍及教程的工程师朋友们劳烦您转发+评论
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。