GVKun编程网logo

CentOS 界面安装 Oracle 问题(centos上安装oracle)

1

在本文中,我们将带你了解CentOS界面安装Oracle问题在这篇文章中,我们将为您详细介绍CentOS界面安装Oracle问题的方方面面,并解答centos上安装oracle常见的疑惑,同时我们还将

在本文中,我们将带你了解CentOS 界面安装 Oracle 问题在这篇文章中,我们将为您详细介绍CentOS 界面安装 Oracle 问题的方方面面,并解答centos上安装oracle常见的疑惑,同时我们还将给您一些技巧,以帮助您实现更有效的CentOS 6 升级到 CentOS 7、CentOS 6, CentOS 7 安装mysql数据库、CentOS 6.9 yum 和源码安装 htop,适用于 centOS 7、Centos 7 和 Centos 6 开放查看端口 防火墙关闭打开

本文目录一览:

CentOS 界面安装 Oracle 问题(centos上安装oracle)

CentOS 界面安装 Oracle 问题(centos上安装oracle)

通过 VNC 远程 GNOME 进行安装 Oracle

环境

  • CentOs7
  • Oracle

本地镜像 Repo 搭建

按照教程配置前置步骤,在 Oracle 用户下执行 runInstaller

解决 DISPLAY 环境变量问题

root 下开启 xhost

oracle 用户下配置环境变量 DISPLAY=localhost:1.0

1.0表示的是xdpinfo的name

如果仍然有错误,则先 ps 查看是否有 oracle 的进程,杀死后再试

CentOS 6 升级到 CentOS 7

CentOS 6 升级到 CentOS 7

注意

非必要情况,请使用重新安装系统的方式升级,原因如下:

  1. 并非所有的系统都能顺利从 6 升级到 7,安装的软件越少,升级成功的可能性越大;
  2. 只支持 6.5 及以上系统升级到不高于 7.2 系统;
  3. 升级的耗时完全不比重新安装少,绝大多数情况下会耗费更长的时间和更多精力;
  4. 升级完成后处理各种依赖是一个非常头大的问题。

本人在同一天升级了两台电脑,一个成功一个失败。成功的那台电脑额外花了一天时间处理各种依赖和问题,失败的电脑半小时装好系统和必备软件,用得爽歪歪。所以如非必要,建议采用备份数据后直接重装系统的方式。

操作

通过软件方式从 6 升级到 7,请参考下面的步骤:

  1. 升级当前系统到最新版本:yum update -y

  2. 安装旧版 openscap: yum remove -y openscap && yum install -y http://dev.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm

  3. 添加 upgradetool 源:

    cat <<EOF >/etc/yum.repos.d/upgradetool.repo
    [upgrade]
    name=CentOS-$releasever - Upgrade Tool
    baseurl=http://dev.centos.org/centos/6/upg/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
    EOF
    
  4. 安装升级工具:yum install -y redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-contents

  5. 执行升级可行性分析:preupg -l,该命令会耗费几分钟到几十分钟时间。如果出现 preupg: error: [Errno 2] No such file or directory: ''/root/preupgrade/result.html'' 的错误,请参考第一步安装 openscap 的旧版;

  6. 使用清华大学的 centos-vault 源安装 7.2 版本:centos-upgrade-tool-cli --network 7 --instrepo=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.2.1511/os/x86_64/

    ** 注意:**7.2 是支持升级的最高版本,升级其他版本将会出现 Downloading failed: invalid data in .treeinfo: No section: ''checksums'' 的错误提示;

  7. 如果升级成功,用 reboot 命令重启系统;如果提示 The requested URL returned error: 404 Not Found 等错误,基本上说明当前系统不支持直接升级。果断采用重装系统的正道吧,少年!

  8. 系统重启后,有可能因为依赖库确实导致 ssh 无法启动,grep 不能正常使用等问题。基本功底够好的手动排查,然后一个个问题解决;搞不懂错误原因或者觉得处理麻烦的,备份数据后重装系统吧!

  9. 使用 rpm -qa | grep el6 查看系统上残留的软件包。如果能手动清理掉,让系统 update 无障碍,耐心一个个处理掉。如果觉得依赖太麻烦或者搞不定,备份数据后重装系统吧!

参考

  1. https://blog.51cto.com/moerjinrong/2340656

CentOS 6, CentOS 7 安装mysql数据库

CentOS 6, CentOS 7 安装mysql数据库

#!/bin/sh
# CentOs 6
#使用sohu镜像,速度快
wget http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-server-5.6.35-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-client-5.6.35-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-shared-5.6.35-1.el6.x86_64.rpm
#删除默认安装包
rpm -qa| grep mysql-libs | xargs rpm -e --nodeps
#安装依赖包
yum -y install numactl
rpm -ivh MySQL-shared-5.6.35-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.35-1.el6.x86_64.rpm 
rpm -ivh MySQL-server-5.6.35-1.el6.x86_64.rpm

#获取默认root密码
sqlpasswd=`cat /root/.mysql_secret | awk -F''): '' {''print $2''}`
echo "MySQL root passwd: $sqlpasswd"
#设置数据库服务端编码为utf8
echo character_set_server=utf8 >> /usr/my.cnf
#重启数据库
service mysql restart
#!/bin/sh
# CentOS 7
wget http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-server-5.6.35-1.el7.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-client-5.6.35-1.el7.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.6/MySQL-shared-5.6.35-1.el7.x86_64.rpm
rpm -ivh MySQL-shared-5.6.35-1.el7.x86_64.rpm
rpm -ivh MySQL-client-5.6.35-1.el7.x86_64.rpm 
rpm -ivh MySQL-server-5.6.35-1.el7.x86_64.rpm

#获取默认root密码
sqlpasswd=`cat /root/.mysql_secret | awk -F''): '' {''print $2''}`
echo "MySQL root passwd: $sqlpasswd"

#设置数据库服务端编码为utf8
echo character_set_server=utf8 >> /usr/my.cnf
SET PASSWORD FOR ''root''@''localhost''=PASSWORD(''newpass'');

 

CentOS 6.9 yum 和源码安装 htop,适用于 centOS 7

CentOS 6.9 yum 和源码安装 htop,适用于 centOS 7

CentOS6.9 安装 htop,也适用于 CentOS7。htop 官方网站:http://hisham.hm/htop/ 。

首先安装首先启用 epel repository。

[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y update
#安装htop
[root@localhost ~]# yum install htop

yum 安装 htop 完成。

也可以配置阿里云、清华大学等安装源。清华大学链接。

https://mirrors.tuna.tsinghua.edu.cn/help/epel/

源码安装 htop,首先安装 git。ncurses-devel 编译安装 htop 时需要。

[root@localhost ~]# yum -y install git ncurses-devel

htop GIT 源码下载地址。https://github.com/hishamhm/htop

git clone htop 代码。

[root@localhost ~]# git clone https://github.com/hishamhm/htop.git

切换到 htop 代码目录执行./configure; make; sudo make install 即可。

下图是 centOS6.9 安装完成软件运行截图。

Centos 7 和 Centos 6 开放查看端口 防火墙关闭打开

Centos 7 和 Centos 6 开放查看端口 防火墙关闭打开

Centos 7 和 Centos 6 开放查看端口 防火墙关闭打开 Centos 7 firewall 命令: 查看已经开放的端口:

firewall-cmd --list-ports

开启端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

命令含义:
–zone #作用域add-port=80/tcp #添加端口,格式为:端口/通讯协议
–permanent #永久生效,没有此参数重启后失效

重启防火墙

firewall-cmd --reload #重启firewall 
systemctl stop firewalld.service #停止firewall 
systemctl disable firewalld.service #禁止firewall开机启动 
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

CentOS 7 以下版本 iptables 命令 如要开放 80,22,8080 端口,输入以下命令即可

/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 
/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT 
/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

然后保存:

/etc/rc.d/init.d/iptables save

查看打开的端口:

/etc/init.d/iptables status
关闭防火墙 
1) 永久性生效,重启后不会复原

开启: chkconfig iptables on
关闭: chkconfig iptables off

2) 即时生效,重启后复原

开启: service iptables start
关闭: service iptables stop
查看防火墙状态: 
service iptables status

 

下面说下 CentOS7 和 6 的默认防火墙的区别

CentOS 7 默认使用的是 firewall 作为防火墙,使用 iptables 必须重新设置一下

1、直接关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

2、设置 iptables service

yum -y install iptables-services

如果要修改防火墙配置,如增加防火墙端口 3306

vi /etc/sysconfig/iptables

增加规则

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

保存退出后

systemctl restart iptables.service #重启防火墙使配置生效

systemctl enable iptables.service #设置防火墙开机启动 ` 最后重启系统使设置生效即可。

`systemctl start iptables.service #打开防火墙

systemctl stop iptables.service #关闭防火墙

解决主机不能访问虚拟机 CentOS 中的站点 前阵子在虚拟机上装好了 CentOS6.2,并配好了 apache+php+mysql,但是本机就是无法访问。一直就没去折腾了。

具体情况如下

  1. 本机能 ping 通虚拟机
  2. 虚拟机也能 ping 通本机 3. 虚拟机能访问自己的 web 4. 本机无法访问虚拟机的 web

后来发现是防火墙将 80 端口屏蔽了的缘故。

检查是不是服务器的 80 端口被防火墙堵了,可以通过命令:telnet server_ip 80 来测试。

解决方法如下:

 /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

然后保存:

/etc/rc.d/init.d/iptables save

重启防火墙

/etc/init.d/iptables restart

CentOS 防火墙的关闭,关闭其服务即可:

查看CentOS防火墙信息:
/etc/init.d/iptables status
 
关闭CentOS防火墙服务:
/etc/init.d/iptables stop

 

今天关于CentOS 界面安装 Oracle 问题centos上安装oracle的介绍到此结束,谢谢您的阅读,有关CentOS 6 升级到 CentOS 7、CentOS 6, CentOS 7 安装mysql数据库、CentOS 6.9 yum 和源码安装 htop,适用于 centOS 7、Centos 7 和 Centos 6 开放查看端口 防火墙关闭打开等更多相关知识的信息可以在本站进行查询。

本文标签: