版本:red hat的企业版本5、fedora12、ubuntu9.10、centOS5.4
现在记录的是centOS5.4系统环境。
1. pwd 查看当前路径;env 查看环境变量;su – (username) 切换用户(不加username默认切换到root用户); ./代表当前目录下
2. tar -zxvf ****.tar.gz 解压tar.gz文件;
3. tar -jxvf ****.tar.bz(或bz2) 解压tar.bz文件;
cd 进入文件夹命令;cd ..向上文件夹命令;
4. configure 检测源代码命令;make编译命令;make install安装命令;
5. chmod +x ******.bin(中间是字母x,小写)给文件加上可执行属性;*****.bin文件可直接执行。
6. xhost +是使所有用户都能访问Xserver
7. rpm -ivh --force --nodeps **.rpm为强制安装一个rpm文件。 yum upgrade 加应用程序名可进行升级。
8. /sbin/ifconfig查看本机ip
1. 无法使用命令 /usr/bin/xdpyinfo 自动检查显示器颜色。请检查是否设置了
解决办法:切换到su – root;然后执行xhost +;接着export DISPLAY=:0.0即可。调用时钟进行测试xclock
2. 找不到包的情况可到这个网站下载:http://www.rpmfind.net/linux资源文件网站
3. error while loading shared libraries: cannot restore segment prot after reloc: Permission denied
在linux上安装有些东西时会出现 Permission denied 的情况:
编辑/etc/selinux/config,找到这段:
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
编辑/etc/sysconfig/selinux,找到:
SELINUX=enforcing
如果SELINUX已经是 SELINUX=disabled,那么就不用改了,
否则就把SELINUX=enforcing 注释掉,新加一行:
SELINUX=disabled
保存,退出。
如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
哪应该是SELinux的问题,可以考虑把它关闭。
把SELinux关闭后还是不行.在你保证SElinux 被disable后.还执行下
chcon -t texrel_shlib_t
如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.)
以上两步.已经解决了很多server的问题了.
4. Oracle Error : SP2-0667 Message file facility.msb not found。Cause: The SP1, SP2, or CPY message file could not be found. SQL*Plus cannot run.
Action: Check the Oracle platform specific documentation to make sure SQL*Plus is installed correctly. This may occur because the ORACLE_HOME environment variable or registry equivalent is not set to the location of the Oracle software. Make sure this value is set correctly. Check that the SQL*Plus binary message files exist in the SQL*Plus message directory, for example $ORACLE_HOME/sqlplus/mesg. Check the value of NLS_LANG environment variable or registry equivalent is correct.
5.
If the oraInst.loc file does not exist, then create the Oracle Inventory group by entering the following command:
# /usr/sbin/groupadd oinstall
If the OSDBA group does not exist or if you require a new OSDBA group, then create it as follows. In the following procedure, use the group name dba unless a group with that name already exists:
# /usr/sbin/groupadd -g 502 dba
If you require a new OSOPER group (typically, oper), then create it as follows. In the following, use the group name oper unless a group with that name already exists:
# /usr/sbin/groupadd -g 505 oper
If the OSASM group does not exist or if you require a new OSASM group, then create it as follows. In the following procedure, use the group name asmadmin
unless a group with that name already exists:
# /usr/sbin/groupadd -g 504 asmadmin
If you require a new OSDBA group for Oracle grid infrastructure, then create it as follows. In the following procedure, use the group name asmdba
unless a group with that name already exists:
# /usr/sbin/groupadd -g 506 asmdba
If you require an OSOPER group, then create it as follows. In the following procedure, use the group name asmoper
unless a group with that name already exists:
# /usr/sbin/groupadd -g 507 asmoper
7. Creating an Oracle Software Owner User
If the Oracle software owner user does not exist, or if you require a new Oracle software owner user, such as oracle
or grid
, then create it as described in this section (in this case to create the oracle
user).
In the following procedure, use the user name oracle
unless a user with that name already exists:
To create an oracle
user, enter a command similar to the following:
# /usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba,[oper] oracle
In the preceding command:
The -u option specifies the user ID. Using this command flag is optional, as you can allow the system to provide you with an automatically generated user ID number. However, you must make note of the oracle
user ID number, as you require it later during preinstallation.
The -g
option specifies the primary group, which must be the Oracle Inventory group--for example, oinstall
The -G
option specifies the secondary groups, which must include the OSDBA group, and, if required, the OSOPER and ASMDBA groups. For example: dba
, or asmdba,oper
Set the password of the oracle
user:
# passwd oracle
Modifying an Existing Oracle Software Owner User
If the oracle
user exists, but its primary group is not oinstall
, or it is not a member of the appropriate OSDBA or OSOPER groups, then enter a command similar to the following to modify it. Specify the primary group using the -g
option and any required secondary group using the -G
option:
# /usr/sbin/usermod -g oinstall -G dba,asmdba[,oper] oracle
8. Checking Memory and Swap Space
Oracle says that the system must have at least 512MB of RAM and 1GB of swap space or twice the size of RAM. And for systems with more than 2 GB of RAM, the swap space can be between one and two times the size of RAM. You might also want to check out Sizing Swap Space.
For test sake I tried to install an Oracle Database 10g (Type: General Purpose Database) on a little PC with 256MB of RAM and 1 GB of swap space. I was able to get a 10g database up and running on this little PC without a problem.
To check the size of physical memory, execute:
# grep MemTotal /proc/meminfo
To check the size of swap space, execute:
# grep SwapTotal /proc/meminfo
You also can add temporary swap space to your system by creating a temporary swap file instead of using a raw device. Here is the procedure:
# su - root
# dd if=/dev/zero of=tmpswap bs=1k count=900000
# chmod 600 tmpswap
# mkswap tmpswap
# swapon tmpswap
To disable the temporary swap space execute the following commands:
# su - root
# swapoff tmpswap
# rm tmpswap
9. Oracle Database Postinstallation Tasks
vi ~oracle/.bash_profile
echo $PATh
echo $ORACLE_PATH
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export ORACLE_OWNER=oracle
export DISPLAY=:0.0
source ~oracle/.bash_profile
xhost +
vi ~oracle/.bash_profile
ORACLE_HOME_LISTNER=$ORACLE_HOME
source ~oracle/.bash_profile
netmgr
dbca
sqlplus
dbstart
dbshut
startup
shutdown