
Linux
文章平均质量分 64
nisxiya
Still a graduate student in ss of Peking UniversityGood at python, Java, C, Linux VimLearning Algorithms
展开
-
Python Reviewing Notes
# how to get help with python built-in functions1. dir# here a code of pythona = 'strings'dir(a)Then all attrs or functions of a as a string will be presented.2. help# help funti原创 2013-12-20 18:51:03 · 694 阅读 · 0 评论 -
[Ubuntu] 如何設定語系locale
【原文网址】http://www.davidpai.tw/ubuntu/2011/ubuntu-set-locale/前陣子為了某個案子去買了VPS,主機商提供了好多種Linux distribution可以安裝,其中也有Ubuntu。看到Ubuntu當然就很高興的給它安裝下去。安裝好做了些設定,才熊熊想到,那這個語系要怎麼設定? 在網路上爬了些文,發現Ubuntu的語系設定其實還转载 2015-01-22 15:54:32 · 915 阅读 · 0 评论 -
Nginx 配置反向代理
1,首先新建一个配置文件,/etc/nginx/sites-enabled/reverse-proxy.conf内容为如下所示,每行都需要分号结尾upstream monitor_server { #这里是为了使用负载均衡,使得多个ip可以提供同一个服务,weight为权值, server 10.10.12.203:8080 weight=2; server 10.10.1原创 2014-12-09 16:39:03 · 1946 阅读 · 0 评论 -
Ubuntu + Nginx + php + swpan-fcgi 搭建php网络服务
本文的环境是Ubuntu 12,其他系统可以自行查阅,或跟我交流。1,安装nginx这步比较简单,直接 sudo apt-get install nginx,就可以安装了。安装之后需要设置nginx服务的端口,他默认的端口是80.2,设置nginx服务端口其配置文件在/etc/nginx/nginx.conf, 该配置文件引用了 sites-enabled/default,原创 2014-12-09 14:49:11 · 782 阅读 · 0 评论 -
Ubuntu + LVS 搭建四层,实现自定义协议的负载均衡
一,概述:实验环境都是Ubuntu 14,内核已经有lvs模块负载机器:10.10.2.176 (该机器需要安装ipvsadm),需要在该机上建立一个virtual server,其ip是10.10.2.177真实服务器1:10.10.2.190真实服务器2:10.10.2.191真实服务器3:10.10.2.192当请求通过virtual server时,会直接转原创 2014-12-24 16:59:22 · 898 阅读 · 0 评论 -
【Linux开机启动脚本】开机脚本存放位置问题
我在使用Ubuntu系统设置开机启动脚本的时候,原创 2014-11-04 10:22:02 · 2516 阅读 · 0 评论 -
【linux命令】代码或文件统计行数
find /path -name '*.cpp' |xargs wc -l原创 2014-06-20 09:05:29 · 645 阅读 · 0 评论 -
【Git管理】Git 远程操作
【Git使用说明】 远程相关1,git clone$ git clone https://github.com/原创 2014-09-04 09:51:58 · 663 阅读 · 0 评论 -
【Hadoop】编写和运行WordCount.java
1,在Hadoop文件夹下,比如在Linux系统下,Hadoopjieya原创 2014-06-20 18:00:35 · 1102 阅读 · 0 评论 -
【UNIX】文件系统note
1, cp /dev/tty terminalread运行之后,/dev/tty会du原创 2014-04-22 09:11:51 · 633 阅读 · 0 评论 -
【VIM】已经打开的文档:tab 转 空格
:set ts=8 expandtab:retJust for a mark! :原创 2014-04-05 18:18:23 · 611 阅读 · 0 评论 -
【Linux】编译模块记录
1,新建一个文件 hello.c, 可以在自己的home directory里进行。#include #include #include static int __init hello_init(void){ printk(KERN_INFO "Hello world\n"); return 0;}static void __exit hello_exit(vo原创 2014-04-04 13:35:38 · 669 阅读 · 0 评论 -
ubuntu运行xv6
此文用以记录过程xv6 可以在http://pdos.csail.mit.edu/6.828/2011/xv6.html 使用git clone下来,相当方便。而运行xv6的bochs,源代码包bochs-2.4.6.tar.gz可以从http://sourceforge.net/projects/bochs/下载注意:不能使用ubuntu上的a转载 2014-03-03 01:35:42 · 2366 阅读 · 0 评论 -
ubuntu中配置DNS服务器 记录
使用环境 Ubuntu 12.101, sudo apt-get install bind9 //安装软件2, 安装完成后,/etc/init.d/bind9 可以用来启动服务。 在Ubuntu中,用 service bind9 [start | stop | restart] 等来实现服务控制3, /etc/bind 里有如下文件,(不包括db.test.com,db.1原创 2014-02-25 00:31:52 · 2217 阅读 · 1 评论 -
ubuntu11.10搭建eclipse C++开发环境
Original source of blog: http://www.cnblogs.com/ylan2009/archive/2012/04/16/2451080.htmlubuntu11.10搭建eclipse C++开发环境参考了网上的各种资料,终于搭起来了1.最重要的东西,C++必要工具,安装的是GCC工具链,Make等一系列开发工具: sudo apt-转载 2013-12-20 18:42:02 · 714 阅读 · 0 评论 -
Vim 多行替换
Replace multiple lines in VimAim// to replace the following line with new multiple lines// original line "type": "string"// target lines "type": "string", "fie原创 2016-09-05 11:20:21 · 1762 阅读 · 0 评论