https://static.iklfy.com/uploads/2018/09/28/20180928180111501377.png

修复Windwos10更新失败

前些时间因为手欠得问题去折腾系统,最终导致系统更新失败。

然后网上搜索N多方法都无效,万般尝试最终解决了,将解决方法记录一下

顺便分享给有需要得朋友们,如果按照说明后还是无效,那绝对得妥妥得是人品问题

https://static.iklfy.com/static/images/index/22.jpg

CentOS 7.x相对于6.x的目录结构改变

CentOS 7.x相对于6.x的改变

首先是目录结构方面的改变:

  1. /bin转移到/usr/bin;/

  2. sbin转移到/usr/sbin;

  3. /lib转移到/usr/lib;

  4. /lib64转移到/usr/lib64.

  5. /var/run符号连接到/run;

  6. /var/lock符号连接到/run/lock.

临时文件夹/tmp是内存虚拟出来的空间(tmpfs类型),systemctl enable/disable tmp.mount启用或停用。

特权进程,如后台服务等,临时文件存放在/run/processname;

进程临时文件较大,需要在服务器重启后可取回的放在/var/tmp,其他情况就放在/tmp下。

  1. 本地化配置由/etc/sysconfig/i18n转移到/etc/locale.conf和/etc/vconsole.conf。

  2. hostname配置有/etc/sysconfig/network转移到/etc/hostname。

关于磁盘分区:

  1. ...
https://static.iklfy.com/static/images/index/3.jpg

nginx的spdy模块错误

就在刚刚,我编译nginx的时候,突然得到了一条坑爹的提示:

./configure: error: invalid option "--with-http_spdy_module"

不应该啊,应该有spdy模块啊,无意中想到会不会是新版本的问题。我升级的是1.9.5..

于是找到官方文章看了一下,看到下面这段:

The ngx_http_v2_module module (1.9.5) provides support for HTTP/2 and supersedes thengx_http_spdy_module module.
This module is not built by default, it should be enabled with the --with-http_v2_moduleconfiguration parameter.

把--with-http_spdy_module换成--with-http_v2_module之后重新编译通过...

附上NGINX官方说明:http://nginx.org/en/docs/http/ngx_http_v2_module.html

https://static.iklfy.com/static/images/index/3.jpg

[svn钩子失效] svn 中文文件名导致svn up失败的问题

#!/bin/sh

# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit.  Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the 
# following ordered arguments:
#
#   [1] REPOS-PATH   (the path to this repository)
#   [2] REV          (the number of the revision just committed)
#
# The default working directory for the invocation is undefined                
https://static.iklfy.com/static/images/index/19.jpg

修改CentOS系统的 yum install 源,提高安装速度

1、备份CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

    CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

    CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、完成之后清空yum缓存,并重建yum缓存

yum clean all && yum clean&n                
https://static.iklfy.com/static/images/index/17.jpg

TortoiseSVN文件夹图标不显示的解决方法!

Windows Explorer Shell 支持 Overlay Icon 最多15个,Windows OneDrive自身已经使用了5个,所以就只剩下了10个 供我们使用。

如果你之前安装了例如360UDiskGuard,SkyDrivePro这样的软件,那么可能我们可利用的就更少了,轮不到Tortoise了。像这样的情况,我们可以调整 Tortoise图标名称的字母顺序,来提高Tortoise的优先位置,因为Windows 内部就是安装名称的字母顺序来优先显示的。

解决的步骤:在运行里输入regedit进入注册表界面,

HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows>CurrentVersion>Explorer>ShellIconOverlayIdentifiers

打开后发现Tortoise 系列前面有好多项,Tortoise 系列排到了15名之后,难怪不显示。现在的任务就是把它们提到前面了,名字前面的空格越多排名越靠前,然后关闭注册表,重启Explorer。

https://static.iklfy.com/static/images/index/10.jpg

注册表开启Win10新任务栏时间日期面板

Win10一月技术预览版内置了一批新功能,也有一些正在改变的功能和界面,只是微软没有准备好展示给测试者。在Build 9926版本中,Win10的任务栏时间日期面板也有改进,可以通过注册表开启

1.键盘快捷键WIN+R打开运行,输入regedit打开注册表编辑器

2.前往HKEY_LOCAL_MACHINE>Software>Microsoft>Windows>CurrentVersion>ImmersiveShell

3.创建新的DWORD(32-bit),名字为UseWin32TrayClockExperience,保持0值 屏幕截图(34).png

4.点击任务栏右下角的时间和日期会打开新的面板,界面上的“其他时钟”可以打开闹钟应用里的“世界时钟”,但添加城市目前还不会在任务栏的时间日期面板里显示。

https://static.iklfy.com/static/images/index/3.jpg

CentOS 6.4 安装redis-2.6

wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz 
chmod +x redis-2.6.14.tar.gz 
tar -xzvf redis-2.6.14.tar.gz 
cd redis-2.6.14 
make 
make install 

方法make命令执行完成后,会在src目录下生成5个可执行文件:

redis-server:Redis服务器的daemon启动程序

redis-cli:Redis命令行操作工具。当然,你也可以用telnet根据其纯文本协议来操作

redis-benchmark:Redis性能测试工具,测试Redis在你的系统及你的配置下的读写性能

redis-check-aof:更新日志检查

redis-check-dump:用于本地数据库检查

配置Redis:

https://static.iklfy.com/static/images/index/17.jpg

何删除 Windows.old 文件夹

Windows7方法
通过单击「开始」按钮 「开始」按钮的图片,打开“磁盘清理”。 在搜索框中,键入磁盘清理,然后在结果列表中单击“磁盘清理”。
如果系统提示您选择驱动器,请单击安装 Windows 的驱动器,然后单击“确定”。
在“磁盘清理”对话框的“磁盘清理”选项卡上,单击“清理系统文件”。
如果系统再次提示您选择驱动器,请单击安装 Windows 的驱动器,然后单击“确定”。
选中“以前的 Windows 安装”复选框,以及与要删除的文件对应的任何其他复选框,然后单击“确定”。
在出现的消息中,单击“删除文件”。

Windows8方法
通过右键单击C盘(系统盘,Windows.old 所在分区),单击“常规”-“磁盘清理”。
在“磁盘清理”对话框的“磁盘清理”选项卡上,选中“以前的 Windows 安装”复选框,以及与要删除的文件对应的任何其他复选框,然后单击“确定”。
弹出对话窗口“确定要永久删除这些文件”,单击删除文件。

警告:对 Windows.old 文件夹执行的删除操作是不可撤消的。
https://static.iklfy.com/static/images/index/5.jpg

解决Google Chrome登录不上的问题!

不要下载任何翻墙软件,但是需要有系统管理员身份登陆才可以!

因为需要修改系统中的hosts文件,至于路径就不说了,自己百度或者其他的,这不是本文的内容!

hosts 文件中最后另起一行 写入下面的内容后保存,重启浏览器就可以了!

74.125.39.99    clients4.google.com

https://static.iklfy.com/static/images/index/19.jpg

Joomla3.x在Nginx下的伪静态规则

if ( $args ~ "mosConfig_[a-zA-Z_]{1,21}(=|%3d)" ) {
 set $args "";
 rewrite ^.*$ http://$host/index.php last;
   return 403;
}

if ( $args ~ "base64_encode.*(.*)") {
 set $args "";
 rewrite ^.*$ http://$host/index.php last;
   return 403;
}

if ( $args ~ "(|%3E)") {
  set $args "";
 rewrite ^.*$ http://$host/index.php last;
   return 403;
}

if ( $args ~ "GLOBALS(=|[|%[0-9A-Z]{0,2})") {
 set $args "";
 rewrite ^.*$ http://$host/index.php last;
   return 403;
}

if ( $args ~ "_REQUEST(=|[|%[0-9A-Z]{0,2})") {
    set $args "";
 rewrite ^.*$ http://$host/index.php last;
   return 403;
}

if (!-e $request_filename) {
    rewrite (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.]*)$ /index.php last;
    break;
}

在部分虚拟主机上面可能需要下面的格式的规则,比如华夏名网的nginx主机。

https://static.iklfy.com/static/images/index/6.jpg

linux下批量修改文件及文件夹所有者及权限

使用到的命令:

chmod #修改目录及文件权限
chown #修改目录及文件所有者
root:x #x用户组的root,用户组不必须

演示目录:

/home/wwwroot/default/

参数:

-R #递归,遍历目录下所有文件及子文件夹
修改目录权限:

例:对目录下的所有文件与子目录执行相同的权限变更

#777  为所需设置的权限
chmod -R 777 /home/wwwroot/default/
例:修改目录下所有文件与子目录的所有者
#使所有者修改为root用户
chown -R root /home/wwwroot/default/