
Linux
文章平均质量分 58
alexwang1983
这个作者很懒,什么都没留下…
展开
-
nohup 执行linux 的shell脚本启动服务
http://www.cyberciti.biz/tips/nohup-execute-commands-after-you-exit-from-a-shell-prompt.htmlnohup Execute Commands After You Exit From a Shell Promptby Vivek Gite onJanuary 4, 2006 · 30 commen转载 2012-08-01 17:05:07 · 4921 阅读 · 0 评论 -
install nodejs on pcduino3
1, install nodejs, the same as raspberry pi wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb2, install pcduino nodejs module, us原创 2014-11-30 01:23:35 · 978 阅读 · 0 评论 -
如何使用wireshark查看ssl内容
1,要查看ssl的内容,需要得到server的server rsa key2, 打开wireshark, 找到如下路径, Edit -> Preferences -> protocols -> SSL然后点击 RSA Keys List: Edit,在新的RSA编辑界面创建一个新的RSA key其中IP address 是服务器的IPPort 一般是443protoco原创 2015-02-27 15:54:46 · 21715 阅读 · 0 评论 -
使用nodejs mongodb连接mongodb的shard分布服务
1,连接单个mongodb的实例,可以参看node mongodb的文档https://github.com/mongodb/node-mongodb-native2, 连接mongodb 的mongos服务,只需要修改一下连接配置即可,如下var MongoClient = require('mongodb').MongoClient , format = r原创 2015-03-25 12:26:22 · 1469 阅读 · 0 评论 -
Turning MongoDB Replica Set to a Sharded Cluster
Written by Severalnines on May 11, 2013origin: http://www.severalnines.com/blog/turning-mongodb-replica-set-sharded-clusterReplica Sets or Sharded Clusters?**转载 2015-03-24 15:25:45 · 943 阅读 · 0 评论 -
基于MongoDb创建NoSQL分布式的数据库
1,在Ubuntu上安装MongoDBsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo原创 2015-03-24 12:44:41 · 3016 阅读 · 0 评论 -
使用activeMQ配置MQTT broker集群
主要是利用HAProxy作为负载均衡器,利用activeMQ作为broker的集群。1,准备4台服务器,默认操作系统为Ubuntu14.04,三台服务器安装activeMQ, 另外一台服务器安装HAProxy作为负载均衡。2,安装和配置activeMQ安装jresudo apt-get install default-jreexport JAVA_HOME=/usr/lib/jv原创 2015-09-02 13:14:16 · 8630 阅读 · 1 评论 -
在ubuntu上安装zeppelin
1, 安装javasudo apt-get install default-jre修改java的home路径,这个在安装mysql jdbc的时候也会用到CLASSPATH=$CLASSPATH:/usr/share/java/mysql.jarexport CLASSPATH2, 安装可以参考这篇文章https://zeppelin.incuba原创 2016-02-06 16:51:43 · 1321 阅读 · 0 评论 -
在amazon ec2上部署spark cluster
1,利用spark自带的ec2脚本来生成spark在spark的安装目录下,执行如下命令$ ./ec2/spark-ec2 -k -i -s --vpc-id= --subnet-id= launch , where is the name of your EC2 key pair (that you gave it when you created it), i原创 2016-02-07 21:00:27 · 2143 阅读 · 0 评论 -
解决中文文件名显示乱码的问题
vi /etc/environment 添加如下LANG="en_US.UTF-8"LAGUAGE="en_US:en"LC_ALL="en_US.UTF-8"然后重新login原创 2016-02-08 17:28:52 · 2437 阅读 · 0 评论 -
从git里面提取两个commit之间变更过的文件
git archive --format=zip HEAD `git diff --name-only 8bbf69c253801228ff504ab080ce7cf44a924971 a27d045d8c60d6c62a4061b94763886577e1c0eb` > a.zip原创 2016-03-30 15:00:56 · 4346 阅读 · 0 评论 -
利用casperjs和tor来隐藏自己的ip地址
1, 首先在ubuntu上面安装tor详情可以参考 https://www.torproject.org/docs/debian.html.enYou need to add the following entry in /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/:deb http:原创 2016-07-25 19:00:32 · 6488 阅读 · 0 评论 -
Node.js: managing child processes
http://krasimirtsonev.com/blog/article/Nodejs-managing-child-processes-starting-stopping-exec-spawnNode.js: managing child processes/ blog / NodejsThese days I spent some time working on转载 2016-07-04 17:30:22 · 423 阅读 · 0 评论 -
启动docker内部的apache2服务并从外部访问
执行需要执行的docker image$ docker run -i -t -p 8080:80 alex20160831/ubuntu /bin/bash在docker的容器内,启动apache2$ sudo service apache2 startcontainer内部访问web服务$ curl http://localhost执行如下命令从c原创 2016-10-11 17:35:32 · 5914 阅读 · 0 评论 -
ssh to pcduino3 without monitor from ubuntu
LinuxNOTE: You should have the usbnet module available for your Linux kernel. On most distributions, this is the case by default. If this is not the case for your distribution, you will need to en原创 2014-11-29 23:10:16 · 683 阅读 · 0 评论 -
在启动时自动执行linux上的一些程序
在启动时自动执行linux上的一些程序/etc/rc.local原创 2014-11-05 16:18:06 · 612 阅读 · 0 评论 -
Linux 任务控制(bg job fg nohup &)
Linux 任务控制(bg job fg nohup &)一、 简介 Linux/Unix 区别于微软平台最大的优点就是真正的多用户,多任务。因此在任务管理上也有别具特色的管理思想。我们知道,在 Windows 上面,我们要么让一个程序作为服务在后台一直运行,要么停止这个服务。而不能让程序在前台后台之间切换。而 Linux 提供了 fg 和bg 命令,让你轻松调度正转载 2012-11-22 11:32:23 · 834 阅读 · 0 评论 -
C C++ socket
http://upload.wikimedia.org/wikipedia/commons/a/a1/InternetSocketBasicDiagram_zhtw.pnghttp://www.linuxhowtos.org/C_C++/socket.htmSockets TutorialThis is a simple tutorial on using so转载 2013-10-21 14:10:47 · 1417 阅读 · 0 评论 -
default charset for apache
on ubuntu,cd /etc/apache2/conf.dvim charsetuncomment the following line.AddDefaultCharset UTF-8原创 2013-10-21 15:03:17 · 705 阅读 · 0 评论 -
c 的多进程编程实例
本实例主要是关于在linux上的c语言编程,涉及到pipe在master process 和 sub process之间的交互。 如何利用fork创建multi-process, 如何利用从子进程中发送信号到父进程。#include #include #include #include #include #include int notify(int p原创 2013-11-13 13:11:05 · 1591 阅读 · 1 评论 -
在ubuntu上配置git server
1,首先创建一个user,比如git$ sudo adduser git$ su git2,创建一个空工程$ mkdir project.git$ cd project.git$ git --bare init3,检测有没有ssh和sshd, 通过 $which ssh$ which sshd如果没有,就按装并且启动。原创 2013-11-29 17:32:09 · 1518 阅读 · 0 评论 -
gitolite 添加用户和repo
http://gitolite.com/gitolite/admin.html1 adding and removing reposNOTE: this page describes how to add new repos. To bring already existing repos into gitolite control, click here.转载 2014-01-09 11:45:50 · 3435 阅读 · 0 评论 -
在Amazon EC2上设置git server
https://dericteong.wordpress.com/category/git/setup-git-server-in-amazon-ec2/1. Setup Git Server in Amazon EC2Posted on June 12, 20131. Setup a Ubuntu EC2 server instance in ht转载 2014-01-09 11:40:33 · 1561 阅读 · 0 评论 -
git 分支图
下边的命令可以打印出git的分支图git log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset' --abbrev-commit --date=relative或者通过下列命令在git config文件里面设置别名。g原创 2014-01-24 21:21:46 · 15075 阅读 · 0 评论 -
error: no sdcard inserted on pcduino
when you insert the micro sdcard to the pcduino, and try to backup or原创 2014-04-23 16:29:39 · 1181 阅读 · 0 评论 -
从Ubuntu12.04升级到Ubuntu 14.04后系统不能启动
进入Ubuntu启动界面,一般有几个选项,Ubuntu,Ubuntu高级。。。输入e键,进入grub的设置界面,将里面的ro修改为rw即可。以上可以启动,暂时性的设置但是为了永久保存这个设置,需要进入Ubuntu里面,修改文件/boot/grub/grub.cfg将其中类似于下面的一行中的ro全部修改为rw即可root=UUID=70abcd30-1a53-4aff-a原创 2014-08-28 16:42:43 · 4389 阅读 · 0 评论 -
ubuntu启动s时出现错误: udevadm trigger is not permitted while udev is unconfigured.
1. Boot liveCD2. "sudo fdisk -l" to find your boot disk, in my case it is /dev/sda1.3. "sudo mkdir /media/newroot"4. "sudo mount /dev/sda1 /media/newroot", change sda1 to whatever your boot di原创 2014-11-10 19:36:00 · 2930 阅读 · 0 评论 -
ssh to intel edison
The factory software image for Edison has SSH access enabled only via the USB Gadget network interface (192.168.2.15). Configuring the board with 'configure_edison --setup' prompts for a root pass转载 2014-10-30 19:11:20 · 1750 阅读 · 0 评论 -
intel edison with grove lcd
通过intel xdk,如下的程序可以打印Hello world到grove lcd上var mraa = require ('mraa');var LCD = require ('jsupm_i2clcd');console.log('Current version of MRAA is', mraa.getVersion());var light = new mraa.Aio(0);var lightValue;var lcdMessage=" ";var myLCD = ne原创 2014-10-31 08:21:14 · 2292 阅读 · 0 评论 -
在postfix使用qq企业邮箱的smtp
在/etc/postfix/main.cf中添加如下信息smtpd_tls_cert_file=/etc/ssl/certs/your.crtsmtpd_tls_key_file=/etc/ssl/private/your.keysmtpd_tls_CAfile=/etc/ssl/certs/your-chaint.crtsmtpd_use_tls=yessmtpd_tls_sess原创 2016-10-17 14:51:07 · 3842 阅读 · 0 评论