摘要: 最近装了个ubuntu服务器,需要创建专用的ftp用户,为了安全要禁止ftp用户登录shell。按照在freebsd的操作习惯,我把ftp用户的shell设定为/usr/bin/nologin。岂料该用户居然无法登录ftp,把shell改成/bin/bash后,ftp又能登录了。难道不能禁止登录。网上一遍,解决方法居然很多,包括禁止22端口、设置/etc/hosts.deny或者/etc/hosts.allow等。然而这些方法都有不少局限性,最后发现原因是/usr/bin/nologin不在/etc/shells列表内,ftp登录时要检查该用户的shell设定是否正确,我把shell强行改成不 阅读全文
posted @ 2013-02-02 21:00 Monn 阅读(1647) 评论(1) 推荐(1) 编辑
摘要: 使用在观看 Google I/O 2012 (官网) 视频, 网络不是很稳定, 老卡, 打算下载下来看, 并且方便可以重温.使用 FF 下载, 手动一个个下, 感觉有点二, 并且不稳定, 有时候 putty 会掉线, 失去链接.Google 了一下, 找到了youtube-dl, 代码存放在 github 上 (这里)下载 / 安装需要 python 2.7 , vps 上的python 版本是 2.4, 得先升级下,见这里.安装好 python 2.7 后, 开始安装 youtube-dl wget https://raw.github.com/rg3/youtube-dl/2012.... 阅读全文
posted @ 2013-02-02 03:34 Monn 阅读(1236) 评论(0) 推荐(0) 编辑
摘要: #include <winsock2.h>#include <windows.h>#include <iostream>#pragma comment(lib,"ws2_32.lib")using namespace std;int main (){ WSADATA wsaData; if (WSAStartup(MAKEWORD(2,2), &wsaData) != 0) { cout << "WSAStartup failed.\n"; system("pause"); re 阅读全文
posted @ 2013-01-31 15:02 Monn 阅读(3031) 评论(0) 推荐(0) 编辑
摘要: 首先安装RHEL EPEL RepoCentos 5.xwget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpmwget http://rpms.famillecollet.com/enterprise/remi-release-5.rpmsudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpmCentos 6.xwget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.n 阅读全文
posted @ 2013-01-25 21:37 Monn 阅读(325) 评论(0) 推荐(0) 编辑
摘要: About LAMPLAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the server is already running CentOS, the linux part is taken care of. Here is how to install the rest.Set UpThe steps in this tutorial require 阅读全文
posted @ 2013-01-25 18:39 Monn 阅读(360) 评论(0) 推荐(0) 编辑
摘要: ,因為我的VPS是使用openVZ技術的,所以我想試試看能不能在openVZ VPS上搭建基於PPTP的VPN。終於被我果斷找到了!下面整理成腳本!以供大家參考!系统要求:CentOS532bits/64bits再次申明需要tun和ppp支持,具體參考上一篇L2TP的#!/bin/bashyum remove -y pptpd pppiptables --flush POSTROUTING --table natiptables --flush FORWARDrm -rf /etc/pptpd.confrm -rf /etc/pppwget http://d.ucvps.com/vpn/ppt 阅读全文
posted @ 2013-01-24 20:37 Monn 阅读(146) 评论(0) 推荐(0) 编辑
摘要: VPS的数据备份是必须的,谁也不能保证哪天VPS主机商跑路,或者宿主机硬盘出问题,导致数据丢失!尤其是海外VPS,有时候忘掉备份,为了以防万一我今天又想去找个脚本让他自动备份到网盘里面!http://davehope.co.uk/Blog/backup-your-linux-vps-to-dropbox/dropbox_uploader.sh(上面脚本在此dropbox官方脚本做了优化)很快就被我找到了参考了这篇blog,经过在本地测试环境测试失败之后~毅然放到了VPS上在测一次,结果成功了!本地测试报错信息:[root@localhost home]# ./DropboxBackup.sht 阅读全文
posted @ 2013-01-24 14:51 Monn 阅读(930) 评论(0) 推荐(0) 编辑
摘要: 用Linux服务器的时候,最麻烦的莫过于权限的设置。一种可视化的方法就是通过Winscp一个一个文件夹设置,但是速度太慢了。其实SSH中可以用递归的方法实现批量修改文件或文件夹权限(chmod)操作:先进入目录,举例为wwwcd /www然后递归设置文件夹(目录)权限为777find -type d -exec chmod 777 {} \; /一般用这条就可以了find -type d|xargs chmod 777随后可以选择设置文件权限为777find -not -type d -exec chmod 777 {} \;find -not -type d|xargs chmod 777上 阅读全文
posted @ 2013-01-24 13:49 Monn 阅读(1183) 评论(0) 推荐(0) 编辑
摘要: 这里使用的是centos5.5系统,在执行find命令带有exec扩展命令的时发生了错误提示,这时候需要注意带不带空格:例如:find ./jquery-ui/ -name “*svn” -exec rm -rf {}\;这样写肯定会报错,”find: 遗漏”-exec”的参数”报错的原因是书写的问题,应该这样写:find ./jquery-ui/ -name “*svn” -exec rm -rf {} \;发现没有是空格 ,{}后面还需要加个空格linux下面很多命令是要多个空格或者少个空格,不然就会有莫名其妙的报错。以后多注意,多尝试即可。 阅读全文
posted @ 2013-01-24 13:49 Monn 阅读(7203) 评论(0) 推荐(0) 编辑
摘要: Installing vsftpd on Ubuntu or Debiansudo apt-get install vsftpdInstalling vsftpd on CentOS / Fedorayum install vsftpdHow to configure vsftpd:Now that you’ve installed vsftpd, follow this procedure to configure it. These steps applies for both the linux variants.Before you get started, stop the vsft 阅读全文
posted @ 2013-01-24 13:45 Monn 阅读(248) 评论(0) 推荐(0) 编辑