mac install jdk6

http://support.apple.com/downloads/#java。
选择下载Java for OS X 2013-005,其说明如下:
Java for OS X 2013-005 delivers improved security, reliability, and compatibility by updating Java SE 6 to 1.6.0_65.
 
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

参考资料
http://maping930883.blogspot.jp/2014/03/linux021mac-os-jdk6.html

原创文章,转载请注明: 转载自海波无痕

本文链接地址: mac install jdk6

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 Uncategorized | 留下评论

mac截屏

1、整个屏幕:
Command+shift+3,截屏的图片保存在桌面
2、活动窗口:
Command+shift+4+空格
3、选择截图:
Command+shift+4

原创文章,转载请注明: 转载自海波无痕

本文链接地址: mac截屏

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 Mac | 标签为 | 留下评论

升级备忘

 
sudo apt-get update;
 
sudo apt-get  install  build-essential libncurses5-dev php5-mysql php5-fpm p7zip-full;
sudo /etc/init.d/php5-fpm restart;
 
./configure \
--prefix=/data/mysql2/server \
--sysconfdir=/data/mysql2/server \
--localstatedir=/data/mysql2/data \
--with-tcp-port=3307 \
--without-debug \
--without-ndb-debug \
--enable-thread-safe-client \
--enable-assembler \
--enable-profiling \
--with-big-tables \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags='-all-static -ltinfo' \
--with-charset=utf8 \
--with-collation=utf8_general_ci \
--with-extra-charsets=all \
--with-plugins=all \
--with-mysqld-user=mysql \
--without-embedded-server \
--with-unix-socket-path=/tmp/mysqld2.sock  
 
make
make install
 
groupadd mysql
useradd -r -g mysql mysql
sudo chown -R mysql:mysql /data/mysql/
cp my-medium.cnf /data/mysql/server/my.cnf
cp mysql.server /etc/init.d/
 
sudo -u mysql ./mysql_install_db \
--basedir=/data/mysql/server \
--datadir=/data/mysql/data;
 
sudo /etc/inid.d/mysql.serser start
 
nginx version: nginx/1.1.19
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-dav-ext-module
 
 
 
sudo apt-get install libxslt-dev libxml2-dev  libgd2-xpm-dev libpam0g-dev
 
./configure \
--prefix=/etc/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-log-path=/var/log/nginx/access.log \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-scgi-temp-path=/var/lib/nginx/scgi \
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
--lock-path=/var/lock/nginx.lock \
--pid-path=/var/run/nginx.pid \
--with-debug \
--with-http_addition_module \
--with-http_dav_module \
--with-http_gzip_static_module \
--with-http_image_filter_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_sub_module \
--with-http_xslt_module \
--with-ipv6 \
--with-sha1=/usr/include/openssl \
--with-md5=/usr/include/openssl \
--with-mail \
--with-mail_ssl_module \
--add-module=/data/install/build/ngx_http_auth_pam_module-1.3 \
--add-module=/data/install/build/echo-nginx-module-0.52 \
--add-module=/data/install/build/nginx-upstream-fair-master \
--add-module=/data/install/build/nginx-dav-ext-module-master
 
 
 
ssh-keygen -t rsa
touch ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
 
下载 id_rsa到本机
chmod 0400 id_rsa
ssh user@ip -p22 -iid_rsa

原创文章,转载请注明: 转载自海波无痕

本文链接地址: 升级备忘

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 server | 标签为 | 留下评论

mac下设置java路径

1、
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
2、
vi /etc/profile
 
 
export M=/data/java
export ANDROID_SDK_HOME=/data/adt-bundle-mac-x86_64-20131030/sdk
export ANT_HOME=$M/apache-ant-1.9.3
export MAVEN_HOME=$M/apache-maven-3.2.1
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
export PATH=$PATH:/data/shell
export PATH=$PATH:$ANDROID_SDK_HOME/platform-tools
export PATH=$PATH:$ANDROID_SDK_HOME/tools
export PATH=$PATH:${JAVA_HOME}/bin:${ANT_HOME}/bin:${MAVEN_HOME}/bin
 
 
3、
修改mac osx系统的hostname 
System Preference -> Sharing -> Computer Name
http://bbs.weiphone.com/read-htm-tid-693083.html
 
4、Mac OS X 中快速访问系统根目录的四种方法
将Macintosh HD快捷方式放入Finder侧边栏
在桌面上显示硬盘
 
http://www.macx.cn/thread-2080254-1-1.html
 
5、Vbox后台启动虚拟机
vboxmanage startvm ubuntu --type headless
 
6、解决mac下eclipse AVD无法创建模拟器
在eclipse中使用 android avd 创建模拟器无效
找到一个解决办法是  在命令行中敲命令  android avd 在这个环境下启动 创建就可以。
参考资料 http://www.coderanch.com/t/629922/Android/Mobile/create-AVD-Mac-Eclipse
 
7、安装wget
curl -O http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz
tar -xzf wget-1.15.tar.gz
cd wget-1.15
./configure --with-ssl=openssl
make
sudo make install

原创文章,转载请注明: 转载自海波无痕

本文链接地址: mac下设置java路径

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 Mac | 标签为 , | 留下评论

linux shell for循环目录

 
#!/bin/bash
 
for a in `ls -1`
do
	x=`expr index "$a" '.'`
 
	n=`expr substr "$a" 1 $x`
	echo $n
	convert $n"jpg" $n'tif'
 
done

原创文章,转载请注明: 转载自海波无痕

本文链接地址: linux shell for循环目录

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 Uncategorized | 留下评论

批量更新dnspod的子域名ip

 
#!/usr/bin/env python
#-*- coding:utf-8 -*-
 
import httplib, urllib
import socket
import time
import os
import sys
import simplejson as json
 
reload(sys)
sys.setdefaultencoding('utf-8')
 
params0 = dict(
	login_email="test@xxx.com", # dnspod帐号
	login_password="tttttttt", # dnspod密码
	format="json"
)
 
params = params0.copy()  
params.update(dict(
	domain_id=0, #域名ID
	record_id=0, #记录ID
	sub_domain='test',    #子域名
	record_line="默认" #默认值
))
 
def domainList():
	headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/json"}
	conn = httplib.HTTPSConnection("dnsapi.cn")
	conn.request("POST", "/Domain.List", urllib.urlencode(params0), headers)
	response = conn.getresponse()
	data = response.read()
	print data
	conn.close()
	return data
 
def recordList(_domain):
	params0.update(dict(domain=_domain))
	headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/json"}
	conn = httplib.HTTPSConnection("dnsapi.cn")
	conn.request("POST", "/Record.List", urllib.urlencode(params0), headers)
	response = conn.getresponse()
	data = response.read()
	print data
	conn.close()
	return data
 
 
def ddns(domain_id,record_id,sub_domain,ip):
	params.update(dict(domain_id=domain_id,record_id=record_id,sub_domain=sub_domain,value=ip))
	headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/json"}
	conn = httplib.HTTPSConnection("dnsapi.cn")
	conn.request("POST", "/Record.Ddns", urllib.urlencode(params), headers)
	response = conn.getresponse()
	data = response.read()
	print data
	conn.close()
	return response.status == 200
 
 
 
if __name__ == '__main__':
 
	ipx=dict(
		dd1=    	        '220.181.111.86',
		dd2=	 	'220.181.111.86',
		dd3=		'220.181.111.86',
		dd4=		'220.181.111.86'
 
	)
 
	#ipx=dict(train7='1.2.3.4')
 
  	str_json = recordList('hehehehe.com')
	dict_o = json.loads(str_json)
	domain_id =  dict_o['domain']['id']
 
 
	for k, v in ipx.iteritems():
		for x in dict_o['records']:
			sub_domain =  x['name']
			if(sub_domain==k):
				old_ip = x['value']
				ip =v
				record_id=x['id']
				print  record_id
				if old_ip==ip:
					print 'True'					
				else:
					print 'False'
                                        #ddns(domain_id,record_id,sub_domain,ip) #更改域名ip

原创文章,转载请注明: 转载自海波无痕

本文链接地址: 批量更新dnspod的子域名ip

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 server | 标签为 , , , , | 留下评论

curl测试

curl  -H "Content-Type: application/x-www-form-urlencoded" --data "c=3&d=%2f9j%2f4AAQSkZJRgABAgAAAQABAAD%2f2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a%0d%0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL%2f2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy%0d%0aMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL%2fwAARCAAUADwDASIA%0d%0aAhEBAxEB%2f8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL%2f8QAtRAAAgEDAwIEAwUFBAQA%0d%0aAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3%0d%0aODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm%0d%0ap6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4%2bTl5ufo6erx8vP09fb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2U31X%2fBPS7u0t76KW0uoVlglUhkb8%2fwAKrafpVjpEZisLZIFO0kryx5PUnk9T%0d%0a1NFFbLdI5GtLl2T91JCFAw7cgjp06fnTZDsZVHQsB19RRRXPD9C7tR0GCQvsVgPmQsT6Yz%2fhU4tx%0d%0a2kkHJ4DUUVa2Nup%2f%2f9k%3d" http://test.ziki.cn/shell/img

原创文章,转载请注明: 转载自海波无痕

本文链接地址: curl测试

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 server | 标签为 | 留下评论

ubuntu华硕(ASUS)ME7510KG 7英寸平板开启usb调试

按照网上的老步骤还是打不开调试模式
1、lsusb
找到设备
Bus 002 Device 012: ID 0b05:5271 ASUSTek Computer, Inc. 
 
2、sudo vi /etc/udev/rules.d/51-android.rules

按照如下操作可以找到华硕(ASUS)ME7510KG 的开发者选项

3、设置--->系统--->关于--->软件资讯--->点击最后一项(版本号)3次
4、设置--->系统--->{}开发者选项(蹦出来了,原来死活找不找)--->设置usb调试。

原创文章,转载请注明: 转载自海波无痕

本文链接地址: ubuntu华硕(ASUS)ME7510KG 7英寸平板开启usb调试

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 soft | 标签为 , , | 留下评论

centos使用vim

1、yum -y install vim-common vim-enhanced vim-minimal
 
2、vi ~/.bashrc
 
alias vi='vim'
source ~/.bashrc
 
3、
vi /root/.vimrc
 
syntax on
set number
 
//ssh连接慢问题
服务端和客户端都设置GSSAPIAuthentication=no
/etc/ssh/ssh_config 把里面的 GSSAPIAuthentication yes 改成 no 关掉它

参考资料
http://www.shaojiahao.org/os/linux/centos-root-use-vi-highlight-and-colorscheme

原创文章,转载请注明: 转载自海波无痕

本文链接地址: centos使用vim

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 server | 标签为 , , | 留下评论

aliyun主机挂载硬盘

1、
fdisk -l
 
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00073f45
 
    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1        2611    20970496   83  Linux
 
Disk /dev/xvdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
2、
fdisk -S 56 /dev/xvdb
 
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xffcb1daf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
 
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
 
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-29371, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-29371, default 29371): 
Using default value 29371
 
Command (m for help): wq
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
 
 
3、
mkfs.ext4 /dev/xvdb1
 
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
13107200 inodes, 52427228 blocks
2621361 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1600 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872
 
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
 
4、
 
echo '/dev/xvdb1  /data ext4    defaults    0  0' >> /etc/fstab
mkdir /data
mount -a

参考资料
http://help.aliyun.com/manual?spm=0.0.0.0.07tnFu&helpId=271

原创文章,转载请注明: 转载自海波无痕

本文链接地址: aliyun主机挂载硬盘

文章的脚注信息由WordPress的wp-posturl插件自动生成

发表在 server | 标签为 | 留下评论
Pages: 1 2 3 4 5 6 7 8 9 10 ... 20 21 22 Next