To run Tomcat on a port below 1024 in Ubuntu/Unix, the service needs root privileges.
And that you do not want. Use a port redirection via iptables
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
Aug 5, 2017
Mar 16, 2017
MongoDB SSL connection command
$ mongo --host <hostname> --port <port> --username username --password --ssl --sslPEMKeyFile <filename> --sslPEMKeyPassword <value> --sslCAFile <filename>
Feb 20, 2017
Manage Tablespaces
Create:
CREATE TABLESPACE DATA05 DATAFILE 'D:\app_db12c\oracle\oradata\orcl\sample01.dbf' SIZE 1M AUTOEXTEND ON NEXT 1M;
Extend:
ALTER TABLESPACE DATA05 ADD
DATAFILE 'D:\app_db12c\oracle\oradata\orcl\sample02.dbf' SIZE 1M
AUTOEXTEND ON NEXT 1M;
Delete:
DROP TABLESPACE DATA05 INCLUDING CONTENTS AND DATAFILES;
CREATE TABLESPACE DATA05 DATAFILE 'D:\app_db12c\oracle\oradata\orcl\sample01.dbf' SIZE 1M AUTOEXTEND ON NEXT 1M;
Extend:
ALTER TABLESPACE DATA05 ADD
DATAFILE 'D:\app_db12c\oracle\oradata\orcl\sample02.dbf' SIZE 1M
AUTOEXTEND ON NEXT 1M;
Delete:
DROP TABLESPACE DATA05 INCLUDING CONTENTS AND DATAFILES;
Nov 4, 2016
SQLPLUS command to start oracle pdbs
sqlplus sys/xxxxx as sysdba@pdborcl.xxxx.com
SQL*Plus: Release 12.1.0.2.0 Production on Fri Nov 4 12:07:01 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> SELECT name,open_mode from v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDBORCL MOUNTED
SQL> alter pluggable database pdborcl open read write;
Pluggable database altered.
SQL> SELECT name,open_mode from v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDBORCL READ WRITE
SQL>
SQL*Plus: Release 12.1.0.2.0 Production on Fri Nov 4 12:07:01 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> SELECT name,open_mode from v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDBORCL MOUNTED
SQL> alter pluggable database pdborcl open read write;
Pluggable database altered.
SQL> SELECT name,open_mode from v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDBORCL READ WRITE
SQL>
Sep 7, 2016
How to modify vncveiwer settings on Windows 7?
To modify VNC Viewer/Server setting:-
1. Start -> regedit to open Registry Editor
2. Navigate to HKEY_CURRENT_USER -> Software -> RealVNC -> vncviewer
3. Select 'vncviewer' and modify ColorLevel to full to resolve 'Bad ColourLevel' while opening VNC Viewer.
1. Start -> regedit to open Registry Editor
2. Navigate to HKEY_CURRENT_USER -> Software -> RealVNC -> vncviewer
3. Select 'vncviewer' and modify ColorLevel to full to resolve 'Bad ColourLevel' while opening VNC Viewer.
Aug 30, 2016
NodeJS express security
app.use(session( {
httpOnly: true, // don't let browser javascript access cookies ever
secure: true, // only use cookies over https
ephemeral: true // delete this cookie when the browser is closed.
)});
Apr 5, 2016
EM Configuration issue.
bash-4.1$ emctl
EM Configuration issue. /opt/usr01/app/usr01/product/11.2.0/dbhome_1/<hostname>_orcl not found.
For above error saying missing _orcl directory, search for _orcl folder in your /opt/usr01/app/usr01/product/11.2.0/dbhome_1 and set the actual required hostname to ORACLE_HOSTNAME (typically It would be localhost)
bash-4.1$ export ORACLE_HOSTNAME=localhost
bash-4.1$ emctl (now works fine)
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 10g Database Control commands:
emctl start | stop dbconsole
emctl status | secure | setpasswd dbconsole
emctl config dbconsole -heap_size <size_value> -max_perm_size <size_value>
emctl status agent
emctl status agent -secure [-omsurl <http://<oms-hostname>:<oms-unsecure-port>/em/*>]
emctl getversion
emctl reload | upload | clearstate | getversion agent
emctl reload agent dynamicproperties [<Target_name>:<Target_Type>]....
emctl config agent <options>
emctl config agent updateTZ
emctl config agent getTZ
emctl resetTZ agent
emctl config agent credentials [<Target_name>[:<Target_Type>]]
emctl gensudoprops
emctl clearsudoprops
Blackout Usage :
emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name>[:<Target_Type>]].... [-d <Duration>]
emctl stop blackout <Blackoutname>
emctl status blackout [<Target_name>[:<Target_Type>]]....
EM Configuration issue. /opt/usr01/app/usr01/product/11.2.0/dbhome_1/<hostname>_orcl not found.
For above error saying missing _orcl directory, search for _orcl folder in your /opt/usr01/app/usr01/product/11.2.0/dbhome_1 and set the actual required hostname to ORACLE_HOSTNAME (typically It would be localhost)
bash-4.1$ export ORACLE_HOSTNAME=localhost
bash-4.1$ emctl (now works fine)
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 10g Database Control commands:
emctl start | stop dbconsole
emctl status | secure | setpasswd dbconsole
emctl config dbconsole -heap_size <size_value> -max_perm_size <size_value>
emctl status agent
emctl status agent -secure [-omsurl <http://<oms-hostname>:<oms-unsecure-port>/em/*>]
emctl getversion
emctl reload | upload | clearstate | getversion agent
emctl reload agent dynamicproperties [<Target_name>:<Target_Type>]....
emctl config agent <options>
emctl config agent updateTZ
emctl config agent getTZ
emctl resetTZ agent
emctl config agent credentials [<Target_name>[:<Target_Type>]]
emctl gensudoprops
emctl clearsudoprops
Blackout Usage :
emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name>[:<Target_Type>]].... [-d <Duration>]
emctl stop blackout <Blackoutname>
emctl status blackout [<Target_name>[:<Target_Type>]]....
Subscribe to:
Posts (Atom)