- Find the
CATALINA_HOME/webapps/manager/META-INF/context.xml
file and add the comment markers around the Valve.
<Context antiResourceLocking="false" privileged="true" >
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
</Context> - in the file apache-tomcat-9.0.11/conf/tomcat-users.xml
set up these rows :<role rolename=”manager-gui”/>
<role rolename=”manager-script”/>
<user username=”admin” password=”password” roles=”manager-gui,manager-script” /></tomcat-users> - Connect to localhost:8080/manager/status to verify the account
Drop active postgres connection
down vote
accepted
This will drop existing connections except for yours:
Query pg_stat_activity and get the pid values you want to kill, then issue SELECT pg_terminate_backend(pid int) to them.
PostgreSQL 9.2 and above:
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = ‘TARGET_DB’ — ← change this to your DB
AND pid <> pg_backend_pid();
PostgreSQL 9.1 and below:
SELECT pg_terminate_backend(pg_stat_activity.procpid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = ‘TARGET_DB’ — ← change this to your DB
AND procpid <> pg_backend_pid();
Once you disconnect everyone you will have to disconnect and issue the DROP DATABASE command from a connection from another database aka not the one your trying to drop.
SINGLETON DESIGN PATTERN TUTORIAL
Verify List All Installed Packages in RHEL, CentOS and Fedora
yum list installed
3. Using YUM-Utils
Yum-utils is an assortment of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration.
To install it, run the command below as root, otherwise, use sudo command:
# yum update && yum install yum-utils
Once you have it installed, type the repoquery command below to list all installed packages on your system:
# repoquery -a --installed
To list installed packages from a particular repository, use the yumdb program in the form below:
# yumdb search from_repo base
Update Angular Cli
ng --version
npm install --save-dev @angular/cli@latest
ng --version