随笔分类 -  服务器安全

服务器安全
摘要:第一步:在lnmp1.4找到php安装的版本 使用命令 tar -jxvf php-7.1.7.tar.bz2 解压第二步: 在解压的php-7.1.7文件夹里找到fileinfo文件夹,然后使用命令 cd /home/xxx/lnmp1.4/src/php-7.1.7/ext/fileinfo 进 阅读全文
posted @ 2017-12-05 17:01 Adtuu 阅读(1975) 评论(0) 推荐(0)
摘要:一、安装Nginx最新版 首先查看是否有安装源包 yum list nginx (或yum info nginx) 如果没有则 添加好源后继续安装 未完待续。。。 阅读全文
posted @ 2016-08-18 17:54 Adtuu 阅读(197) 评论(0) 推荐(0)
摘要:A、关闭selinux(可以预防nginx修改根目录后访问出现404或者403) vi /etc/selinux/config SELINUX=disabled B、修改打开最大文件数句柄也就是 socket数 vi /etc/security/limits.conf 添加 * soft nofile 65535 * ... 阅读全文
posted @ 2016-08-18 17:40 Adtuu 阅读(234) 评论(0) 推荐(0)
摘要:Linux下 service crond restart */10 * * * * /home/mysqlbackup.sh >/home/runssh.log backup.sh #bin/bash source ~/.bash_profile LANG=en_US.UTF-8 cd /home/backup/gch Now=$(date +"%Y%m%d%H%M%S") File=b... 阅读全文
posted @ 2016-06-01 14:20 Adtuu 阅读(281) 评论(0) 推荐(0)
摘要:centos查看端口是否已开放/etc/init.d/iptables status centos开放端口/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT/etc/rc.d/init.d/iptables save/etc/rc.d/init 阅读全文
posted @ 2016-04-13 11:55 Adtuu 阅读(348) 评论(0) 推荐(0)
摘要:centos svn服务器搭建 1、yum install subversion 2、mkdir -p /opt/svn 3、chmod R 777 /opt/svn 4、svnadmin create /opt/svn/repos #创建一个svn版本仓库repos 5、cd /opt/svn/repos/conf 6、cp -p svnserve.conf ./svnserve.conf... 阅读全文
posted @ 2016-03-30 18:20 Adtuu 阅读(219) 评论(0) 推荐(0)
摘要:shell.sh#!/bin/sh source ~/.bash_profile LANG=en_US.UTF-8 cd /opt/web/hzcms/ svn up >> /opt/web/svn.logcontab -e */1 * * * * /opt/web/hzcms_shell.sh > /opt/web/svn.log 阅读全文
posted @ 2016-03-30 18:19 Adtuu 阅读(694) 评论(1) 推荐(0)
摘要:http://www.gitcentral.comhttp://www.projectlocker.comhttp://gitfarm.appspot.comhttp://code.google.com/hosting/http://offers.assembla.com/free-git-host... 阅读全文
posted @ 2016-01-25 09:24 Adtuu 阅读(154) 评论(0) 推荐(0)
摘要:配置好php环境后,下载如下依赖包,解压目录选择php的ext目录,并在php.ini中加上(我的php版本为5.6)extension=php_pdo_sqlsrv_56_ts.dllextension=php_sqlsrv_56_ts.dll重启apache,在phpinfo中查看sqlsrv是... 阅读全文
posted @ 2016-01-15 09:35 Adtuu 阅读(9292) 评论(0) 推荐(0)
摘要:KodExplorer 阅读全文
posted @ 2016-01-14 13:26 Adtuu 阅读(230) 评论(0) 推荐(0)
摘要:通过phpinfo(); 查看其中的 Thread Safety 项,这个项目就是查看是否是线程安全,如果是:enabled,一般来说应该是ts版,否则是nts版。 阅读全文
posted @ 2016-01-11 17:22 Adtuu 阅读(353) 评论(0) 推荐(0)
摘要:git config --global credential.helper store 阅读全文
posted @ 2015-11-25 13:16 Adtuu 阅读(134) 评论(0) 推荐(0)
摘要:80) { header('HTTP/1.1 503 Too busy, try again later'); die('Server too busy. Please try again later.');}*/// 建议最大负载不要超过3*N核,例如有16核(含8核超线程)则 16... 阅读全文
posted @ 2015-09-15 11:14 Adtuu 阅读(752) 评论(0) 推荐(0)
摘要:$value) { _stripslashes($value); } } else { $var = stripslashes($var); } return $var;}function _escape_string($data, $encoding = 'UTF-8') { ret... 阅读全文
posted @ 2015-08-05 14:49 Adtuu 阅读(293) 评论(0) 推荐(0)
摘要:<?phpini_set('session.use_only_cookies', 0);$session_id = rand(10000, 99999);session_set_cookie_params( 0, '/', NULL, false, true);sess... 阅读全文
posted @ 2015-07-30 09:39 Adtuu 阅读(271) 评论(0) 推荐(0)
摘要:我们设置网站权限的时候,有些目录不得不设置让http服务器有写入权限,这样安全隐患就来了。比如discuz x2的 data目录,这个必须要有写入限,论坛才能正常运行,但有的黑客可能就会利用这个目录上传php文件(你会说附件上传已经限制这种格式的文件,但谁知道黑客会利用什么手段上传呢,只有他们清楚了... 阅读全文
posted @ 2015-07-30 09:13 Adtuu 阅读(567) 评论(0) 推荐(0)
摘要:nginx: 在配置文件nginx.conf的http段里加入 server_tokens off; HTTPD.CONFTraceEnable Off <Directory ~ "\.svn">Order allow,denyDeny from all</Directory> HTTPD_DEFA 阅读全文
posted @ 2015-07-30 09:06 Adtuu 阅读(145) 评论(0) 推荐(0)