XManager远程Linux 安装Oracle 图形化界面xstart解决方法
一、安装Oracle_11g_R2
1、安装所必要的软件包:(CentOS)
参见官方文档
-rw-r--r--. 1 oracle oinstall 1358454646 Feb 5 22:57 p10404530_112030_Linux-x86-64_1of7.zip
-rw-r--r--. 1 oracle oinstall 1142195302 Feb 5 22:57 p10404530_112030_Linux-x86-64_2of7.zip
2、添加用户,用户组
groupadd oinstall;groupadd dba;useradd -g oinstall -G dba oracle
3、设置内核参数(添加到文件末尾)
vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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 = 1048586
配置/etc/hosts文件中IP 主机名映射关系
IP hostname主机名
4、设置文件限制 (添加到文件末尾)
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
5、设置bash(添加到文件末尾)
vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
source /etc/profile
6、创建Oracle产品目录
mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
7、修改Oracle产品目录的所属和用户
chown -R oracle:oinstall /u01
8、设置Oracle用户环境变量 (添加到文件末尾)
su - oracle
vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/db_1
export ORACLE_SID=masc
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
解压Oracle安装包
[oracle@node130 oracle]$ unzip p10404530_112030_Linux-x86-64_1of7.zip
[oracle@node130 oracle]$ unzip p10404530_112030_Linux-x86-64_2of7.zip
[oracle@node130 oracle]$ cd database/
[oracle@node130 database]$ ls
doc install readme.html response rpm runInstaller sshsetup stage welcome.html
[oracle@node130 ~]$ cd /opt/Oracle/database/
9、安装Oracle
--如果没有安装图形界面,则需要先安装。
# yum grouplist
# yum groupinstall "X Window System"
# yum groupinstall Desktop
yum install xterm
yum install xclock
配置xmanager
打开xstart
输入主机host,协议protocal,ssh,输入登陆的用户名;身份验证,点击设置,输入密码;命令点击三角符号,选择第三个:xterm(Linux:Type 2)如下图所示:
填好之后点击运行即可;如下图所示:
现在可以在远程连接窗口中输入命令,如下图所示:
安装过程中只安装Oracle软件。
oracle 用户
netca 配置监听
dbca 创建数据库
export ORACLE_SID=prod
[oracle@node133 database]$ lsnrctl start #启动监听
[oracle@node130 database]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 6 17:15:47 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>startup #启动数据库
SQL> create table test_tb(id int);
Table created.
SQL> insert into test_tb values(1);
1 row created.
SQL> select * from test_tb;
ID
----------
1
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
超级用户解锁普通用户
默认的scott用户是被锁定的,先解锁就能登陆上了。 使用下面的语句解锁scott:
[oracle@node130 Desktop]$ sqlplus /"as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 18:39:38 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> start;
SP2-1506: START, @ or @@ command has no arguments
SQL> startup;
ORACLE instance started.
Total System Global Area 776646656 bytes
Fixed Size 2232392 bytes
Variable Size 545263544 bytes
Database Buffers 226492416 bytes
Redo Buffers 2658304 bytes
Database mounted.
Database opened.
SQL> alter user scott account unlock;
User altered.
SQL> alter user scott identified by 123456;
User altered.
SQL> exit;
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node130 Desktop]$ sqlplus scott/123456@prod
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 18:59:02 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from bonus;
no rows selected
SQL> select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7369 SMITH CLERK 7902 17-DEC-80 800
20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300
30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500
30
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7566 JONES MANAGER 7839 02-APR-81 2975
20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400
30
7698 BLAKE MANAGER 7839 01-MAY-81 2850
30
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7782 CLARK MANAGER 7839 09-JUN-81 2450
10
7788 SCOTT ANALYST 7566 19-APR-87 3000
20
7839 KING PRESIDENT 17-NOV-81 5000
10
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0
30
7876 ADAMS CLERK 7788 23-MAY-87 1100
20
7900 JAMES CLERK 7698 03-DEC-81 950
30
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7902 FORD ANALYST 7566 03-DEC-81 3000
20
7934 MILLER CLERK 7782 23-JAN-82 1300
10
14 rows selected.
SQL> select * from salgrade;
GRADE LOSAL HISAL
---------- ---------- ----------
1 700 1200
2 1201 1400
3 1401 2000
4 2001 3000
5 3001 9999
QL> create user test_user identified by 123456;
User created.
SQL> grant create session to test_user;
Grant succeeded.
[oracle@node130 Desktop]$ sqlplus test_user/123456@prod
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 19:18:11 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create table test_table(id int);
Table created.
SQL> insert into test_table values (1);
insert into test_table values (1)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'USERS'
锁用户
[oracle@node130 Desktop]$ sqlplus / "as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 19:20:44 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user test_user account lock;
User altered.
SQL> exit;
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node130 Desktop]$ sqlplus test_user/123456@prod
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 19:22:21 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-28000: the account is locked
Enter user-name:
[oracle@node130 Desktop]$ sqlplus / "as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 19:23:07 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user test_user account unlock;
User altered.
SQL> grant dba to test_user;
Grant succeeded.
SQL> exit;
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@node130 Desktop]$ sqlplus test_user/123456@prod
SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 13 19:23:50 2017
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> insert into test_table values(1);
1 row created.
SQL> select * from test_table;
ID
----------
1
XManager远程Linux 安装Oracle 图形化界面xstart解决方法的更多相关文章
- Linux安装ElasticSearch启动报错的解决方法
Linux安装ElasticSearch后,ElasticSearch是不能用root用户启动的,以root用户启动会报错Refer to the log for complete error det ...
- 2018.4.21 如何正确快速安装/卸载云服务器Centos7安装GUI图形化界面GNOME桌面环境
为云服务哦Centos安装图形化界面GNOME .KDE 1.开始前先验证一下能不能上网 ping www.baidu.com 2.接下来开始安装X(X Window System),命令为 yum ...
- Windows下搭建远程Linux主机的图形化本地开发环境
在实际开发中,项目的类生产.生产环境一般都是选择Linux为服务器进行部署. 相应的,我们的开发最好也在Linux环境下进行,否则容易引发其他的问题,比如不同环境下功能不一致.库依赖差异等. 但是Li ...
- linux 安装软件各种错误集锦及解决方法
1.最小化安装了centos, 但是使用ifconfig命令时候出现”bash ifconfig command not found” .解决方法:yum -y install net-tools.x ...
- Mysql的安装和图形化界面的使用
访问mysql网址:https://dev.mysql.com/ 下面需要登录你的oracle账号进行下载就好~ 下载之后是一解压包形式存在的~ 解压之后的文件 这里我新建了my.ini的文件~将my ...
- 百度云服务器CentOs6.8安装gnome图形化界面并通过VNC远程访问
一:安装gnome桌面 利用xshell 登陆上远程主机 依次执行下列命令: [root@lys]#yum groupinstall -y "X Window System" [r ...
- Linux命令学习-图形化界面命令开关闭
su root password 1, 关闭图形界面: init 3 关闭图形界面(XServer服务也会关闭) 开启图形界面: init 5 或 startx 开机时,不进入 X Window: v ...
- Mac 10.12安装Homebrew图形化界面管理工具Cakebrew
下载: (链接: https://pan.baidu.com/s/1mivJ9H2 密码: f8dr)
- kail linux安装软件提示“无法定位软件包”解决方法
主要是更新源的问题,我安装ibus-pinyin老是提示"无法定位软件包" 最后我用的是163的源: # 源 deb http://mirrors.163.com/debian w ...
随机推荐
- Java基础——增强for循环
java1.5版本引入了一个增强for循环,基本原理和for循环类似. 语法声明:for(表达式:条件表达式) 举例:for (String str : set) 解释:set代表set集合,str代 ...
- linux安装lua
1,下载lua源码wget http://www.lua.org/ftp/lua-5.3.3.tar.gz或curl -R -O http://www.lua.org/ftp/lua-5.3.3.ta ...
- python爬虫:爬取医药数据库drugbank
这个是帮朋友做的,难点就是他们有一个反爬虫机制,用request一直不行,后面我就用selenium直接把网页copy下来,然后再来解析本地的html文件,就木有问题啦. 现在看来,写得有点傻,多包涵 ...
- Java之Foreach语句
Foreach是for语句的特殊简化版本,但任何时候的foreach语句都可以改写成for语句.Foreach语句在遍历数组等方面为程序员提供了很大的方便 语法如下: For(元素变量 x:遍历对象o ...
- HDU 1213 How Many Tables【并查集】
解题思路:和畅通工程类似,问最后还剩下几个不连通的区域. How Many Tables Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
- BZOJ2440: [中山市选2011]完全平方数 容斥原理_莫比乌斯函数
emmm....... 数学题都不友好QAQ...... Code: #include <cstdio> #include <algorithm> #include <c ...
- C# 基础复习 四 ADO
调用存储过程,并接收多个表的查询结果 一个表用一个DataTable,DataSet可以存储多个DataTable DataSet需要SqlDataAdapter来填充数据 SqlConnection ...
- python安装Redis数据库
where pip cd 切换这个目录 pip install redis import redis r = redis.Redis(host='127.0.0.1', port=6379) user ...
- Vue学习之路第一篇(学习准备)
1.开发工具的选择 这个和个人的开发习惯有关,并不做强求,厉害的话用记事本也可以.但是我还是建议用人气比较高的编辑工具,毕竟功能比较全面,开发起来效率比较高. 我之前写前端一直用的是sublimete ...
- [转载] C 陷阱与缺陷( C traps and Pitfalls )
本文转自 https://www.xuebuyuan.com/1951579.html 自己找工作过程中复习过的书包括<C traps and Pitfalls>,<编程珠玑> ...