Moto Defy 刷机笔记

国行2.2,BL=2的Defy。

RSDLite刷国行2.11底包JDGC_U6_2.11.0_SIGNED_USAJRDNPRCB1B50AA039.0R_JORDANGCCORE_P013_A033_HWp3_Service1FF.sbf,这是国行BL=2的最新底包。

重启后,USB调试模式下使用SuperOneClickv2.3.3-ShortFuse.7z一键root。安装运行SndInitDefy_2.3.apk,安装bootmenu和recovery。将CM7.1 ROM的update-cm-7.1.0-jordan-signed.zip和google apps的gapps-gb-20110828-signed.zip放到SD卡中。

重启进recovery,wipe后安装上面两个zip,重启。

进系统后用CM7 MIUI GPS修复.zip中的gps.conf覆盖/etc下的文件,其它文件覆盖/data/location下的文件,修复gps定位问题。安装 基带切换助手V4.1P.apk ,切换基带可能能够改善信号质量。

proftpd 1.3.4 的变化

需要在配置文件(默认是proftpd.conf)中标明需要加载的模块,如:
LoadModule mod_ctrls_admin.c
LoadModule mod_ban.c
LoadModule mod_tls.c
……

对于FreeBSD port来说mod_sql_mysql 和 mod_sql_postgres 从ftp/proftpd中分离出来,单列为:
databases/proftpd-mod_sql_mysql
databases/proftpd-mod_sql_postgres

安装VMware View

在vcenter上先配置sql和odbc,再安装view composer
全新安装win2008r2,再安装View Connection Server
配置vcenter和composer账号
在View Administrator中添加vcenter和composer,编辑connection server配置
创建ViewEvents数据库,并在View Administrator中添加
导入证书
keytool -genkeypair -keyalg “RSA” -keysize 2048 -keystore keys.jks -storepass secret  //生成key
keytool -certreq -file certificate.csr -keystore keys.jks -storepass secret  //生成csr
keytool -importcert -keystore keys.jks -storepass secret -alias rootCA -file rootCA.p7  //导入CA证书
keytool -importcert -keystore keys.jks -storepass secret -keyalg “RSA” -trustcacerts -file certificate.p7  //导入证书
copy keys.jks C:\Program Files\VMware\VMware View\Server\sslgateway\conf\
vi C:\Program Files\VMware\VMware View\Server\sslgateway\conf\locked.properties
keyfile=keys.jks
keypass=secret
storetype=jks
重启

安装桌面系统并按照文档要求优化,安装View Agent
创建Pools并指定权限

vSphere4升级到vSphere5

先运行vCenter Host Agent Pre-Upgrade Checker检查所有ESXi可以升级
运行vCenter安装程序,升级vCenter到5
安装vSphere Web Client,因为服务器没有装Flash,使用命令行注册
C:\Program Files\VMware\Infrastructure\vSphere Web Client\scripts\admin-cmd register https://vcenter.local:9443/vsphere-client/ https://vcenter.local administrator@local password

Update Manager导入ESXi5的iso,创建基准组,附加基准组,扫描修复

建议迁移原有数据,重建vmfs系统,而非从vmfs3升级到vmfs5;如果这样做不太现实就将vmfs3升级到vmfs5

设置一个syslog服务器用来收集esxi的日志
主机-配置-安全配置文件-防火墙 属性-勾选syslog
主机-配置-高级设置-syslog.global,tcp://172.16.1.2:514

FreeBSD 打开文件数限制

samba报错smbd’s max open files = 16384
一般是系统的open flies限制

查看系统限制:
[root@storage ~]# sysctl -a | grep maxfiles
kern.maxfiles: 12328
kern.maxfilesperproc: 11095
kern.openfiles: 8760
FreeBSD 8.2,默认系统打开文件数12328,每进程打开文件数11095,kern.openfiles是系统当前打开文件数。

设置新的系统限制:
[root@storage ~]# sysctl kern.maxfiles=65536
[root@storage ~]# sysctl kern.maxfilesperproc=32768

查看某个进程的系统限制,nofile就是这个进程打开文件数的限制
24443是某个smbd的pid
[root@storage ~]# mount -t procfs proc /proc
[root@storage ~]# cd /proc/24443
[root@storage /proc/24443]# ls -l
total 0
-r–r–r–  1 root  wheel  0 Nov  7 20:15 cmdline
———-  1 root  wheel  0 Nov  7 20:15 ctl
———-  1 root  wheel  0 Nov  7 20:15 dbregs
-r–r–r–  1 root  wheel  0 Nov  7 20:15 etype
lr–r–r–  1 root  wheel  0 Nov  7 20:15 file -> /usr/local/sbin/smbd
———-  1 root  wheel  0 Nov  7 20:15 fpregs
-r–r–r–  1 root  wheel  0 Nov  7 20:15 map
———-  1 root  wheel  0 Nov  7 20:15 mem
———-  1 root  wheel  0 Nov  7 20:15 note
———-  1 root  wheel  0 Nov  7 20:15 notepg
———-  1 root  wheel  0 Nov  7 20:15 osrel
———-  1 root  wheel  0 Nov  7 20:15 regs
-r–r–r–  1 root  wheel  0 Nov  7 20:15 rlimit
-r–r–r–  1 root  wheel  0 Nov  7 20:15 status
[root@storage /proc/24443]# cat rlimit
cpu -1 -1
fsize -1 -1
data 34359738368 34359738368
stack 536870912 536870912
core -1 -1
rss -1 -1
memlock -1 -1
nproc 5547 5547
nofile 32768 32768
sbsize -1 -1
vmem -1 -1
npts -1 -1
swap -1 -1

/etc/login.conf可以配置某个用户的系统资源限制,默认是无限制的,就是受限于系统内核限制

/etc/sysctl.conf里面配置对开机启动的服务无效

/boot/loader.conf里面配置对开机启动的服务有效

Apache 配置SSL

SSLEngine on
SSLProtocol all -SSLv2 //只允许SSLv3和TLSv1,SSLv2有缺陷禁止掉
SSLCipherSuite RSA:DH:DSS:!EXP:!NULL:!ADH:!EDH:!LOW:!RC4:!MD5:HIGH:MEDIUM //最终的结果就是Key Exchange=RSA/DH,Authentication=RSA/DSS,Cipher Encoding=AES(128/256)/3DES(168),MAC Digest=SHA1
SSLCertificateFile /etc/ssl/certs/nnlm.cer //CA颁发的证书
SSLCertificateKeyFile /etc/ssl/private/nnlm.key //证书的私钥
SSLCertificateChainFile /etc/ssl/certs/chain.cer //证书链,所有的证书链全部写到一个文件里面

Quick-Step地板价格

Quick-Step南京315活动为8折,折后价格为:
舒适系列(无缝拼接)278元/平方,这个是Quick Setp最便宜的地板了,铺完后地板接缝处是无槽平的,卧室用还行,客厅就算了;
V槽拼接350元/平方,这个是有槽最便宜的,客厅用这个比较好;
踢脚线48元/米,说是和地板同样的材质;
压条价格另算

Debian 安装 VMware Tools 之前的准备

debian 6.0.0 安装的时候只选了Standard system utilities,虽然在安装过程中不认识vmxnet3网卡,但是安装完成后即使没有安装VMware Tools,debian也是可以识别vmxnet3网卡的。

编辑/etc/apt/sources.list,把原来的都注释了,加入下面的内容
deb http://ftp.cn.debian.org/debian squeeze main
deb-src http://ftp.cn.debian.org/debian squeeze main
deb http://ftp.cn.debian.org/debian squeeze-updates main
deb-src http://ftp.cn.debian.org/debian squeeze-updates main
deb http://mirrors.ustc.edu.cn/debian-security/ squeeze/updates main
deb-src http://mirrors.ustc.edu.cn/debian-security/ squeeze/updates main

在安装VMware Tools之前还需要执行 aptitude install make linux-headers-2.6-amd64 来安装gcc make linux-headers等,可喜的是这些都在CD1上就有。
安装mysql的不要忘记运行一下mysql_secure_installation