首页 文章 精选 留言 我的

精选列表

搜索[Linux版本],共10000篇文章
优秀的个人博客,低调大师

Linux下自动调整时间和时区与Internet时间同步

一、安装ntp [root@server-2 ~]# yum install -y ntpdate 二、同步时间 // 方式一、使用域名连接,要经过DNS解析,速度慢。 [root@server-2 ~]# ntpdate pool.ntp.org // 方式二、使用IP连接,超级快。 [root@server-2 ~]# ntpdate 120.24.81.91 http://www.pool.ntp.org是NTP的官方网站,在这上面我们可以找到离我们国家的NTP Server cn.pool.ntp.org.它有3个服务器地址: 服务器一: 1.cn.pool.ntp.org 服务器二: 2.asia.pool.ntp.org 服务器三: 3.asia.pool.ntp.org (直接用域名有时有问题,可以先Ping出他们的IP,然后用IP地址同步) // 出现以下信息说明成功 5 Feb 21:23:06 ntpdate[62910]: step time server 182.92.12.11 offset -40.589470 sec 三、将系统时间写入到系统硬件当中,避免重启服务器时间覆盖 // 显示hardwareclock系统硬件时间 [root@server-2 ~]# hwclock // 将系统时间写入到系统硬件当中 [root@server-2 ~]# hwclock -w 四、设定计划任务同步网络时间 crontab格式如下: # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * command to be executed 设定crontab计划任务有两种方式: 1、写在/etc/crontab里 代码: 00 11 * * * root ntpdate 210.72.145.44 每天11点与中国国家授时中心同步时间 每天11点与中国国家授时中心同步时间 当然前提是 apt-get install ntpdate 代码也可是 00 11 * * * root ntpdate us.pool.ntp.org 2、使用命令crontab -e crontab -e 10 5 * * * root ntpdate us.pool.ntp.org;hwclock -w 这样每天5:10自动进行网络校时,并同时更新BIOS的时间 ################################

优秀的个人博客,低调大师

Magic Leap基于Linux推出开发者门户和SDK

12月20日晚10点,神秘的增强现实公司Magic Leap公布了其第一款产品——AR眼镜Magic Leap One。据悉,近日Magic Leap表示会在游戏开发者大会GDC上公布其创作门户Creator Portal和 Magic Leap One的软件开发工具包 LuminSDK。 作为为Magic Leap开发者提供工具、文档、学习资源和技术支持的平台, Magic Leap表示Creator Portal的这些工具和资源有利于开发者深入进行Magic Leap空间计算,并创作下一代人机交互产品。 Lumin SDK目前还属于技术预览版,感兴趣的开发者可前往Magic Leap网站下载UE4或 Unity版。同时,Magic Leap One搭载了英伟达Tegra处理器,为开发者提供了一款定制化的图形调试工具“Tegra Graphics debugger”。

优秀的个人博客,低调大师

winscp Window自动上传文件到LINUX批处理脚本

转载:http://www.jb51.net/article/59075.htm 1.下载winscp 大家可以去网上自己找,我把winscp安装在c:下的 2.把要执行的命令保存到文件winscp.bat里,这个winscp.bat可以自己创建,我是放在d:下的. winscp.bat脚本内容: 复制代码代码如下: option confirm off open user:pwd@192.168.10.150:22 cd /root/backup put d:\*.php close exit pause 3.执行命令 复制代码代码如下: C:\winscp>WinSCP.com /script=d:\winscp.bat /log=d:\winscp.log

优秀的个人博客,低调大师

ECS Linux 服务器公钥秘钥SSH登录

Ubuntu 14.04.1为例,设置步骤如下: 一. 生成密钥的公钥和私钥 # ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): #输入密码 Enter same passphrase again: #输入密码 Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 1c:37:a8:a3:65:a2:4a:89:ab:46:30:ad:54:d1:40:eb root@iZ28vo50eu5Z 二. 将生成的私钥(id_rsa)下载到本地的windows机器上,并把公钥导入到.ssh/authorized_keys 文件中去 # cd /root/.ssh/ #cat id_rsa.pub >authorized_keys 三. 设置sshd 服务器服务,打开以下设置: RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile /root/.ssh/authorized_keys 修改以下设置: ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no 四. 重启ssh服务 #service ssh restart 五. 导入私钥到远程工具中,比如xshell。 新建连接,点击左边用户身份验证: http://help.aliyun.com/knowledge_detail/6502152.html?spm=5176.7114037.1996646101.29.mSdCu4&pos=15 本文转自毒逆天博客园博客,原文链接:http://www.cnblogs.com/dunitian/p/4970813.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

Linux下“read failed after 0 of 4096 at 0: Input/output error”

1、故障描述( 在线移除一块被设置为pv格式的硬盘,提示unknown device报道): /dev/sdb1 /dev/sdc1 /dev/sdd1是组成/dev/vg_test/lvm_test的PV,这里我们模拟/dev/sdd1硬盘被直接断电了 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [root@dockermnt] #pvdisplay /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd : read failedafter0of4096at21474770944:Input /output error /dev/sdd : read failedafter0of4096at21474828288:Input /output error /dev/sdd : read failedafter0of4096at4096:Input /output error /dev/sdd1 : read failedafter0of512at21467824128:Input /output error /dev/sdd1 : read failedafter0of512at21467938816:Input /output error /dev/sdd1 : read failedafter0of512at0:Input /output error /dev/sdd1 : read failedafter0of512at4096:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error Couldn't find devicewithuuid166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp. ---Physicalvolume--- PVName /dev/sdb1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes (butfull) PESize4.00MiB TotalPE5118 FreePE0 AllocatedPE5118 PVUUIDfuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X ---Physicalvolume--- PVName /dev/sdc1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5116 AllocatedPE2 PVUUIDTRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp ---Physicalvolume--- PVNameunknowndevice VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5118 AllocatedPE0 PVUUID166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp 1 [root@dockermnt] #vgreduce--removemissingvg_test 1 2 3 4 5 6 7 8 9 10 11 /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error /dev/sdd : read failedafter0of4096at21474770944:Input /output error /dev/sdd : read failedafter0of4096at21474828288:Input /output error /dev/sdd : read failedafter0of4096at4096:Input /output error /dev/sdd1 : read failedafter0of512at21467824128:Input /output error /dev/sdd1 : read failedafter0of512at21467938816:Input /output error /dev/sdd1 : read failedafter0of512at0:Input /output error /dev/sdd1 : read failedafter0of512at4096:Input /output error Couldn't find devicewithuuid166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp. Wroteoutconsistentvolumegroupvg_test 1 [root@dockermnt] #vgchange-ay 1 2 3 /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error 1logicalvolume(s) in volumegroup "vg_test" nowactive 1 [root@dockermnt] #df-h 1 2 3 4 5 6 FilesystemSizeUsedAvailUse%Mountedon /dev/sda3 193G14G170G8%/ tmpfs1.9G228K1.9G1% /dev/shm /dev/sda1 190M80M100M45% /boot /dev/mapper/vg_test-lvm_test 20G28M19G1% /mnt 1 [root@dockermnt] #pvdisplay 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd : read failedafter0of4096at21474770944:Input /output error /dev/sdd : read failedafter0of4096at21474828288:Input /output error /dev/sdd : read failedafter0of4096at4096:Input /output error /dev/sdd1 : read failedafter0of512at21467824128:Input /output error /dev/sdd1 : read failedafter0of512at21467938816:Input /output error /dev/sdd1 : read failedafter0of512at0:Input /output error /dev/sdd1 : read failedafter0of512at4096:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error ---Physicalvolume--- PVName /dev/sdb1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes (butfull) PESize4.00MiB TotalPE5118 FreePE0 AllocatedPE5118 PVUUIDfuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X ---Physicalvolume--- PVName /dev/sdc1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5116 AllocatedPE2 PVUUIDTRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp 发现仍旧有I/O的错误出现,跳过重启系统,故障得到解决(这里注意重启前检查fatab信息,看下mount -a是否有报错)。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [root@docker~] #pvdisplay ---Physicalvolume--- PVName /dev/sdb1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes (butfull) PESize4.00MiB TotalPE5118 FreePE0 AllocatedPE5118 PVUUIDfuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X ---Physicalvolume--- PVName /dev/sdc1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5116 AllocatedPE2 PVUUIDTRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp 本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1748466,如需转载请自行联系原作者

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码