-----------------------oracle------------------------------------
1、用oracle用戶修改:/newtouch/app/oracle/product/11.2/db_1/bin/
下的此文件
dbstart
將 ORACLE_HOME_LISTNER=$1
改成 ORACLE_HOME_LISTNER=$ORACLE_HOME
前提是用戶的環境變量配置文件中配置了ORACLE_HOME
export ORACLE_BASE=/newtouch/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2/db_1
2、用oracle用戶修改:/etc/oratab 文件
將 newtouchdb:/newtouch/app/oracle/product/11.2/db_1:N
改成 newtouchdb:/newtouch/app/oracle/product/11.2/db_1:Y
3、用root用戶編輯文件/etc/rc.d/rc.local
加入:
su oracle -lc "/newtouch/app/oracle/product/11.2/db_1/bin/lsnrctl start" 啓動監聽的
su oracle -lc "/newtouch/app/oracle/product/11.2/db_1/bin/dbstart" 啓動數據庫實例的
-----------------------mysql------------------------------------
1、自啓動MySQL
先用root用戶查看系統服務器情況
[root@centos65 ~]# chkconfig --list |grep mysql
mysqld 0:關閉 1:關閉 2:關閉 3:啓用 4:啓用 5:啓用 6:關閉
發現在3,5模式下,mysql已經是自啓動了,
如果不是,就執行:chkconfig --level 35 mysqld on
-----------------------tomcat------------------------------------
1、自啓動Tomcat
用root用戶編輯文件/etc/rc.d/rc.local
直接加入:
su tomcat -lc "sh /newtouch/deploy/tomcat-7.0.73/bin/startup.sh" 注意tomcat的路徑
如果啓動失敗,就檢查tomcat的catalina.sh中有沒有配置java_home
-----------------------redis------------------------------------
1、自啓動redis
用root用戶編輯文件/etc/rc.d/rc.local
直接加入:
/newtouch/deploy/redis32/bin/redis-server /newtouch/deploy/redis32/redis.conf 注意redis命令,配置文件的路徑
說明:
需要用root啓動的,直接加入啓動腳本
需要普通用戶啓動的,一定要 su 用戶名,否就會是root啓動,服務的權限就變了,容易出事