1. 环境准备

1.1 系统

  操作系统:CentOS 7(64位)

1.2 工具/软件

  已安装完成的Oracle11g(64位); 
  创建数据库实例,本文中数据库实例名:test;$ORACLE_SID:testsid

2. 方法/步骤

2.1 配置/etc/oratab

以root身份登录到linux系统,编辑/etc/oratab文件,找到 
testsid:/data/oracle/product/11.2.0/db_1:N 
,改为 
testsid:/data/oracle/product/11.2.0/db_1:Y 
注意:/data/oracle/product/11.2.0/db_1为安装的$ORACLE_HOME,根据情况自行修改路径。

[oracle@zm-centos7 ~]$ su   #切换到root
Password: #输入root密码
[root@zm-centos7 oracle]# vim /etc/oratab #编辑
[root@zm-centos7 oracle]# cat /etc/oratab #查看
#
tsid:/data/oracle/product/11.2.0/db_1:N # This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database. # A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
testsid:/data/oracle/product/11.2.0/db_1:Y #修改位置
[root@zm-centos7 oracle]#

2.2 配置/etc/rc.d/rc.local

添加如下脚本:

su oracle -lc "/data/oracle/product/11.2.0/db_1/bin/lsnrctl start"
su oracle -lc /data/oracle/product/11.2.0/db_1/bin/dbstart
  • 1
  • 2

其中第一行因为lsnrctl之后有空格,需要引号,第二行加不加引号都可以。修改完保存退出即可。

添加结果:

[root@zm-centos7 /]# vim /etc/rc.d/rc.local
[root@zm-centos7 /]# cat /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot. # add start
su oracle -lc "/data/oracle/product/11.2.0/db_1/bin/lsnrctl start"
su oracle -lc /data/oracle/product/11.2.0/db_1/bin/dbstart
# add end touch /var/lock/subsys/local
# mount -a
[root@zm-centos7 /]#

截止此处,配置都与之前的配置方法相同,后面将配置Oracle服务启动脚本。

2.3 在/etc/init.d/下创建Oracle服务启动脚本

以root身份登录到系统,创建以oracle命名的文件 
[oracle@zm-centos7 ~]$ su 
Password: 
[root@zm-centos7 oracle]# vim /etc/init.d/oracle 
将以下脚本代码复制到文件里(注意修改oracle路径)

#!/bin/sh
# chkconfig: 345 61 61
# description: Oracle 11g R2 AutoRun Servimces
# /etc/init.d/oracle
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface
export ORACLE_BASE=/data/oracle #根据个人情况修改路径
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=testsid #改成自己的ORACLE_SID:testsid
export PATH=$PATH:$ORACLE_HOME/bin
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
su $ORA_OWNR -lc $ORACLE_HOME/bin/dbstart
echo "Oracle Start Succesful!OK."
;;
stop)
# Oracle listener and instance shutdown
su $ORA_OWNR -lc $ORACLE_HOME/bin/dbshut
echo "Oracle Stop Succesful!OK."
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo $"Usage: `basename $0` {start|stop|reload|reload}"
exit 1
esac
exit 0

保存退出

2.4 检查一下脚本能否正确执行

将oracle脚本文件赋予执行权限 
说明:/etc/init.d -> /etc/rc.d/init.d 其中/etc/init.d为link文件,所以执行哪个目录下的Oracle脚本都应该可以。

执行脚本:

# cd /etc/rc.d/init.d
# chmod +x oracle

执行结果:

[root@zm-centos7 /]# cd /etc/rc.d/init.d
[root@zm-centos7 init.d]# chmod +x oracle
[root@zm-centos7 init.d]# ll oracle
-rwxr-xr-x 1 root root 984 Oct 13 14:34 oracle

执行oracle脚本

./oracle start
./oracle stop

执行结果正常:

[root@zm-centos7 init.d]# ./oracle start
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /data/oracle/product/11.2.0/db_1/bin/dbstart ORACLE_HOME
Processing Database instance "testsid": log file /data/oracle/product/11.2.0/db_1/startup.log
Oracle Start Succesful!OK.
[root@zm-centos7 init.d]# ./oracle stop
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
Usage: /data/oracle/product/11.2.0/db_1/bin/dbshut ORACLE_HOME
Processing Database instance "testsid": log file /data/oracle/product/11.2.0/db_1/shutdown.log
Oracle Stop Succesful!OK.

这里需要注意了,在启动Oracle服务的时候,提示“ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener”,大体意思是“Oracle监听没有配置,监听没能启动”。 
下面就需要配置一下监听,让启动数据库的时候也把监听一起启动。

2.5 配置Oracle监听开机自启动服务

修改dbstart和dbshut启动关闭脚本,使其启动数据库的同时也自动启动监听器(即启动数据库时启动监听器,停止数据库时停止监听器): 
执行脚本:

# vim /data/oracle/product/11.2.0/db_1/bin/dbstart
找到下面的代码:
ORACLE_HOME_LISTNER=$1
将其改为
ORACLE_HOME_LISTNER=$ORACLE_HOME

Dbstart修改结果:

# Set path if path not set (if called from /etc/rc)
SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH
SAVE_LLP=$LD_LIBRARY_PATH # First argument is used to bring up Oracle Net Listener
#ORACLE_HOME_LISTNER=$1
ORACLE_HOME_LISTNER=$ORACLE_HOME
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
echo "Usage: $0 ORACLE_HOME"
else
LOG=$ORACLE_HOME_LISTNER/listener.log

同样也修改dbshut脚本:

# vim /data/oracle/product/11.2.0/db_1/bin/dbshut
找到下面的代码:
ORACLE_HOME_LISTNER=$1
将其改为
ORACLE_HOME_LISTNER=$ORACLE_HOME

Dbshut修正结果:

# Set path if path not set (if called from /etc/rc)
SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH
SAVE_LLP=$LD_LIBRARY_PATH # The this to bring down Oracle Net Listener
#ORACLE_HOME_LISTNER=$1
ORACLE_HOME_LISTNER=$ORACLE_HOME
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"
echo "Usage: $0 ORACLE_HOME"
else
LOG=$ORACLE_HOME_LISTNER/listener.log

2.6 再度执行Oracle服务脚本

执行脚本:

cd /etc/rc.d/init.d
./oracle start

执行结果:

[root@zm-centos7 /]# cd /etc/rc.d/init.d
[root@zm-centos7 init.d]# ./oracle start
Processing Database instance "testsid": log file /data/oracle/product/11.2.0/db_1/startup.log
Oracle Start Succesful!OK.

发现之前关于监听的提示消失了,测试成功。

2.7 加入自动启动行列

执行脚本:

ln –s /etc/rc.d/init.d/oracle /etc/rc0.d/K61oracle
ln –s /etc/rc.d/init.d/oracle /etc/rc2.d/S61oracle
ln –s /etc/rc.d/init.d/oracle /etc/rc3.d/S61oracle
ln –s /etc/rc.d/init.d/oracle /etc/rc4.d/S61oracle
ln –s /etc/rc.d/init.d/oracle /etc/rc6.d/K61oracle

执行结果:

[root@zm-centos7 /]# ln -s /etc/rc.d/init.d/oracle /etc/rc2.d/S61oracle
[root@zm-centos7 /]# ln -s /etc/rc.d/init.d/oracle /etc/rc3.d/S61oracle
[root@zm-centos7 /]# ln -s /etc/rc.d/init.d/oracle /etc/rc4.d/S61oracle
[root@zm-centos7 /]# ln -s /etc/rc.d/init.d/oracle /etc/rc0.d/K61oracle
[root@zm-centos7 /]# ln -s /etc/rc.d/init.d/oracle /etc/rc6.d/K61oracle
[root@zm-centos7 init.d]# ll /etc/rc0.d/
total 0
lrwxrwxrwx 1 root root 23 Oct 13 16:07 K61oracle -> /etc/rc.d/init.d/oracle
……省略100字

将 oracle服务加入到系统服务

chkconfig --level 234 oracle on
chkconfig --add oracle

检查 oracle服务是否已经生效

chkconfig --list  oracle
  • 1

执行结果:

[root@zm-centos7 init.d]# chkconfig --list  oracle

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'. oracle 0:off 1:off 2:on 3:on 4:on 5:on 6:off

2.8 最后重启机器,确认自启动结果

以oracle用户,打开一个终端:

[oracle@zm-centos7 ~]$ lsnrctl status   # 查看监听状态

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-OCT-2017 23:05:06

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 11-OCT-2017 23:02:22
Uptime 0 days 0 hr. 2 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/zm-centos7/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "testsid", status READY, has 1 handler(s) for this service...
Service "testsidXDB" has 1 instance(s).
Instance "testsid", status READY, has 1 handler(s) for this service...
The command completed successfully

查看oracle服务状态

[oracle@zm-centos7 ~]$ ps -ef |grep ora
oracle 3053 1 0 23:02 ? 00:00:00 /data/oracle/product/11.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle 3283 1 0 23:03 ? 00:00:00 ora_pmon_testsid
oracle 3285 1 0 23:03 ? 00:00:00 ora_vktm_testsid
oracle 3289 1 0 23:03 ? 00:00:00 ora_gen0_testsid
oracle 3291 1 0 23:03 ? 00:00:00 ora_diag_testsid
oracle 3293 1 0 23:03 ? 00:00:00 ora_dbrm_testsid
oracle 3295 1 0 23:03 ? 00:00:00 ora_psp0_testsid
oracle 3297 1 0 23:03 ? 00:00:00 ora_dia0_testsid
oracle 3299 1 0 23:03 ? 00:00:00 ora_mman_testsid
oracle 3301 1 0 23:03 ? 00:00:00 ora_dbw0_testsid
oracle 3303 1 0 23:03 ? 00:00:00 ora_lgwr_testsid
oracle 3305 1 0 23:03 ? 00:00:00 ora_ckpt_testsid
oracle 3307 1 0 23:03 ? 00:00:00 ora_smon_testsid
oracle 3309 1 0 23:03 ? 00:00:00 ora_reco_testsid
oracle 3311 1 0 23:03 ? 00:00:00 ora_mmon_testsid
oracle 3313 1 0 23:03 ? 00:00:00 ora_mmnl_testsid
oracle 3315 1 0 23:03 ? 00:00:00 ora_d000_testsid
oracle 3317 1 0 23:03 ? 00:00:00 ora_s000_testsid
oracle 3364 1 0 23:03 ? 00:00:00 ora_p000_testsid
oracle 3366 1 0 23:03 ? 00:00:00 ora_p001_testsid
oracle 3368 1 0 23:03 ? 00:00:00 ora_qmnc_testsid
oracle 3563 1 0 23:03 ? 00:00:00 ora_cjq0_testsid
oracle 3577 1 0 23:03 ? 00:00:00 ora_q000_testsid
oracle 3579 1 0 23:03 ? 00:00:00 ora_q001_testsid
oracle 3633 1 0 23:03 ? 00:00:00 ora_vkrm_testsid
root 3792 1241 0 23:04 ? 00:00:00 sshd: oracle [priv]
oracle 3801 3792 0 23:04 ? 00:00:00 sshd: oracle@pts/0
oracle 3806 3801 0 23:04 pts/0 00:00:00 -bash
oracle 3914 1 0 23:06 ? 00:00:00 ora_j000_testsid
oracle 3916 1 0 23:06 ? 00:00:00 ora_j001_testsid
oracle 3926 3806 0 23:07 pts/0 00:00:00 ps -ef
oracle 3927 3806 0 23:07 pts/0 00:00:00 grep --color=auto ora
[oracle@zm-centos7 ~]$

最后,确认自启动成功。

1. 环境准备

1.1 系统

操作系统:CentOS 7(64位)

1.2 工具/软件

已安装完成的Oracle11g(64位); 
创建数据库实例,本文中数据库实例名:test;$ORACLE_SID:testsid

2. 方法/步骤

2.1 配置/etc/oratab

以root身份登录到linux系统,编辑/etc/oratab文件,找到 
testsid:/data/oracle/product/11.2.0/db_1:N 
,改为 
testsid:/data/oracle/product/11.2.0/db_1:Y 
注意:/data/oracle/product/11.2.0/db_1为安装的$ORACLE_HOME,根据情况自行修改路径。

[oracle@zm-centos7 ~]$ su   #切换到root
Password: #输入root密码
[root@zm-centos7 oracle]# vim /etc/oratab
[root@zm-centos7 oracle]# cat /etc/oratab
#
tsid:/data/oracle/product/11.2.0/db_1:N # This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database. # A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
testsid:/data/oracle/product/11.2.0/db_1:Y
[root@zm-centos7 oracle]#

2.2 配置/etc/rc.d/rc.local

添加如下行: 
su oracle -lc “/data/oracle/product/11.2.0/db_1/bin/lsnrctl start” 
su oracle -lc /data/oracle/product/11.2.0/db_1/bin/dbstart 
其中第一行因为lsnrctl之后有空格,需要引号,第二行加不加引号都可以。修改完保存退出即可。

代码如下:

[root@zm-centos7 /]# vim /etc/rc.d/rc.local
[root@zm-centos7 /]# cat /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot. su oracle -lc "/data/oracle/product/11.2.0/db_1/bin/lsnrctl start"
su oracle -lc /data/oracle/product/11.2.0/db_1/bin/dbstart touch /var/lock/subsys/local
# mount -a
[root@zm-centos7 /]#

如果是在以前的centos版本中,这样就可以了。但是centos7 的/etc/rc.local不会开机执行,认真查看/etc/rc.local文件的内容就发现问题的原因了

[root@zm-centos7 /]# cat /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.

翻译一下:

这个文件是为了兼容性的问题而添加的。 
强烈建议创建自己的systemd服务或udev规则来在开机时运行脚本而不是使用这个文件。 
与以前的版本引导时的并行执行相比较,这个脚本将不会在其他所有的服务后执行。 
请记住,你必须执行“chmod +x /etc/rc.d/rc.local”来确保确保这个脚本在引导时执行。

查看一下/etc/rc.d/rc.local的权限

[root@zm-centos7 /]# ll /etc/rc.d/rc.local
-rw-r--r-- 1 root root 484 Oct 11 17:17 /etc/rc.d/rc.local
  • 1
  • 2

发现没有执行权限,按照说明的内容执行命令:

[root@zm-centos7 bin]# chmod +x /etc/rc.d/rc.local
[root@zm-centos7 bin]# reboot #重启机器,确认结果

2.3 重启机器,确认自启动结果

以oracle用户,打开一个终端:

[oracle@zm-centos7 ~]$ lsnrctl status   # 查看监听状态

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-OCT-2017 23:05:06

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 11-OCT-2017 23:02:22
Uptime 0 days 0 hr. 2 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/zm-centos7/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "testsid", status READY, has 1 handler(s) for this service...
Service "testsidXDB" has 1 instance(s).
Instance "testsid", status READY, has 1 handler(s) for this service...
The command completed successfully

查看oracle服务状态

[oracle@zm-centos7 ~]$ ps -ef |grep ora
oracle 3053 1 0 23:02 ? 00:00:00 /data/oracle/product/11.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle 3283 1 0 23:03 ? 00:00:00 ora_pmon_testsid
oracle 3285 1 0 23:03 ? 00:00:00 ora_vktm_testsid
oracle 3289 1 0 23:03 ? 00:00:00 ora_gen0_testsid
oracle 3291 1 0 23:03 ? 00:00:00 ora_diag_testsid
oracle 3293 1 0 23:03 ? 00:00:00 ora_dbrm_testsid
oracle 3295 1 0 23:03 ? 00:00:00 ora_psp0_testsid
oracle 3297 1 0 23:03 ? 00:00:00 ora_dia0_testsid
oracle 3299 1 0 23:03 ? 00:00:00 ora_mman_testsid
oracle 3301 1 0 23:03 ? 00:00:00 ora_dbw0_testsid
oracle 3303 1 0 23:03 ? 00:00:00 ora_lgwr_testsid
oracle 3305 1 0 23:03 ? 00:00:00 ora_ckpt_testsid
oracle 3307 1 0 23:03 ? 00:00:00 ora_smon_testsid
oracle 3309 1 0 23:03 ? 00:00:00 ora_reco_testsid
oracle 3311 1 0 23:03 ? 00:00:00 ora_mmon_testsid
oracle 3313 1 0 23:03 ? 00:00:00 ora_mmnl_testsid
oracle 3315 1 0 23:03 ? 00:00:00 ora_d000_testsid
oracle 3317 1 0 23:03 ? 00:00:00 ora_s000_testsid
oracle 3364 1 0 23:03 ? 00:00:00 ora_p000_testsid
oracle 3366 1 0 23:03 ? 00:00:00 ora_p001_testsid
oracle 3368 1 0 23:03 ? 00:00:00 ora_qmnc_testsid
oracle 3563 1 0 23:03 ? 00:00:00 ora_cjq0_testsid
oracle 3577 1 0 23:03 ? 00:00:00 ora_q000_testsid
oracle 3579 1 0 23:03 ? 00:00:00 ora_q001_testsid
oracle 3633 1 0 23:03 ? 00:00:00 ora_vkrm_testsid
root 3792 1241 0 23:04 ? 00:00:00 sshd: oracle [priv]
oracle 3801 3792 0 23:04 ? 00:00:00 sshd: oracle@pts/0
oracle 3806 3801 0 23:04 pts/0 00:00:00 -bash
oracle 3914 1 0 23:06 ? 00:00:00 ora_j000_testsid
oracle 3916 1 0 23:06 ? 00:00:00 ora_j001_testsid
oracle 3926 3806 0 23:07 pts/0 00:00:00 ps -ef
oracle 3927 3806 0 23:07 pts/0 00:00:00 grep --color=auto ora
[oracle@zm-centos7 ~]$

确认自启动成功。

Oracle 设置自启动的更多相关文章

  1. ORACLE设置自启动记录

    设置开机自启动1. 修改Oracle系统配置文件:/etc/oratab,只有这样,Oracle 自带的dbstart和dbshut才能够发挥作用.[root@hailiang ~]# vi /etc ...

  2. CentOS 7安装Oracle 11gR2以及设置自启动

    一.环境准备 1.正确无误的CentOS 7系统环境 CentOS 7安装:http://www.cnblogs.com/VoiceOfDreams/p/8043958.html 2.正确的JDK环境 ...

  3. CentOS 7安装Oracle 11gR2以及设置自启动(2)

    6.创建表空间和用户授权 (1).连接数据库 $ sqlplus / as sysdba (2).创建数据库表空间 语法: create tablespace 表空间名 datafile ‘物理地址( ...

  4. CentOS 7安装Oracle 11gR2以及设置自启动(1)

    一.环境准备 1.正确无误的CentOS 7系统环境 虚拟机要求: 内存至少2G 处理器至少2个 根分区要大于20G(安装oracle很占空间,空闲空间要足够) 2.正确的JDK环境 CentOS 7 ...

  5. Oracle设置为自启动

    Oracle设置为自启动 学习了:http://blog.itpub.net/31015730/viewspace-2148412/ oracle自带dbstart命令,主要进行系统启动设置: 在/e ...

  6. Linux设置自启动

    启动大致过程:bootloader-->内核-->内核模块-->挂载根文件系统-->init进程 init进程是非内核进程中第一个被启动运行的,因此它的进程编号PID的值总是1 ...

  7. Tomcat 设置自启动时遇到的错误问题与解决方案

    首先,今天在做tomcat开机自启动时,原本很简单的一个问题,但却浪费了很长时间: 首先系统环境采用的是Window10,设置Tomcat自启动过程当中需要注意的是:JDK的版本和Tomcat的位数必 ...

  8. oracle 配置 自启动 和 关闭

    今天在看oracle自启动脚本,突然有点时间,总结一下!!! 第一次写博客,大家随便看看就好,有错误麻烦提醒下,不喜欢别喷,主要是锻炼自己,形成写博客的好习惯. 刚毕业,现在还没转正,在干运维和自学d ...

  9. centos下设置自启动和配置环境变量的方法

    1. 设置自启动 在CentOS系统下,主要有两种方法设置自己安装的程序开机启动.1.把启动程序的命令添加到/etc/rc.d/rc.local文件中,比如下面的是设置开机启动httpd. #!/bi ...

随机推荐

  1. maven 几个命令的用法

    进入到项目目 前 cd E:\workspace\foen_api(如切换不了目录) 直接E:\workspace\foen_api mvn clean 清理 mvn install 安装 mvn t ...

  2. java扫描仪上传文件

    问题: 项目中有一个功能,原来是用ckfinder做的,可以选择本地图片上传至服务器,然后将服务器的图片显示在浏览器中,并可以将图片地址保存到数据库:现在客户觉得麻烦,提出连接扫描仪扫描后直接上传至服 ...

  3. luogu P1307 数字反转 x

    题目描述 给定一个整数,请将该数各个位上数字反转得到一个新数.新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零(参见样例2). 输入输出格式 输入格式: 输入 ...

  4. HTML基础入门学习准备篇

    在学习前端的开始,让我们一起来了解什么是HTML5时代的大前端开发和全栈开发的定义 传统的前端:切图-标签和样式-实现效果 H5时代的前端: 一.需要各端的兼容开发 二.可以用于APP开发和移动站点的 ...

  5. CSU 1556 Jerry's trouble

    题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1556 Description Jerry is caught by Tom. He ...

  6. VS2015发布web服务

    一.IIS中 ①添加网站 二.VS2015 ①右键解决方案→发布: ②自定义,设置配置文件名称: ③ ④发布     三.IIS中浏览(图片的ip地址是自己,上面的ip是截图别人的,所以不一样)

  7. MATLAB 用 imresize() 函数缩小图象是 double 和 uint8 有差别

    今天发现一个奇怪的现象. 在用 imresize() 缩小图象时,如果图象时 double 格式的,缩小后会产生不连通的现象. 下面是原图: 对这张图象 img 做 simg = imresize(i ...

  8. linux 复制到远程服务器

    scp 文件路径 root@192.168.0.1:文件夹路径 会提示你输入远程服务器密码

  9. PHP-会话技术

    B/S 请求响应模式是无状态的.任意的请求间不存在任何的联系,不能将请求状态保持下去. 会话技术可以给每个浏览器分配持久数据,这些数据不会随着一次请求和相应结束而销毁. COOKIE cookie 是 ...

  10. 002-Visio绘制时序图

    一.概述 1.1.什么时候使用 当编码的时候,知道有的用例的业务逻辑按照比较确定的时间先后顺序进行展开.这时候,我们就需要知道我们设计的系统中的不同类之间传递消息(可以认为是不同对象函数间的调用)要按 ...