grid安装
###############################################
在cs6.5,cs7.2上安装grid11.2.0.1 和database11.2.0.1还是有问题
1.i386与i686的问题
2.cs7.2中的semmni内核参数问题 已经设置了kernel.sem = 250 32000 100 128这四个值,但安装界面不认识,只认识semmni参数名
所以选择cs5.5老版本
CRS-4664: Node oracle successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on centos-release-7-2.1511.el7.centos.2.10.x86_64
http://www.cnblogs.com/taowang2016/p/3316307.html ADVM/ACFS is not supported on centos-release-5-8.el5.centos
从Oracle11.2开始,ASM不仅是一个磁盘组,他还提供了了一个卷管理器,称为ADVM(asm dynamic volume manager)。ADVM向用户提供卷管理服务,并提供标准的磁盘设备驱动程序。利用ADVM,可以在卷组中创建一个或多个卷,每个卷对应操作系统中的 一个设备文件,这些卷是可以动态扩展的,就像操作系统中的卷或者利用第三方软件创建的卷一样,应用程序也可以对ADVM卷中的数据进行读写操作。
在
ADVM卷中可以创建ACFS文件系统,ACFS是一种跨平台的、可扩展的集群文件系统,多个节点可以同时访问asfs中的文件。ACFS不仅可以作为
oracle数据库软件的安装路径,还可以用来存储数据库中的警告文件和跟踪文件,还可以存储诸如视频、声音、图像、文本等类型的文件。
但是在CentOS5.8上面安装rac的时候,却发现
ADVM/ACFS is not supported on
centos-release-5-8.el5.centos(同样适用于单机环境的asm安装,在安装grid的最后执行root.sh的时候出现
的。)
ADVM/ACFS is not supported on centos-release-5-5.el5.centos 解决方法
centOS 5.5 安装 ORACLE 11G RAC 问题汇总
########################################################
oracle grid infrastrucure GI
提供了自动重启功能和asm功能
1、下载linux.x64_11gR2_grid.zip
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html
2、上传到目标机上的独立目录
mkdir /mnt
chmod -R 777 oracle
cd /mnt;ls
cksum linux.x64_11gR2_grid.zip
unzip linux.x64_11gR2_grid.zip
3、在虚拟机里添加两块20g硬盘做asm,centos5.8,2G内存
4、环境配置
vi /etc/security/limits.conf
#for oracle
oracle soft nproc 2048
oracle hard nproc 16384
oracle soft nofile 2048
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
#for grid
grid soft nproc 2048
grid hard nproc 16384
grid soft nofile 2048
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
vi /etc/security/limits.d/90-nproc.conf
* soft nproc 1024
将上面改为
* - nproc 16384
vi /etc/hosts
#public ip
192.168.30.31 rac01
192.168.30.41 rac02
#private ip
10.10.10.31 rac01prv
10.10.10.32 rac02prv
#vip
192.168.30.32 rac01vip
192.168.30.42 rac01vip
#scanip
192.168.30.50 scanip
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
下面两个参数默认是有的,在cs6.8desktop中,所以不需要设置了
kernel.shmall = 2097152
kernel.shmmax = 4294967295
sysctl -p
创建用户和组
oracle
grid
oracle restart + oracle asm
(grid软件的两个功能1 ASM 2 restart)
grid软件就是相当于一个单机版的群集,当你的系统重启的时候数据库会自动跟着启动。这个软件在oracle里面必须要装。
首先做2个用户:oracle和grid
建立5个组:
1数据库软件组dba(管理数据库)和oper
2grid软件组asmadmin(管理ASM),asmdba(可以访问ASM)和asmoper
在oracle组中的用户所拥有的权限各不相同,并且非常严格。
用户及组处理
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 505 asmdba
groupadd -g 506 asmoper
useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
useradd -g oinstall -G dba,asmdba,oper oracle
或
usermod -g oinstall -G dba,asmdba,oper oracle
passwd oracle
passwd grid
id oracle
id grid
创建安装目录
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01
mkdir -p /u01/app/oracle/product/11.2.0/grid
chown -R grid:oinstall /u01/app/oracle/product/11.2.0/grid
chmod -R 775 /u01
下面的这种处理方法
mkdir -p /oracle/app/grid
mkdir -p /oracle/app/11.2.0/grid
chown -R grid:oinstall /oracle
mkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventory
mkdir -p /oracle/app/oracle
mkdir -p /oracle/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /oracle/app/oracle/
chmod -R 775 /oracle/
目录处理
这里需说明一点,很多时候,Grid Infrastructure安装中出现问题,都和 grid与oracle的目录以及用户组混乱造成。
为了避免混乱,对grid用户的ORACLE_BASE目录,设置为/u02/app/grid
mkdir -p /u02/app/oracle/product/11.2.0/grid
chown -R grid:oinstall /u02
chmod -R 775 /u02
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
设置用户环境变量
oracle 和grid 两个用户都要配置。
vi /home/oracle/.bash_profile
加入:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl (数据库实例的名字)
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 (oracle软件的安装目录)
export PATH=$PATH:$ORACLE_HOME/bin
vi /home/grid/.bash_profile
加入:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=+ASM (asm实例名)
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid (grid安装目录)
export PATH=$PATH:$ORACLE_HOME/bin
5、安装asm
下载包并安装:本来有三个包,在cs6下官网只有两个包,另外一个包叫kmod-oracleasm
yum install kmod-oracleasm
rpm -ivh oracleasm*
=====================================
rpm -ivh http://mirror.symnds.com/distributions/CentOS-vault/6.7/os/x86_64/Packages/compat-libcap1-1.10-1.x86_64.rpm
yum install kmod-oracleasm -y
rpm -ivh oracleasm*
fdisk /dev/sdb
n,p,1,w
/etc/init.d/oracleasm configure
grid,asmadmin,y,y
/etc/init.d/oracleasm createdisk crs /dev/sdb1
/etc/init.d/oracleasm createdisk data1 /dev/sdc1
/etc/init.d/oracleasm createdisk data2 /dev/sdd1
/etc/init.d/oracleasm createdisk fra /dev/sde1
oracleasm listdisks mkfs.ext4 /dev/sdd1
===================================
分区之前添加的两块盘,然后初始化
/etc/init.d/oracleasm configure
grid
oinstall
y
y
oracle user login
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
cd database/
./runInstaller
su -
2g到16g内存的话,swap空间等于内存大小,16G以上,等于内存大小
grep SwapTotal /proc/meminfo
dd if=/dev/zero of=swapfile bs=1M count=1024
mkswap swapfile
swapon swapfile
free
vi /etc/fstab
/root/swapfile swap swap defaults 0 0
yum install gcc
yum install libaio-devel
yum install elfutils-libelf-devel
yum install gcc-c++
yum install compat-libstdc++-33
rpm -qa|grep ksh
rpm -ivh http://mirror.symnds.com/distributions/CentOS-vault/5.8/os/x86_64/CentOS/pdksh-5.2.14-37.el5.x86_64.rpm
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install rlwrap
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install rlwrap
有时会报下面这个错,
[Errno -1] repomd.xml does not match metalink for epel Trying other mirror.
这时有两个解决办法,
一是直接下载下面的文件,但有可能在linux下用wget与curl报404错误,这时,在图形界面下的浏览器直接可以下载,然后传到服务器上,再rpm -ivh 就可以了
http://mirrors.sohu.com/fedora-epel/6Server/x86_64/rlwrap-0.42-1.el6.x86_64.rpm
二是修改epel.repo文件,将mirrors行注释,启用baseurl行,也能下
2016年10月29日 星期六 18时45分45秒 才解决,花了大约一个小时解决这个小问题,唉,太坑了
grid need to install follow packages,and oracle might not need to install it.
rpm -ivh http://mirror.symnds.com/distributions/CentOS-vault/6.7/os/x86_64/Packages/compat-libcap1-1.10-1.x86_64.rpm
yum install kmod-oracleasm
rpm -ivh oracleasm*
mount /dev/sr0 /media
rpm -ivh /media/Packages/compat-libcap1-1.10-1.x86_64.rpm
rpm -ivh http://mirror.symnds.com/distributions/CentOS-vault/5.8/os/x86_64/CentOS/pdksh-5.2.14-37.el5.x86_64.rpm
yum install gcc
yum install libaio-devel
yum install elfutils-libelf-devel
yum install gcc-c++
yum install compat-libstdc++-33
或者下面一条命令
yum install gcc libaio-devel elfutils-libelf-devel gcc-c++ compat-libstdc++-33
编辑文件 vi /etc/pam.d/login,添加如下行(11gR1有要求,R2没有要求): session required pam_limits.so 编辑 vi /etc/profile 文件,添加如下行(11gR1有要求,R2没有要求): if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi 该配置在用户oracle登录时会立即生效,如果当前 oracle 用户已经登录可退出后重新登录使之生效。
/etc/init.d/oracleasm configure
grid
asmadmin
y
y
只在一个节点上创建就可以了,另一个扫描一下就可以了
/etc/init.d/oracleasm createdisk rac /dev/mapper/mpathbp1
/etc/init.d/oracleasm deletedisk rac
oracleasm scandisks
oracleasm listdisks
6、用grid用户安装
用grid登录
./runInstaller
出现界面选第二个,单机
可能不出现asm磁盘,首先前面的环境设置先做好,其次可以更改路径/dev/oracleasm/disks.
high 有三份相同的数据
normal 有两份相同的数据
external 没有冗余
硬盘30G,swap10G,不然这里检测条件时会出问题。
安装依赖包,下面这个包一定要安装,如果不提前装好,会出现下面的问题
[root@oracle Packages]# rpm -ivh compat-libcap1-1.10-1.x86_64.rpm
Preparing... ########################################### [100%]
1:compat-libcap1 ########################################### [100%]
[root@oracle Packages]# pwd
/media/cdrom/Packages
过程为,之前没有装包---》报错后根据报错安装这个包---》再次运行脚本会报下面的错---》根据提示还是报错(加-deconfig -force参数)---》所以最好提前装好
[root@rac1 11.2.0]# /g01/oraInventory/orainstRoot.sh
Changing permissions of /g01/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world. Changing groupname of /g01/oraInventory to oinstall.
The execution of the script is complete. [root@rac1 11.2.0]# /g01/app/11.2.0/grid/root.sh
Running Oracle 11g root.sh script... The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /g01/app/11.2.0/grid Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ... Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2013-10-10 03:41:35: Parsing the host name
2013-10-10 03:41:35: Checking for super user privileges
2013-10-10 03:41:35: User has super user privileges
Using configuration parameter file: /g01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
/g01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR, rc = 127, 32512
OLR configuration failed
第二次执行root.sh时,出现下面的报错。
/u01/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force -verbose
[root@oracle Packages]# /u02/app/grid/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script... The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u02/app/grid/product/11.2.0/grid Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2016-09-02 11:39:34: Checking for super user privileges
2016-09-02 11:39:34: User has super user privileges
2016-09-02 11:39:34: Parsing the host name
Using configuration parameter file: /u02/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Improper Oracle Clusterware configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Clusterware
run '/u02/app/grid/product/11.2.0/grid/crs/install/rootcrs.pl -deconfig'
to configure existing failed configuration and then rerun root.sh
[root@oracle Packages]#
可以忽略i386的包
root用户下
1、以文件系统增加(以下是以增加512M的文件系统为例)
dd if=/dev/zero of=/home/oracle/myswaps/swapfile1 bs=1M count=512
注:of后面的路径一定不能是/dev下,否则在激活swap文件时报参数无效
2、创建swap文件
mkswap /home/oracle/myswaps/swapfile1
3、激活swap文件
swapon /home/oracle/myswaps/swapfile1
4、此时用free -m就可以看到swap空间已经增加了,但是重启后就不会存在了
5、添加重启后还会生效,vi /etc/fstab添加如下内容:
/home/oracle/myswaps/swapfile1 swap swap defaults 0 0
执行两个脚本,并安装完成后
注意:如果之前安装过gi,在执行root.sh的时候需要删除之前的配置信息:命令如下:
/u01/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force -verbose
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start at/u01/app/11.2.0/grid/crs/install/rootcrs.pl line 443.
第一次安装11gR2 RAC的时候就遇到了这个11.0.2.1的经典问题,上网一查才知道这是个oracle bug,
具体可以参考:https://forums.oracle.com/thread/2352285
解决办法也很简单,
就是在执行root.sh之前执行以下命令
/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
如果出现
/bin/dd: opening`/var/tmp/.oracle/npohasd': No such file or directory
的时候文件还没生成就继续执行,直到能执行为止,一般出现Adding daemon to inittab这条信息的时候执行dd命令。
另外还有一种解决方法就是更改文件权限
chown root:oinstall /var/tmp/.oracle/npohasd
重新执行root.sh之前别忘了删除配置:/u01/app/11.2.0/grid/crs/install/roothas.pl -deconfig -force -verbose
接下来验证一下
ps -ef|grep asm
su - grid
sqlplus / as sysasm
select status from v$instance
由于在安装GI的时候只能创建一个磁盘组,如果需要增加磁盘组的话,在GI安装完成后,使用ASMCA命令增加磁盘组。
grid安装完成后,重启操作系统,启动ASM实例报错如下:
[grid@oragrid ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 7 16:21:31 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
[grid@oragrid ~]$ crsctl check css
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.
[grid@oragrid ~]$ crsctl check has
CRS-4639: Could not contact Oracle High Availability Services 第一种方法:
切换到root用户执行启动init.ohasd
[root@oragrid ~]# /etc/init.d/init.ohasd run & 再切换到grid用户check,可能有点慢,等一会就会online
[grid@oragrid ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@oragrid ~]$ crsctl check css
CRS-4529: Cluster Synchronization Services is online
[grid@oragrid ~]$ crsctl stat resource -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE OFFLINE oragrid
ora.LISTENER.lsnr
ONLINE OFFLINE oragrid STARTING
ora.asm
ONLINE OFFLINE oragrid Instance Shutdown
ora.ons
OFFLINE OFFLINE oragrid
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE OFFLINE
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE OFFLINE STARTING 原来是开机启动的init.ohasd没有起作用,重新启动一次就好了。 直接杀掉该进程,会自动重新生成一个。
[root@oragrid ~]# ps -ef | grep init.ohasd
root 972 1 0 22:01 ? 00:00:00 /bin/sh /etc/init.d/init.ohasd run
root 2474 2450 0 22:04 pts/0 00:00:00 grep init.ohasd
[root@oragrid ~]# kill -9 972
[root@oragrid ~]# ps -ef | grep init.ohasd
root 2538 1 0 22:05 ? 00:00:00 /bin/sh /etc/init.d/init.ohasd run
root 2638 2450 0 22:05 pts/0 00:00:00 grep init.ohasd [root@oragrid ~]# su - grid
[grid@oragrid ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@oragrid ~]$ crsctl check css
CRS-4529: Cluster Synchronization Services is online
[grid@oragrid ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE oragrid
ora....ER.lsnr ora....er.type ONLINE ONLINE oragrid
ora.asm ora.asm.type ONLINE ONLINE oragrid
ora.cssd ora.cssd.type ONLINE ONLINE oragrid
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE oragrid
ora.ons ora.ons.type OFFLINE OFFLINE 再进入sqlplus就可以看到ASM实例已经启动了。但是每次操作系统重启都会出现这个问题,上述方法治标不治本,且没有找到最终的原因,请教高手解决。 第二种方法: 在网上找到这篇文章,http://blog.csdn.net/tianlesoftware/article/details/8207629,说这个问题是11.2.0.1的bug,但是我现在安装的版本是11.2.0.4,使用这篇文章的解决办法,在root用户下执行下面的命令:
[root@oragrid ~]# /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
^C0+0 records in
0+0 records out
0 bytes (0 B) copied, 13.6369 s, 0.0 kB/s
然后在grid用户下查看has和css状态,可以看到已经启动了
[grid@oragrid ~]$ crsctl check has
CRS-4638: Oracle High Availability Services is online
[grid@oragrid ~]$ crsctl check css
CRS-4529: Cluster Synchronization Services is online
[grid@oragrid ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE oragrid
ora.FRA.dg ora....up.type ONLINE ONLINE oragrid
ora....ER.lsnr ora....er.type ONLINE ONLINE oragrid
ora.asm ora.asm.type ONLINE ONLINE oragrid
ora.cssd ora.cssd.type ONLINE ONLINE oragrid
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE oragrid
ora.ons ora.ons.type OFFLINE OFFLINE
ora.stone.db ora....se.type OFFLINE OFFLINE
居然这个方法管用,但是系统重启后问题依旧,难道这个bug在11.2.0.4还存在吗?
以grid用户安装grid完成后。
接下来,以oracle用户的身份,安装oracle数据库。
grid安装的更多相关文章
- Oracle RAC + ASM + Grid安装
(一)环境准备 主机操作系统 windows10 虚拟机平台 vmware workstation 12 虚拟机操作系统 redhat 5.5 x86(32位) :Linux.5.5.for.x86. ...
- 一步一步搭建 oracle 11gR2 rac+dg之grid安装(四)【转】
一步一步在RHEL6.5+VMware Workstation 10上搭建 oracle 11gR2 rac + dg 之grid安装 (四) 转自 一步一步搭建 oracle 11gR2 rac+d ...
- 【RAC搭建报错】在RAC搭建到grid安装前的检查时,报错
这种ip的报错,无非是检查防火墙,ip配置的原因 而我防火墙已关闭,ip也没配错 最后的原因是因为我172.16.1.41/42这两个IP选的虚拟机没有配置网段 [grid@rac01 grid]$ ...
- Oracle RAC集群安装之:Grid软件安装过程蓝屏
前几天在安装一套RAC服务器的过程中,遇到了蓝屏事件,折腾了蛮久(在排查是否存在硬件问题上花费了相当多一部分时间),整个过程大概说明如下: 1.两台华为的PC SERVER,操作系统为WIN SERV ...
- Linux下搭建Oracle11g RAC(6)----安装Grid Infrastructure
从此步骤开始,我们正式安装Grid软件: ① 以grid用户登录图形界面,执行/home/grid/grid/runInstaller,进入OUI的图形安装界面: ② 进入OUI安装界面后,选择第3项 ...
- rac安装grid报INS-41112错误
原创作品,出自 "深蓝的blog" 博客,欢迎转载,转载时请务必注明下面出处,否则追究版权法律责任. 深蓝的blog:http://blog.csdn.net/huangyanlo ...
- Oracle Grid 11.2.0.4 安装是出现“[INS-41112] Specified network interface doesnt maintain connectivity across cluster”错误
最新文章:Virson's Blog 安装Oracle 11.2.0.4 的RAC,在Grid 安装时报错: [INS-41112]Specified network interface doesnt ...
- 第7步:安装Grid
7.1解压文件 注意,安装Grid时需要以grid用户身份执行,在那之前需要以root身份执行xhost+,即命令: 代码1 [root@sgdb1~]# xhost+ [root@sgdb1~]# ...
- rac_udev建立磁盘方式安装grid时不识别磁盘
原创作品,出自 "深蓝的blog" 博客,欢迎转载,转载时请务必注明下面出处,否则追究版权法律责任. 深蓝的blog:http://blog.csdn.net/huangyanlo ...
随机推荐
- C语言实现粒子群算法(PSO)一
最近在温习C语言,看的书是<C primer Plus>,忽然想起来以前在参加数学建模的时候,用过的一些智能算法,比如遗传算法.粒子群算法.蚁群算法等等.当时是使用MATLAB来实现的,而 ...
- entity framework 新手入门篇(1)-建立模型
entity framework是微软官方免费提供给大家的一套ORM(Object Relational Mapping对象关系映射)解决方案.它不仅可以帮助我们解决数据缓存的问题,还能在最小的开销下 ...
- GridView导出Excel(中文乱码)
public void OUTEXCEL(string items,string where) { DataSet ds = new StudentBLL().GetTable(items,where ...
- mybatis中的#{}和${}
#{}:相当于预处理中的占位符?. #{}里面的参数表示接收java输入参数的名称. #{}可以接受HashMap.简单类型.POJO类型的参数. 当接受简单类型的参数时,#{}里面可以是value, ...
- 将NSString转换成UTF8编码的NSString
在使用网络地址时,一般要先将url进行encode成UTF8格式的编码,否则在使用时可能报告网址不存在的错误,这时就需要进行转换 下面就是转换函数: NSString *urlString= [NSS ...
- nodejs渲染模板
为什么要用nodejs来渲染? 之前前端的任务就是用HTML+CSS 来高保真的还原UI所设计原图,偶尔会使用少量的jq来对页面添加一些特效,页面还要交付给后端开发人员进行数据填充(php jsp)等 ...
- fatal: Could not read from remote repository.的解决办法
1. git remote –v查看远端地址或者查看配置 git config –list 2. git status 3. git add . git status git commit -m “本 ...
- UVA 12549 - 二分图匹配
题意:给定一个Y行X列的网格,网格种有重要位置和障碍物.要求用最少的机器人看守所有重要的位置,每个机器人放在一个格子里,面朝上下左右四个方向之一发出激光直到射到障碍物为止,沿途都是看守范围.机器人不会 ...
- win32记事本程序(二)
遇到一个较大的难题,做记事本要不要使用edit或者是richedit控件呢.如果用控件的话感觉没什么挑战,不用控件,现有的参考资料仅有<windows程序设计>第六章的TYPER程序,这个 ...
- Swift中文基础教程----下标
类,结构和枚举类型都可以通过定义下标来访问一组或者一个序列中的成员元素.通过下标索引就可以方便地检索和设置相应的值,而不需要其他的额外操作.比如你可以通过someArray[index]来访问数组中的 ...