存档
--gcc安装---
1 查看sun os版本
uname -a的命令查看系统版本。得知是SunOS 5.8。
SunOS 5.8 叫做Solaris 8
SunOS 5.9 叫做Solaris 9,以后就没有5.x的说法了,到Solaris 10了。。。
2 安装gcc
1. 到www.sunfreeware.com下载gcc-3.4.6-sol8-sparc-local.gz
2. gunzip gcc-3.4.6-sol8-sparc-local.gz
3. pkgadd -d gunzip gcc-3.4.6-sol8-sparc-local
4. 手工设置root环境变量,添加PATH 、LD_LIBRARY_PAT
export PATH=$PATH: /usr/local/bin
export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH: /usr/local/lib
完毕后发现gcc -v报错:ld.so.1: gcc: fatal: libintl.so.3: open failed: No such file or directory,那么要安装libintl库
3 安装libintl库
1. 从www.sunfreeware.com下载libintl-3.4.0-sol8-sparc-local.gz
2. gunzip libintl-3.4.0-sol8-sparc-local.gz
3. pkgadd -d libintl-3.4.0-sol8-sparc-local
完毕后发现gcc -v报错:ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory,那么要安装libiconv库
在solaris系统中,tar命令中排除指定目录和文件的参数与linux中tar命令不同。
在solaris 10中,可以这么用。
比如:我想打开目录/sybase到/tmp/sybase.tar,排除目录/sybase下的两个文件:EBF17156.tar和
cd /sybase
echo /sybase/EBF17156.tar > excludefile
echo /sybase/ase1503_solsparc64_2.tar >> excludefile
tar cvfX /tmp/sybase.tar excludefile /sybase
AIX下mount一个iso文件的步骤:
mklv -y cdaix -s n -L /dev/cdaix rootvg 384M hdisk0
dd if=/sybase/sybaseAIX64BIT.iso of=/dev/cdaix bs=10m
mkdir /mnt/cdaix
mount -v cdrfs -o ro /dev/cdaix /mnt/cdaix
完成,加载点/mnt/aix内即为iso的内容。
Solaris下mount一个iso文件的步骤:
lofiadm (显示已用的设备名)
lofiadm -a /db/sybdata/rs1520solx64zhja.ISO /dev/lofi/2
lofiadm /dev/lofi/2 (查看刚才创建的附属的块设备)
mount -F hsfs -o ro /dev/lofi/2 /mnt (用mount命令mount映像文件)
完成,加载点/mnt内即为iso的内容。
Linux下mount一个iso文件的步骤:
mount -t iso9660 -o loop ./wary-5.1.4.iso /mnt/remove/
————————————————————————————————-
—- 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
—- 转载务必注明原始出处 : http://www.dbainfo.net
—- 关键字: aix solaris mount iso mklv dd lofiadm
————————————————————————————————-
此篇为对以前的问题的整理。
在solaris 10 64-bit上安装Sybase15.0.3 ESD#1,程序安装好了后用资源文件 resource-files来创建服务 。但是老是报不能创建共享内存 的错误。
Solaris环境为:
Sun OS 5.10 Generic_127111-11 sun4v sparc SUNW,SPARC-Enterprise-T5120
16G内存,64核CPU
共享内存已经配置为如下,故没有调整。
root@SERVER # more /etc/system | grep shm
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set shmsys:shminfo_shmmax=4294967295
* exclude: sys/shmsys
set shmsys:shminfo_shmmax=10294967295
set shmsys:shminfo_shmmin=1
* set shmsys:shminfo_shmmni=100
* set shmsys:shminfo_shmseg=10
* set shmsys:shminfo_shmmax = 268435456
* set shmsys:shminfo_shmseg = 1024
* set shmsys:shminfo_shmmni = 1024
set shmsys:shminfo_shmmni = 4096
其中曾经重启过一次服务器 。
但是用资源文件创建服务时,srvbuildres -I /app/sybase/interfaces -r /app/sybase/srvbuild-adaptiveserver.res
一直下面的报错。
-bash-3.00$ more srvbuild0111.017
Mon Jan 11 22:55:57 2010: srvbuild/15.0.3 ESD #1/P/Sun_svr4/SunOS 5.8/EBF 16556/OPT/Mon Ma
r 9 02:14:53 PDT 2009
Mon Jan 11 22:55:57 2010: Getting attribute values from sybinit resource file `/app/sybase
/srvbuild.adaptive_server.rs'.
Mon Jan 11 22:55:57 2010:
Mon Jan 11 22:55:57 2010:
Mon Jan 11 22:55:57 2010:
Mon Jan 11 22:55:57 2010:
type = 1
application_type = MIXED
server_page_size = 4k
master_device_physical_name = /app/sybdata/master.dat
master_device_size = 200
master_database_size = 160
sybsystemprocs_device_physical_name = /app/sybdata/rsystemprocs.dat
sybsystemprocs_device_size = 200
sybsystemprocs_database_size = 200
errorlog = /app/sybase/ASE-15_0/install/SYBASE.log
configfile = /app/sybase/ASE-15_0/SYB_XXXX_TEST.cfg
sybsystemdb_device_physical_name = /app/sybdata/rsystemdb.dat
sybsystemdb_device_size = 20
sybsystemdb_database_size = 20
tempdb_device_physical_name = /app/sybdata/tempdbdev.dat
tempdb_device_size = 100
tempdb_database_size = 100
shmem = /app/sybase/ASE-15_0
default_backup_server = SYB_XXXX_TEST_BS
ifiledir = /app/sybase
addl_cmdline_parameters =
do_configure_pci = no
sybpcidb_device_physical_name = PUT_THE_PATH_OF_YOUR_SYBPCIDB_DATA_DEVICE_HERE
sybpcidb_device_size = 48
sybpcidb_database_size = 48
server_name = SYB_XXXX_TEST
force_buildmaster = no
do_optimize_config = no
Mon Jan 11 22:55:57 2010: (Shell command) /app/sybase/ASE-15_0/bin/dataserver -d/app/sybda
ta/master.dat -b200M -z4k -sSYB_XXXX_TEST -e/app/sybase/ASE-15_0/install/SYBASE.log -T1623
> /tmp/sbAAAjCaGrf 2>&1
dataserver: master device size for this server: 200.0 Mb
dataserver: master database size for this server: 26.0 Mb
dataserver: model database size for this server: 6.0 Mb
00:00000:00000:2010/01/11 22:55:57.87 kernel SySAM: Using licenses from: /app/sybase/SYSA
M-2_0/licenses
00:00000:00000:2010/01/11 22:55:57.96 kernel SySAM: Checked out license for 1 ASE_CORE (2
009.1231/permanent/19B3 47BC 0B7E 8DC3).
00:00000:00000:2010/01/11 22:55:57.96 kernel This product is licensed to: ASE Developer E
dition - For Development and Test use only
00:00000:00000:2010/01/11 22:55:57.96 kernel Checked out license ASE_CORE
00:00000:00000:2010/01/11 22:55:57.96 kernel Adaptive Server Enterprise (Developer Editio
n)
00:00000:00000:2010/01/11 22:55:57.97 kernel Initializing device /app/sybdata/master.dat
from offset 0 with zeros.
00:00000:00000:2010/01/11 22:56:00.46 kernel Finished initialization.
00:00000:00000:2010/01/11 22:56:00.47 kernel Using config area from primary master device
.
00:00000:00000:2010/01/11 22:56:00.47 server Configuration Error: Configuration file, '/a
pp/sybase/SYB_XXXX_TEST.cfg', does not exist.
00:00000:00000:2010/01/11 22:56:00.66 kernel Warning: A configuration file was not specif
ied and the default file '/app/sybase/SYB_XXXX_TEST.cfg' does not exist. ASE creates the d
efault file with the default configuration.
00:00000:00000:2010/01/11 22:56:00.68 kernel Warning: Using default file '/app/sybase/SYB
_XXXX_TEST.cfg' since a configuration file was not specified. Specify a configuration file
name in the RUNSERVER file to avoid this message.
00:00000:00000:2010/01/11 22:56:00.69 kernel os_create_region: can't allocate 70795264 by
tes
00:00000:00000:2010/01/11 22:56:00.69 kernel kbcreate: couldn't create kernel region.
00:00000:00000:2010/01/11 22:56:00.69 kernel kistartup: could not create shared memory
Mon Jan 11 22:56:00 2010: Buildmaster return code: 0.
sybdata/master.dat -e/app/sybase/ASE-15_0/install/SYBASE.log -c/app/sybase/ASE-15_0/SYB_XXXX_TEST.cfg -M/app/sybase/ASE-15_0 -i/app/sybase -sSYB_XXXX_TEST -T1623 > /dev/null 2>&1
-bash-3.00$
是共享内存的问题吗?我不是已经按照安装文档上的说明修改了solaris的共享内存了吗?
后来,经过咨询solaris工程师,原来是solaris10和以前的solaris9在共享内存上有些不同。solaris10修改了共享内存方式,针对用户级别可以设置用户所能共享的内存段。
为sybase用户在项目数据库中添加一条记录,命令如下:
projadd -U sybase -p 1233 -c "sybase parameters" user.sybase
projmod -sK "project.max-shm-memory=(priv,6G,deny)" user.sybase
projmod -sK "project.max-sem-ids=(priv,100,deny)" user.sybase
projmod -sK "process.max-sem-nsems =(priv,256,deny)" user.sybase
另外,可以查看文件/etc/project来检查上面的配置是否生效。
修改完之后,再次执行srvbuildres命令创建sybase主服务,成功!
————————————————————————————————-
—- 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
—- 转载务必注明原始出处 : http://www.dbainfo.net
—- 关键字:ASE solaris 10 shared memory projadd 共享内存 couldn't create kernel region
————————————————————————————————-
如何查看solaris操作系统的版本号
我知道的有下面的三种方法,showrev、uname和查看/etc/release。
(1)命令showrev
show machine, software revision, and patch revision information
(2)命令uname
print name of current system.参数 -a :Prints basic information currently available from the system.
(3)查看/etc/release
演示如下:
bash-3.00$ showrev
Hostname: sunv890
Hostid: 84b7fe80
Release: 5.10
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.10 Generic_137111-08
bash-3.00$ uname -a
SunOS sunv890 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V890
bash-3.00$ cat /etc/release
Solaris 10 1/06 s10s_u1wos_19a SPARC
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 07 December 2005
bash-3.00$
由上可以看出该系统为Sun Sparc平台的5.10系统。
如何查看solaris系统是32位还是64位的?
使用isainfo -v命令
如果是运行在32位模式下, 则有如下输出:
32-bit sparc applications
如果是运行在64位模式下, 则有如下输出:
64-bit sparcv9 applications
32-bit sparc applications
注意:
从Solaris10开始支持AMD64和EM64(intel)处理器,即通常说的x64,同样能用上述命令来判断。Solaris10 的x86和x64 使用同一个安装包,即Solaris_x86_ga_u2_...。
bash-3.00$ isainfo -b -v
64-bit sparcv9 applications
vis2 vis popc
bash-3.00$
默认情况下.Solaris10安装完成后.启动是cde界面.但有时用xmanager登录时始终无法建立连接. 如果确认不是防火墙等方面的原因.可以用如下方法解决
1. 关闭默认的cde服务
svcadm disable cde-login
用ps-ef|grep dtlogin 应该看不到dtlogin进程了
2. 进入/etc/X11/gdm
编辑gdm.conf文件(也有可能是这两个文件/usr/share/gdm/defaults.conf 和/etc/X11/gdm/custom.conf) 编辑如下2个地方
找到[xdmcp]字段.
将Enable=flase改为true
将Port=177前的注释取消
然后保存退出.
3.ps-ef|grep gdm 确认目前没有gdm进程.如有杀之
4. 启动gdm服务
# svcs -a|grep gdm
disabled Aug_07 svc:/application/gdm2-login:default
# svcadm enable svc:/application/gdm2-login:default
然后在xmanager里建立新连接. 这样就可以登录了. 在登录界面的左上角选择cde.熟悉的cde界面就又回来了.
转载2 from: 彬彬有理 http://blog.chinaunix.net/u2/77786/showart_1161371.html -------------------------------------------------------------------------------------------------------------------------------------
root 101252 100995 0 15:09:01 ? 0:00 /usr/dt/bin/dtlogin -daemon -udpPort 0
root 101420 101419 0 15:13:47 pts/3 0:00 grep dtlogin
这里系统缺省监听udp port 0,就无法监听到177端口上的XDMCP请求
# /usr/dt/bin/dtlogin -daemon & 换daemon启动方式或者显式指定dtlogin -udpPort 177
svc:> select application/graphical-login/cde-login