Nolan's Blog

a PHP JS UI APP developer

Linux

Install / Setting vsftp in CentOS

1. Install
yum install vsftp

2. Config
vi vsftpd.conf


# turn off anonymous login
anonymous_enable=NO
# use userlist user for ftp
userlist_deny=NO
# open passive mode
pasv_enable=YES
pasv_min_port=10000
pasv_max_port=10010
# login banner
ftpd_banner=Welcome to Putike.cn

3. Create user for ftp
useradd –s /sbin/nologin –d /ftp/home/path username
passwd username

4. Add user to userlist
vi user_list

5. Virtual user if need
a. create virtual user list
touch vuser
eg:
username
password

b. build users db
db_load –T –t hash –f /etc/vsftpd/vuser /etc/vsftpd/vuser.db

c. edit /etc/pam.d/vsftpd, add lines:


auth required pam_userdb.so db=/etc/vsftpd/vuser
account required pam_userdb.so db=/etc/vsftpd/vuser

d. config vsftp


guest_enable=YES # enable guest
guest_username=vuser # user vuser db
pam_service_name=vsftpd # use pam

e. set virtual user config path
user_config_dir=/etc/vsftpd/vsftpd_user_conf

f. config the virtual user settings accoring to your needs.
touch username


anon_world_readable_only=NO # view ftp path
anon_upload_enable=YES # allow download
anon_mkdir_write_enable=YES # create and delete dir
anon_other_write_enable=YES # rename or delete file
local_root=/path/ # define user's root 

继续阅读》

, ,

Ubuntu Install and Use Shadowsocks+privoxy

1. INSTALL Shadowsocks-qt5
The document and help on Github is here.
(Github 上有中文安装说明,但是要跳转几次。[传送门]


add-apt-repository ppa:hzwhuang/ss-qt5
apt-get update
apt-get install shadowsocks-qt5

2. Start Up
Setting server,port,username..(GUI). Not say more.

3. privoxy
INSTALL:
apt-get install privoxy
CONFIG:
vi /etc/privoxy/config
INSERT A NEW LINE
forward-socks5 / 127.0.0.1:1080 . (注意最后的点不是我失误
RESTART privoxy
service privoxy restart

继续阅读》

, , ,

Use proxychains to set up a proxy for some program in Linux

Install:
ubuntu apt-get install proxychains
Document: http://proxychains.sourceforge.net/howto.html

Settion:
Config files be loaded order by:
1) ./proxychains.conf
2) $(HOME)/.proxychains/proxychains.conf
3) /etc/proxychains.conf
So change the config in etc/ or create a new one in $home

Config:


## Order by list. auto skip the failed proxy
#dynamic_chain

## Order by list. not skip
strict_chain 

## Order by random
#random_chain

[ProxyList]
## Add the Proxy list, Eg: shadowsocks
socks5 127.0.0.1 1080

To use it:


proxychains ./sudio.sh 

继续阅读》

, ,

Backup 备份一下自己的Vim设置/插件

插件

ctags:
先生成tags文件,在命令行下进入到你的项目文件,执行命令:ctags -R,在当前目录下就会生成一个tags文件,生成tags数据库索引,在gvim中执行:


set tags=/home/cry/test/tags

需要进行函数名、变量名、结构名、结构成员补全时输入 Ctrl+X Ctrl+O, (
需要头文件名补全时输入 Ctrl+X Ctrl+I,
需要文件路径补全时输入 Ctrl+X Ctrl+F,
需要跳转到函数的定义处 Ctrl+] 或 Ctrl+左键单击

NERD_tree:一个文件管理工具

project:一个项目管理工具

winmanager:界面管理

Emmet.vim:zenCoding工具,前段必备

git-vim:git工具

xptemplate:代码片段补全 使用“Ctrl+l,”代码补全

下载:vim_2014_1.zip

继续阅读》

,

SVN的安装配置

一.安装subversion

首先安装服务端程序subversion1.x.x和客户端程序TortoiseSVN-1.x.x.xxxx(是两个网站)。subversion在服务器端客户端都需要安装,TortoiseSVN只要在客户端安装就行。TortoiseSVN的语言包下载和TortoiseSVN的下载都在其官网的同一页。

如果使用了eclipse并且用插件的话,则可以不用TortoiseSVN。

从 http://subversion.tigris.org/downloads/subversion-1.3.2.tar.gz 下载最新版的Subversion源码包解压后运行
或者直接yum啦

./configure –prefix=/subversion
make
make install

二.创建资料库

/subversion/bin/svnadmin create /home/sub_ku

继续阅读》

, , ,

Powered by WordPress.org.