
前些时间因为手欠得问题去折腾系统,最终导致系统更新失败。
然后网上搜索N多方法都无效,万般尝试最终解决了,将解决方法记录一下
顺便分享给有需要得朋友们,如果按照说明后还是无效,那绝对得妥妥得是人品问题
一般打包命令:
tar -zcvf /mnt/wwwroot.tar.gz /mnt/wwwroot
排除某目录或文件:
tar -zcvf /mnt/wwwroot.tar.gz --exclude=*.svn /mnt/wwwroot
此处加入 --exclude 参数排除,多个参数就写多个,
另外:如果需要排除的是目录,不能以/结尾.
CentOS 7.x相对于6.x的改变
首先是目录结构方面的改变:
/bin转移到/usr/bin;/
sbin转移到/usr/sbin;
/lib转移到/usr/lib;
/lib64转移到/usr/lib64.
/var/run符号连接到/run;
/var/lock符号连接到/run/lock.
临时文件夹/tmp是内存虚拟出来的空间(tmpfs类型),systemctl enable/disable tmp.mount启用或停用。
特权进程,如后台服务等,临时文件存放在/run/processname;
进程临时文件较大,需要在服务器重启后可取回的放在/var/tmp,其他情况就放在/tmp下。
本地化配置由/etc/sysconfig/i18n转移到/etc/locale.conf和/etc/vconsole.conf。
hostname配置有/etc/sysconfig/network转移到/etc/hostname。
关于磁盘分区:
就在刚刚,我编译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
#!/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
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
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。
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.点击任务栏右下角的时间和日期会打开新的面板,界面上的“其他时钟”可以打开闹钟应用里的“世界时钟”,但添加城市目前还不会在任务栏的时间日期面板里显示。
#回收内存 echo 1 > /proc/sys/vm/drop_caches #查看内存条数命令: dmidecode |grep -A16 "Memory Device$"
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:用于本地数据库检查
不要下载任何翻墙软件,但是需要有系统管理员身份登陆才可以!
因为需要修改系统中的hosts文件,至于路径就不说了,自己百度或者其他的,这不是本文的内容!
在 hosts 文件中最后另起一行 写入下面的内容后保存,重启浏览器就可以了!
74.125.39.99 clients4.google.com
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主机。
使用到的命令:
chmod #修改目录及文件权限 chown #修改目录及文件所有者 root:x #x用户组的root,用户组不必须
演示目录:
/home/wwwroot/default/
参数:
-R #递归,遍历目录下所有文件及子文件夹修改目录权限:
例:对目录下的所有文件与子目录执行相同的权限变更
#777 为所需设置的权限 chmod -R 777 /home/wwwroot/default/例:修改目录下所有文件与子目录的所有者
#使所有者修改为root用户 chown -R root /home/wwwroot/default/