SELinux configuration on RHEL 5

合集下载

自已redhat5安装oracle的整个过程

自已redhat5安装oracle的整个过程

自已redhat5安装oracle的整个过程一.安装jdk1.我使用的是jdk-1.6.0_23-linux-i586.rpm.bin下载后的BIN文件可以直接执行2.使用root用户,执行以下几步# chmod 755 jdk-1.6.0_23-linux-i586.rpm.bin# ./ jdk-1.6.0_23-linux-i586.rpm.bin此步完成后,会生成jdk-1.6.0_23-linux-i586.rpm的文件默认安装到了/usr/java/jdk1.6.0_233.设置环境变量vi /etc/profile在文件中增加如下内容:JAVA_HOME=/usr/java/jdk1.6.0_23JRE_HOME=/usr/java/jdk1.6.0_23/jrePATH=$PATH:$JAVA_HOME/bin:JRE_HOME/binCLASSPATH=.:$JAVA_HOME/lib/jt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexport JAVA_HOME JRE_HOME PATH CLASSPATH按Esc,然后:wq保存退出4.使环境变量生效Source /etc/profile此时可以查看jdk的环境配置echo $JAVA_HOME(会显示JDK所在目录)二.安装oracle1.检查安装包(当前用户是root)rpm -q gcc make binutils openmotif setarch compat-db compat-gcccompat-gcc-c++compat-libstdc++ compat-libstdc++-devel libXp使用此命令可以查看这些rpm包是否安装,由于缺失的包之间有严格的依赖关系,所以必须按照如下顺序安装缺失的包:rpm -Uvh compat-db-4*rpm -Uvh libaio-0*rpm -Uvh compat-libstdc++-33-3*rpm -Uvh glibc-headers-2.5-12.i386.rpmrpm -Uvh glibc-devel-2.5-12.i386.rpmrpm -Uvh compat-gcc-34-3*rpm -Uvh compat-gcc-34-c++-3*rpm -Uvh libXp-1*rpm -Uvh openmotif-2*rpm -Uvh gcc-4*rpm -Uvh glibc-2.5-12.i686.rpmrpm -Uvh libgomp-4.1.1-52.el5.i386.rpmrpm -Uvh gcc-4.1.1-52.el5.i386.rpm其中U是升级的意思update。

RHEL 5 安装手册

RHEL 5 安装手册
图8.1正在分区
图8.2添加/boot分区
图8.3添加swap分区
图8.4添加/分区
图8.5最终分区情况
第九步引导装载程序配置
该界面如图9所示,若硬盘上还装有其他系统,在“标签”下,还会出现“Other”行。通过选择其前面的复选框,来设置引导装载程序引导至哪个系统,此处默认为“Red Hat Enterprise Linux Server”;若想设置引导装载程序口令,则可选其前面的复选框之后,按照相关提示进行设置,此处我们按照默认,不选。单击“下一步(N)”。
图16.8设置软件更新
⑧创建用户
到这步时,系统会要求您添加一个普通用户账号,请您按照提示,填写相关信息,口令长度不少于六位。单击“前进(F)”。如图16.9所示。
图16.9系统用户
⑨声卡
该界面如图16.10所示,您可以按照上面给出的提示,进行测试。此处我们不做任何操作,单击“前进(F)”。
图16.10声卡
图14.2更换第2张光盘
第十五步祝贺您
该界面如图15所示,单击“重新引导(t)”。此时系统将会重新启动,请您耐心等待。
图15祝贺您
第十六步系统的基本配置
系统重启后,会出现如图16.1所示界面。
图16.1系统启动中
①欢迎界面
该界面如图16.2所示的界面,单击“前进(F)”。
图16.2欢迎
②许可协议
该界面如图16.3所示,选“是,我同意这个许可协议(Y)”,单击“前进(F)”。
⑩附加光盘
该界面如图16.11所示,您可以通过点击“安装”按钮来安装其他额外的软件,此处不做任何操作,单击“(F)结束”。到此就意味着您已经成功地完成了“Red Hat Enterprise Linux 5”的安装。

Redhat 5下Oracle10g的安装 超详细

Redhat 5下Oracle10g的安装 超详细

Redhat 5下Oracle10g的安装1、安装oracle时候的基本要求1.1、操作系统的选择1.2、硬件要求Oracle Database官方指定内存最少为512M,若没有达到在安装的时候会出现各种警告,建议为1024M,硬盘大小为40G1.2、操作系统磁盘空间要求/boot分区:为150M/home分区:10GSwap交换分区:2.5G(建议为内存的1.5倍或者为2G也可,看具体情况而定)/ 根分区:20G/tmp临时分区:400M左右Oracle软件需要1.5GDatabase需要1.5G2、安装前期工作2.1、关闭防火墙和Selinux2.1.1、防火墙1) 重启后生效开启:chkconfig iptables on关闭:chkconfig iptables off2) 即时生效,重启后失效开启:service iptables start关闭:service iptables stop2.1.2、SELinux1)方法一:[root@czjie ~]# vi /etc/selinux/config#设置:SELINUX=disabled,然后reboot重启系统2)方法二:图形界面下:在linux终端下运行system-config-securitylevel查看防火墙和Selinux是否关闭或者在终端下运行setup同样可以关闭防火墙和Selinux,注意关闭之后记得重新启动。

2.2、设置hosts文件及/etc/sysconfig/network[root@czjie ~]# vi /etc/hosts#输入以下内容192.168.1.106 czjie[root@czjie ~]# vi /etc/sysconfig/network#将HOSTNAME修改成HOSTNAME=czjie2.3、检查必要的软件包是否安装1)检查是否安装下列软件包:[root@czjie ~]# cd /media/Enterprise\ Linux\ dvd\ 20090908/Server/[root@czjie Server]#rpm -Uvh make-3.81-3.el5.i386.rpmrpm -Uvh gcc-4.1.2-46.el5.i386.rpmrpm -Uvh glibc-2.5-42.i386.rpmrpm -Uvh compat-db-4.2.52-5.1.i386.rpmrpm -Uvh compat-gcc-34-3.4.6-4.i386.rpmrpm -Uvh compat-gcc-34-c++-3.4.6-4.i386.rpmrpm -Uvh compat-libstdc++-296-2.96-138.i386.rpmrpm -Uvh compat-libstdc++-33-3.2.3-61.i386.rpmrpm -Uvh libXpm-3.5.5-3.i386.rpmrpm -Uvh libXp-1.0.0-8.1.el5.i386.rpmrpm -Uvh openmotif22-2.2.3-18.i386.rpmrpm -Uvh setarch-2.0-1.1.i386.rpm2)检查方法:[root@czjie Server]# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel libXp #列表中还是会显示有些没有安装,可以跳过,具体原因未解gcc-4.1.2-46.el5make-3.81-3.el5binutils-2.17.50.0.6-12.el5package openmotif is not installedsetarch-2.0-1.1compat-db-4.2.52-5.1package compat-gcc is not installedpackage compat-gcc-c++ is not installedpackage compat-libstdc++ is not installedpackage compat-libstdc++-devel is not installedpackage libXp is not installed2.4、配置文件的修改(/etc/sysctl.conf)[root@czjie ~]# vi /etc/sysctl.conf#添加以下几行:#kernel.shmall = 2097152#kernel.shmmax = 2147483648kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128#fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core.wmen_max=2621442.5、执行下面语句让配置生效[root@czjie ~]# /sbin/sysctl –p2.6、编辑/etc/security/limits.conf文件[root@czjie ~]# vi /etc/security/limits.conf#编辑/etc/security/limits.conf文件并同时添加以下几行:* soft nproc 2047* hard nproc 16384* soft nofile 1024* hard nofile 655362.7、编辑/etc/pam.d/login文件1)编辑/etc/pam.d/login文件[root@czjie ~]# vi /etc/pam.d/login#添加以下几行:session required /lib/security/pam_limits.so2.8、创建安装Oracle的用户、组以及配置和安装目录[root@czjie ~]# groupadd oinstall[root@czjie ~]# groupadd dba[root@czjie ~]# useradd -d /home/oracle -g oinstall -G dba oracle[root@czjie ~]# passwd oracleChanging password for user oracle.New UNIX password:BAD PASSWORD: it does not contain enough DIFFERENT charactersRetype new UNIX password:passwd: all authentication tokens updated successfully.2.9创建Oracle安装目录[root@czjie ~]# mkdir /opt/ora10g[root@czjie ~]# chown oracle.oinstall /opt/ora10g2.10、设置Oracle用户的.bash_profile文件此处由于开始创建了安装目录在安装oracle的进程中需要更改安装目录,因此导致ORACLE_HOME 的文件不存在了,因此,此处要设置oracle的sid 和home ,base 文件。

Red Hat Enterprise Linux 5(32Bit64Bit)安装Oracle(10g11g)

Red Hat Enterprise Linux 5(32Bit64Bit)安装Oracle(10g11g)

Red Hat Enterprise Linux 5(32Bit/64Bit)安装Oracle(10g/11g)一、安装系统首先安装Linux系统,根据Oracle官方文档的建议,在机器内存小于1G的情况下,swap分区大小应该设置为内存的2倍大,若内存大于2G则swap分区设置为与内存大小一样。

其实Linux系统的swap分区大小设置是很有讲究的,如果哪位读者有兴趣,可以参考我的另外一篇文章——《如何合理设置Linux系统的swap分区大小》。

在系统安装的过程中,一定选择安装所有开发包,建议不要安装SELinux或者安装后在系统中禁止SELinux运行,否则会出现一些莫名其妙的问题。

为防止Oracle安装过程中出现乱码,建议使用英文作为系统语言,进行Oracle的安装工作二、安装Oracle前的系统准备工作1.检查需要的软件包可以使用rpm -qa|grep 软件包关键词命令进行检测,一般情况下会需要手动安装如下的软件包:From RedHat AS5 Disk 1(32 Bit)# rpm -Uvh setarch-2*# rpm -Uvh make-3*# rpm -Uvh glibc-2*# rpm -Uvh libaio-0*From RedHat AS5 Disk 2(32 Bit)# rpm -Uvh compat-libstdc -33-3*# rpm -Uvh compat-gcc-34-3*# rpm -Uvh compat-gcc-34-c -3*# rpm -Uvh gcc-4*# rpm -Uvh libXp-1*From RedHat AS5 Disk 3(32 Bit)# rpm -Uvh openmotif-2*# rpm -Uvh compat-db-4*如果使用DVD安装介质的话,会很方便。

2.修改Linux发行版本信息由于Oracle 10g发行的时候,RedHat Enterprise Linux 5没有发行,所以Oracle 10g并没有对RedHat Enterprise Linux 5确认支持,我们有两种方法可以让Oracle 10g支持RedHat Enterprise Linux 5。

SAMBA—SWAT的设置和使用

SAMBA—SWAT的设置和使用

1. swat介绍SWAT:The Samba WEB Administration ToolSWAT是Samba的图形化管理工具。

我们可以通过浏览器利用swat工具来设置samba。

在swat中每一个samba参数都有相应的帮助文件或解释文件,很适合初学者。

SWAT工具嵌套在xinetd超级守护进程中,要通过启用xinetd进程来启用swat。

因此要先安装xinetd工具包,然后安装swat工具包。

2. 安装xinetd如图一,查看系统是否安装了xinetd工具包。

图一:查看系统是否安装了xinetd如果未安装,挂载系统盘安装即可。

[root@RHEL5 /]#mount /dev/cdrom /mnt/cdrom[root@RHEL5 /]#rpm –ivh /mnt/cdrom/Servers/xinetd-2.3.14- 10.el5.i386.rpm3. 安装swat如图二,查看系统是否安装了swat工具包。

图二:查看系统是否安装了swat如果未安装,挂载系统盘安装即可。

[root@RHEL5 /]#rpm –ivh /mnt/cdrom/Servers/samba-swat-3.0.28-0.el5.8.i386.rpm4. 编辑swat配置文件因为swat是xinetd超级守护进程的一个子进程,所以swat工具配置文件在xinetd目录中。

我们要设置swat配置文件,开启此子进程,以便在启用xinetd进程是来启用swat。

swat配置文件在/etc/xinetd.d目录中。

如图三,在xinetd.d目录中查看swat文件。

图三:swat配置文件在xinetd.d目录下如图四:编辑swat配置文件。

①将“only_from=127.0.0.1”改成“only_from=0.0.0.0”,这样该服务器就可以监听所有的来访IP。

②将“disable=yes”改成“disable=no”,这样swat子进程就可以随xinetd超级守护进程一起启动了。

2016年RHEL7 :RHCE试题答案整理

2016年RHEL7 :RHCE试题答案整理

RHCE考试:1.Selinux两台服务器上配置~]# vim /etc/selinux/configSELINUX=disabledSELINUXTYPE=targeted~]#reboot2.ssh登录控制~]#vim /ect/hosts.allowsshd:172.25.0.~]#vim /ect/hosts.denysshd:172.24.0.3.命令别名~]#vim /etc/bashrcalias qstat=' '重读环境变量、验证~]# source /etc/bashrc 或~]# . /PATH/FROM/CONF_FILE ~]# alias~]#qstat4.防火墙规则,配置端口转发图形化界面操作。

~]# firewall-config & 在图形化下配置选择模式:Configuration Permanent永久模式Zone:public 适用区域Port Forwarding端口转发--> Add~]# firewall-cmd --list-all public 验证5.链路聚合图形化界面配置:~]#nm-conection-editor &~]#lab teambridge setupman teamd----》{"runner\":{\"name\":\"activebackup\"}}~]#systemctl restart network~]#ip addr show team0~]#teamdctl team0 state6.配置IPv6地址图形配置~]# nm-connection-editor & 图形配置~]# systemctl restart network~]# ip addr show eth0~]# ping #测试7.本地邮件服务~]#yum install -y postfix~]#vim /etc/postfix/main.cfinit_interfaces=loopback-onlymyorigin = #从该系统上发送的邮件都显示来自relayhost = [] # 转发发到mydestination= # 本地不接受外来邮件local_transport=err:local delivery disabled~]# systemctl restart postfix~]# systemctl enable postfix8.Samba共享目录Server:~]# yum install samba samba-client -y~]# mkdir /common~]# chcon -R -t samba_share_t /common #修改安全上下文,此处的SElinux是打开的,在配置文件中也有此命令~]# vim /etc/samba/smb.confworkgroup = STAFF # 此处是修改[common] # 此处开始是添加内容comment=commonpath = /commonhosts allow = 172.25.0.browseable = yes~]# smbpasswd -a andy~]# testparm # 查看配置有无问题~]# systemctl restart smb nmb~]# systemctl enable smb nmb~]# firewall-cmd --add-service=samba --permanent~]# firewall-cmd --reloadClient:~]# yum install samba-client cifs-utils -y~]# smbclient -L //172.25.0.11 -U andy # 测试能否连接~]# smbclient //172.25.0.11/common -U andy # 测试能否连接共享目录~]# 第三步测试:能够下载不能上传挂载可以做看题目要求:~]#mkdir /mnt/common~]#vim /etc/fstab//172.25.0.11/common /mnt/common cifs defaults,username=k1,password=RedH at,sec=ntlmssp 0 0~]#mount -a~]#df -hT9.多用户SMB挂载~]# mkdir /share~]# chmod o+w /share~]# chcon -R -t samba_share_t /share~]# useradd k1~]# useradd c1~]# smbpasswd -a k1~]# smbpasswd -a c1~]# vim /etc/samba/smb.conf[share]comment=sharepath = /sharehosts allow = 172.25.0.browseable = yeswritable = nowrite list = c1~]# systemctl restart smb nmbClient端测试:~]#vim /etc/fstab//172.25.0.11/share /mnt/dev cifs defaults,multiuser,username=k1,password=red hat,sec=ntlmssp 0 0~]#mount -a~]#df -h~]# useradd c1~]# su - c1~]#cd /mnt/dev~]#c i f s c r e d s a d d172.25.0.11-u c1#临时提升权限10.NFS服务Server:~]# mkdir /public~]# mkdir /pretected~]# chcon -R -t public_content_t /public~]# chcon -R -t public_content_t /pretected/~]# vim /etc/exports/public 172.25.0.0/24(ro,sync)/pretected 172.25.0.0/24(rw,sec=krb5p,sync)~]# wget -O /etc/krb5.keytab /pub/keytabs/server0.keytab~]# useradd k2~]# chown k2 /pretected/project/~]# systemctl restart nfs-secure-server~]# systemctl enable nfs-server.service~]# systemctl restart nfs~]# firewall-cmd --add-service=nfs --permanent~]# firewall-cmd --reload~]# firewall-cmd --add-service=rpc-bind --permanent # 挂载相关的放行~]# firewall-cmd --reload~]# firewall-cmd --permanent --add-service=mountd # 挂载相关的放行~]# firewall-cmd --reload~]# vim /etc/sysconfig/nfs # 为支持krb5验证RPCNFSDARGS='-V 4.2'11.挂载NFS共享Client:~]# wget -O /etc/krb5.keytab /pub/keytabs/desktop0.keytab ~]# systemctl restart nfs-secure~]# systemctl enable nfs-secure~]# mkdir /mnt/nfssecure~]# vim /etc/fstab172.25.0.11:/public /mnt/nfsmount nfs defaules 0 0172.25.0.11:/pretected /mnt/nfssecure nfs defaults,sec=krb5p,v4.2 0 0 ~]# mount -a12.配置Web站点~]# yum groupinstall -y web*~]#cd /var/www/html~]#wget http://~]#mv~]# systemctl start httpd~]# systemctl enable httpd~]#firewall-cmd --add-service=http -permanent~]#firewall-cmd --reload~]# systemctl restart httpd~]#firewall-config &~]# curl 13.配置安全web服务~]# yum install mod_ssl~]# cd /etc/httpd/conf.d~]# wget /pub/tls/certs/www0.crt~]# wget /pub/tls/private/www0.key ~]# wget /pub/example-ca.crt~]# vim ssl.confDocumentRoot "/var/www/html"ServerName :443SSLCertificateFile /etc/httpd/conf.d/www0.crtSSLCertificateKeyFile /etc/httpd/conf.d/www0.keySSLCertificateChainFile /etc/httpd/conf.d/example-ca.crt ~]# systemctl restart httpd~]# firewall-cmd --add-service=https --permanent~]# firewall-cmd --reload14.配置虚拟主机~]# vim vhost.conf<VirtualHost *:80>ServerName DocumentRoot /var/www/virtual</VirtualHost><Directory "/var/www/virtual">AllowOverride NoneRequire all granted</Directory><VirtualHost *:80>ServerName DocumentRoot /var/www/html</VirtualHost>~]# systemctl restart httpd~]#mkdir /var/www/virtual~]#chmod o+w /var/www/virtual15.配置Web内容服务~]# mkdir /var/www/html/private~]# echo "15 " > /var/www/html/private/index.html~]# mkdir /var/www/virtual~]# echo "14" > /var/www/virtual/index.html~]# vim vhost.conf<VirtualHost *:80>ServerName DocumentRoot /var/www/virtual</VirtualHost><Directory "/var/www/virtual">AllowOverride NoneRequire all granted</Directory><VirtualHost _default_:80>ServerName DocumentRoot /var/www/html<Directory "/var/www/html">AllowOverride NoneRequire all granted</Directory></VirtualHost><Directory "/var/www/html/private">AllowOverride NoneRequire all deniedRequirelocal</Directory>~]# systemctl restart httpd~]# curl /private/index.html ~]# curl /private/index.html16.实现动态Web内容~]# yum install mod_wsgi -y~]# vim /etc/httpd/conf/httpd.confListen 8909~]# semanage port -a -t http_port_t -p tcp 8909~]# systemctl restart httpd~]# echo "16" > /var/www/html/webinfo.wsgi~]#vim vhost.conf<VirtualHost *:8909>ServerName DocumentRoot /var/www/html<Directory "/var/www/html">AllowOverride NoneRequire all granted</Directory>WSGIScriptAlias / /var/www/html/webinfo.wsgi </VirtualHost>~]# systemctl restart httpd~]# firewall-config-edit &图形化放行~]#firewall-cmd --reload17.case脚本~]#vim /etc/boot/foo/sh#!/bin/bashcase $1 inFedora)echo "RedHat";;redhat)echo "fedora";;*)echo "/root/foo.sh redhat|fedora"esac~]# chmod +x /root/foo.sh18.添加用户脚本~]#vim /root/batchusers.sh#!/bin/bashif [$# -eq 0 ];thenecho "Usage:/root/batchusers"exit 1fiif [! -f $1];thenecho "input file not found"exit 1fifor i in $(cat $1);douseradd -s /bin/false $i;done~]# chmod +x /root/batchusers.sh19.ISCSI服务~]# fdisk -l /dev/vda~]#yum install -y targetcli~]#targetcli/> ls/> cd backstores//> cd block/> create disk1 /dev/vda1/> cd ../> cd ../> cd iscsi/> create .example:server0/> cd .wxample:server0/tpg1//> ls/> luns/ create /backstores/block/disk1/> acls/ create .example:desktop0/> portals/ create 172.25.0.11/> exit~]#fire-cmd --add-port=3260/tcp --permanent~]#fire-cmd --reload~]#systemctl enaable target~]#systemctl start targe20.配置ISCSI服务客户端~]# yum install iscsi* -y~]#vim /ettc/iscsi/initiatorname.iscsiInitiatorName=.example:desktop0~]#iscsiadm -t st -m discovery -p 172.25.0.11~]#iscsiadm -m node -T .example:server0 -p 172.25.0.11 -l ~]#fdisk -l~]# fdisk /dev/sdc 分区~]# mkfs.ext4 /dev/sd...~]# mkdir /mnt/data~]# vim /etc/fstabUUID= /mnt/data ext4 defaults,_netdev 0 0~]# mount -a21.配置数据库~]# yum groupinstall "mariadb*" -y~]# systemctl start mariadb~]# systemctl enable mariadb~]# mysql_secure_installation~]# mysql -u root -pMariaDB > CREATE DATABASE Contacts;MariaDB > quit~]# mysql -u root -p Contacts < /root/users.mdb22.查询数据库~]# mysql -u root -pMariaDB >use Contacts;MariaDB >show tables;MariaDB >create user r1@localhost identified by 'redhat';MariaDB >grant select on Contacts.* to r1@localhost;MariaDB >flush privileges;MariaDB >select * from pass inner join name where name.aid=pass.bid;MariaDB >select * from pass inner join name on name.aid=pass.bid wherepassword ='tangerine';MariaDB >select * from name inner join loc on name.aid=loc.cid wherefirstname='J ohn' and loction='guangzhou';。

REDHAT5配置教程

REDHAT5配置教程

生活其实很精彩~~本文版权保留,任何人不得利用本文获取利益!!!
hanbim520@,欢迎交流,交流才能进步!!
[root@localhost etc]# cd .. [root@localhost chroot]# cd var/named/ [root@localhost named]# ls data localhost.zone named.ca named.local slaves localdomain.zone named.broadcast named.ip6.local named.zero [root@localhost named]# cp -p named.zero .zone [root@localhost named]# cp -p named.local 192.168.1.local //切记如果不加-p 要在配置后改属性 [root@localhost named]# ll total 88 -rw-r----- 1 root named 426 Jul 29 2009 192.168.1.local -rw-r----- 1 root named 427 Jul 29 2009 .zone drwxrwx--- 2 named named 4096 Aug 25 2004 data -rw-r----- 1 root named 198 Jul 29 2009 localdomain.zone -rw-r----- 1 root named 195 Jul 29 2009 localhost.zone -rw-r----- 1 root named 427 Jul 29 2009 named.broadcast -rw-r----- 1 root named 1892 Jul 29 2009 named.ca -rw-r----- 1 root named 424 Jul 29 2009 named.ip6.local -rw-r----- 1 root named 426 Jul 29 2009 named.local -rw-r----- 1 root named 427 Jul 29 2009 named.zero drwxrwx--- 2 named named 4096 Jul 27 2004 slaves .zone 配置内容如下: $TTL @ 86400 IN SOA . . ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS . www IN A 192.168.1.10 ftp IN A 192.168.1.10 192.168.1.1.local 配置内容如下: $TTL 86400 @ IN SOA . . ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS . 10 IN PTR . 10 IN PTR . [root@localhost /]# vi /etc/resolv.conf

数据库Oracle10g服务器在Linux RedHat EnterPrise5上安装

数据库Oracle10g服务器在Linux RedHat EnterPrise5上安装

数据库Oracle10.2.0.1在Linux RadHat Enterprise5下的安装文档目录1 前言: --------------------------------------------------------------------------------------------------------- 31.1 安装Oracle的环境-------------------------------------------------------------------------------- 32 安装前的准备配置------------------------------------------------------------------------------------------ 32.1 查询所需安装包是否完整----------------------------------------------------------------------- 32.2 检查安装Oracle的硬件要求 ------------------------------------------------------------------- 42.3 OS参数要求vi /etc/sysctl.conf , 在行末添加以下内容---------------------------------- 42.4 vi /etc/security/limits.conf 行末添加以下内容---------------------------------------------- 52.5 vi /etc/pam.d/login 行末添加以下内容 ------------------------------------------------------- 52.6 vi /etc/selinux/config 确保以下内容 ---------------------------------------------------------- 53 创建安装Oracle的用户、组及配置 ------------------------------------------------------------------- 53.1 解压10201_database_linux32.zip -------------------------------------------------------------- 53.2 创建安装Oracle的用户及所属组------------------------------------------------------------- 53.3 创建安装目录mkdir -p /opt/oracle ------------------------------------------------------------- 63.4 设置oracle用户的.bash_profile ---------------------------------------------------------------- 63.5 设置主机名和ip ----------------------------------------------------------------------------------- 73.6 设置Oracle10g支持RHEL5的参数 --------------------------------------------------------- 74 安装Oracle --------------------------------------------------------------------------------------------------- 84.1 用oracle用户运行runInstaller文件 ---------------------------------------------------------- 85 测试Oracle是否安装成功------------------------------------------------------------------------------- 105.1 启动Oracle服务---------------------------------------------------------------------------------- 101前言:看过很多很多文档,有些文档格式难看,有些则是图形不够全面。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

SELinux configuration on RHEL 5作者: 传说中的v 日期: 2011 年02 月27 日发表评论(0) 查看评论This tip covers SELinux configuration on RHEL 5. RHEL provides both graphic user interface (GUI) and command line options to configure SELinux. To prove the simplicity of SELinux, this tip uses the RHEL GUI to enable SELinux.本文讲解的是RHEL 5上的SELinux配置。

RHEL同时提供了图形用户界面(GUI)和命令行两种方式配置SELinux。

为了表现SELinux的简单易用,本文使用RHEL的GUI来启用SELinux。

To enable SELinux from RHEL GUI, select system> Administration> Security Level and Firewall. Go to the SELinux Tab and set SELinux to "permissive mode." Then restart your server.要从RHEL的GUI启用SELinux,依次点击系统(system)>管理(Administration)>安全级别和防火墙(Security Level and Firewall)。

进入SELinux选项卡,将SELinux设置为―允许模式(permissivemode)‖。

然后重启服务器。

Starting with SELinux permissive mode on your server is a good best practice. In this mode, you can feel and touch SELinux with your server and applications/databases without affecting anything. You have to carefully watch audit log messages for a testing period, and check for any warnings or denial errors generated by your applications and databases during any kind of operations.以允许模式启动SELinux是(学习配置使用SELinux的)很好的实践。

在这种模式下,你可以近距离感受和接触SELinux,却不影响你的服务器和应用程序/数据库的任何东西。

测试期间,你必须仔细查看日志信息,检查所有的警告以及任何由程序和数据库在操作期间产生的拒绝错误。

After restarting my RHEL server in the permissive mode of SELinux, I found nothing different. I logged in through root user and checked the status of SELinux environment by using the sestatus command.设置SELinux为允许模式并重启我的RHEL后,我没有发现任何不同。

我以root账户登进系统,然后使用sestatus命令查看SELinux环境的运行状况。

Now that SELinux is enabled and operating in permissive mode, it is time to go to management of SELinux. Fortunately, RHEL has provided a GUI to perform SELinux policy management that can be initiated by root user invoking the system-config-SELinux command. This command will bring up the main interface that can be used on RHEL or Fedora Linux as shown below:既然SELinux已经启动并在允许模式下运行,那么是时候对SELinux进行管理了。

RHEL提供了一个GUI来进行SELinux的策略管理,root用户可以使用system-config-SELinux命令对这个GUI进行初始化。

该命令将打开GUI的主界面,在RHEL或Fedora Linux中你都可以看到如下的窗口:On the left pane of the above screen , you can find main selections for SELinux management. The second option "Boolean" contains Boolean conditions for SELinux management for most of the default services and processes. The same conditions can be listed by the getsebool command. If, for example, you want to know all existing Boolean conditions about ftpd deamon only, you can use the same command as follows:上图中,你可以在左边框中找到SELinux管理的主要选项。

第二个选项―Boolean‖包含了SELinux 管理中大部分默认服务和进程的布尔条件。

同样的条件也可以使用getsebool命令列出。

举个例子,如果你只想知道已有的关于ftpd守护进程的布尔条件,那么你可以使用如下的命令:To change a Boolean condition such as allow_ftpd_use_cifs=off, which means that FTP deamon can not use cifs protocol for public files transfer, we can click the condition in the Boolean tab of system-config-SELinux interface as shown below.This activity will simply allow FTP services to use cifs protocol for public file transfers. You can simply verify this change by executing getsebool and grep only for ftpd deamon.要改变布尔条件,如allow_ftpd_use_cifs=off——该条件意味着FTP进程不能使用cifs协议进行公共文件传输——我们可以在system-config-SELinux界面中单击―Boolean‖选项卡下对应的条件(条目),如下图所示。

此项操作将允许FTP服务使用cifs协议进行公共文件传输。

你可以针对ftpd进程执行getsebool和grep命令,确认刚才的操作是否生效。

Securing Web servers using SELinux security cotextsSuppose that we want to run a production Apache Web server on our Linux server. However, this server will be hosting some of our critical applications and will be exposed to the internet, we want to make sure that this Web server should be secured as much as it can be.使用SELinux的安全上下文(security contexts)保护Web服务器假设我们想要在我们的Linux服务器上运行Apache Web服务器程序。

因为这台服务器将运行我们的一些关键应用,并暴露在互联网上,所以我们想确保这台Web服务器受到尽可能多的保护。

If you start Web services and try to configure your Web server to execute some CGI script like hello.pl, without customizing any SELinux settings, errors will be logged into Linux system and SELinux audit logs. To see these errors in SELinux audit logs, execute sealert –b.This will open SELinux audit logs as shown below:如果你启动Web服务并尝试配置你的Web服务器允许执行某些CGI脚本,如hello.pl,那么不改变SELinux的配置的话,Linux系统日志和SELinux审计日志都会记录到错误。

要在SELinux 审计日志中查看这些错误,执行sealert –b。

这会打开SELinux审计日志,如下所示:Now the question is, why has this happened? Answer is simple, because hello.pl is a CGI executable and it should belong to httpd_sys_script_exec_tdomain rather than belonging to httpd_sys_content_t.现在的问题是,为什么会出现这种情况?答案很简单,因为hello.pl是一个CGI可执行程序,它应该被归为httpd_sys_script_exec_tdomain上下文,而不是httpd_sys_content_t。

相关文档
最新文档