docker错误 docker: Error response from daemon: Conflict. The container name "/oracle11g" is already in use by container "7edb8b99791ff4b298a6fa78a7c57be7cd646ab776883b5e07f670ed3506d7bf". You have to remove (or rename) that container to be able to reuse that name
vi /etc/profile export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 export ORACLE_SID=lihao export PATH=$ORACLE_HOME/bin:$PATH 使配置生效 source /etc/profile 创建软连接 ln -s $ORACLE_HOME/bin/sqlplus /usr/bin 切换到oracle 用户 这里还要说一下,一定要写中间的内条 - 必须要,否则软连接无效 su - oracle sqlplus /nolog conn /as sysdba 修改sys、system用户密码: alter user system identified by li1718; alter user sys identified by li1718; alter profile default limit PASSWORD_LIFE_TIME UNLIMITED; 创建用户(可选,根据需要) 用一个具有dba权限的用户登录(sysdba),然后输入以下语句 create user 用户名 identified by 密码; create user lihao identified by li1718; grant connect,resource,dba to test; 过程中出现的报错需要输入以下内容: 输入:alter database mount; 输入 :alter database open;
cd $ORACLE_HOME
find /home/oracle/app/oracle/product/11.2.0 -name listener.ora cd /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin vi listener.ora
CREATEOR REPLACE PROCEDURE CREATE_VIEW(acton in varchar2,acton2 in varchar2,acton3 in varchar2) as --建立游标 CURSOR cur_netnode(Aacton in varchar2,Aacton3 in varchar2) IS SELECT*FROM tmp_fetch_data where no1 =Aacton and no2 in (select regexp_substr(Aacton3, '[^,]+', 1, level) as split_result from dual connectby level <= length(Aacton3) -length(replace(Aacton3, ',')) +1;)WHERE code ISNOTNULL; --游标sql v_user cur_netnode%rowtype; --定义的行变量,用于接收游标中的数据 BEGIN OPEN cur_netnode(acton,acton3);--打开游标 loop --循环开始 fetch cur_netnode into v_user; --从游标中提取数据 exit when cur_netnode%notfound;--判断是游标中是否存在数据,不存在退出循环 ---id=时间戳+查询id部分 insertinto tmp_data2('id','name','age') values((sysdate -to_date('1970-01-01 08:00:00', 'yyyy-mm-dd hh24:mi:ss')) *86400000+ substr(v_user.id,10),v_user.name,v_user.age); END loop; ---结束循环 close cur_netnode; --关闭游标 END;
echo "查询所有tomcat并停止" pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}'` if [ "${pid}" ]; then for id in $pid do kill -9 $id done fi echo "进程已停止"
echo "[info][$(date)]准备启动tomcat" $binPath"/startup.sh" if [ $? -eq 0 ]; then echo "启动命令执行成功........" echo "检查tomcat运行状态..." for (( i=0; i<12; ++i )) do if [ $(curl -sIL -w "%{http_code}" -o /dev/null http://localhost:8080/login.html) -eq 200 ];then echo "tomcat启动成功" break else if [[ i -eq 11 ]];then echo "tomcat启动失败,请查看tomcat日志" exit 1 else echo "tomcat正在启动中..." sleep 5 fi fi done else echo "启动命令执行失败......." fi
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json: dial unix /var/run/docker.sock: connect: permission denied