Is there a way to change tomcat's conf folder location to something other than next to bin?
Original:
Tomcat - bin
conf
temp
lib
webapp
FolderABC -
Expected:
Tomcat - bin
temp
webapp
FolderABC -
- conf -- server.xml
-- other files
I think you have only one possibility to do something like that without patching tomcat:
Use symbolic links to redirect the conf directory to your chosen directory:
If you use linux/macos something like this should work (not that much experience with windows, sorry)
mv conf FolderABC/conf
ln -s FolderABC/conf conf
Here is a listing of /usr/share/tomcat6 from my fedora core system:
drwxr-xr-x. 2 root root 4096 May 16 09:51 bin
lrwxrwxrwx. 1 root tomcat 12 May 16 09:51 conf -> /etc/tomcat6
lrwxrwxrwx. 1 root tomcat 23 May 16 09:51 lib -> /usr/share/java/tomcat6
lrwxrwxrwx. 1 root tomcat 16 May 16 09:51 logs -> /var/log/tomcat6
lrwxrwxrwx. 1 root tomcat 23 May 16 09:51 temp -> /var/cache/tomcat6/temp
lrwxrwxrwx. 1 root tomcat 24 May 16 09:51 webapps -> /var/lib/tomcat6/webapps
lrwxrwxrwx. 1 root tomcat 23 May 16 09:51 work -> /var/cache/tomcat6/work
Related
I'm trying to connect to an Oracle Cloud Database using the instant client from a CentOS 7 machine.
I created the databases in the OCI interface, I downloaded the wallet files and created one user with the DWROLE role.
I installed the bellow packages on the system
oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm
oracle-instantclient19.8-devel-19.8.0.0.0-1.x86_64.rpm
oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
oracle-instantclient19.8-tools-19.8.0.0.0-1.x86_64.rpm
I created set the bellow folders and set the env vars
export ORACLE_HOME=/usr/lib/oracle/19.8/client64
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin
then I unzipped the wallet files to TNS_ADMIN
[root#workvm admin]# ll
total 40
-rw-r--r-- 1 root root 6733 Sep 17 2020 cwallet.sso
-rw-r--r-- 1 root root 6688 Sep 17 2020 ewallet.p12
-rw-r--r-- 1 root root 3276 Sep 17 2020 keystore.jks
-rw-r--r-- 1 root root 691 Sep 17 2020 ojdbc.properties
-rw-r--r-- 1 root root 317 Sep 17 2020 README
-rw-r--r-- 1 root root 114 Sep 17 2020 sqlnet.ora
-rw-r--r-- 1 root root 1813 Sep 16 14:18 tnsnames.ora
-rw-r--r-- 1 root root 3336 Sep 17 2020 truststore.jks
[root#workvm admin]# pwd
/usr/lib/oracle/19.8/client64/network/admin
The tnsnames.ora files have some autogenerated services defined
otakudb_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=...)
otakudb_low = (...)
otakudb_medium = (...)
According to what I have read, I should be able to connect to the database by executing
sqlplus metalbob#otakudb_high
However, when I run it the connection halts and then errors out with the following message
[donhk#workvm ~]$ sqlplus metalbob#otakudb_high
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 16 14:01:52 2020
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Enter password:
ERROR: ORA-28791: certificate verification failure
[donhk#workvm ~]$
What is the correct procedure to connect to the remote database?
Edit after Joe answer:
This is how my sqlnet.ora file was prior to the changes
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="?/network/admin")))
SSL_SERVER_DN_MATCH=yes
This is how I changed to make it work after joe answer
NAMES.DIRECTORY_PATH= (TNSNAMES)
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="?/network/admin")))
SSL_SERVER_DN_MATCH=yes
There is no need to change the DIRECTORY, the trick was this
NAMES.DIRECTORY_PATH= (TNSNAMES)
Hope this helps someone!
Edit 2
I realized that after I bounced the machine, I was able to connect, maybe it was a network problem on the machine or a library not properly loaded
I wrote this up last week in How to connect to Oracle Autonomous Cloud Databases.
You can edit sqlnet.ora if you don't have the config files in the default network/admin directory. If they are in that directory then you don't need to edit it, because the pre-supplied path "?/network/admin" maps to the network/admin subdirectory under where the libclntsh.so file is.
The other alternative is to use "Easy Connect Plus" syntax like:
tcps://adb.ap-sydney-1.oraclecloud.com:1522/abc_cjjson_high.adb.oraclecloud.com?wallet_location=/Users/cjones/Cloud/CJJSON
Extract cwallet.so from the wallet zip, and stick it in a directory (I used /Users/cjones/Cloud/CJJSON). Then find the host, servicename, port etc from the wallet tnsnames.ora file and build up your easy connect string. Then you can 'throw away' the zip file since it is not needed :)
I have moved to a vagrant environment for developing a CakePhp site.
When viewing the new site there is a permission error with the log files.
Several log files are not writeable, with the following being an example output:
Warning (2): file_put_contents(/var/www/html/logs/error.log): failed to open stream: Permission denied [CORE/src/Log/Engine/FileLog.php, line 133]
I have been using puPHPet to generate vagrant configs.
My config file (config.yaml) includes the following:
mount_options:
dir_mode: '0777'
file_mode: '0777'
When I SSH into the box and run ls -al i see the following:
drwxrwxr-x 1 vagrant vagrant 0 May 16 16:21 logs/
and:
-rwxrwxr-- 1 vagrant vagrant 12152 May 16 16:53 cli-debug.log*
-rwxrwxr-- 1 vagrant vagrant 2763 May 16 16:53 cli-error.log*
-rwxrwxr-- 1 vagrant vagrant 0 May 16 14:12 empty*
-rwxrwxr-- 1 vagrant vagrant 0 May 16 14:12 error.log*
While they are owned by vagrant, they seem to have 777 permissions and thus should be writeable by any user.
How can I resolve this problem?
Thanks in advance.
Vagrant sets it's permissions a little confusingly. Following feedback I've updated these permissions.
This now works as expected.
Thanks to Salines and Greg Schmidt.
I'm trying to install the choregraphe for robotics purpose .
I'm running Ubuntu 18.04 .
So i downloaded the choregraphe-suite-x.x-linux64-setup.run file from the official website . And then :
chmod +x choregraphe-suite-x.x-linux64-setup.run
sudo ./choregraphe-suite-x.x-linux64-setup.run
Then I followed the installation steps , i accepted the license agreement and followed the wizard steps .
But the software does not launch ..
What is the issue ?
I can't vouch for backwards compatibility, but was able to get the app to launch by addressing the reported error and adding a library link:
$ sudo ln -sf /usr/lib/x86_64-linux-gnu/libz.so /opt/'Softbank
Robotics'/'Choregraphe Suite 2.5'/lib/libz.so.1
On Ubuntu 18.04, the error is:
This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
The culprit is this error message:
Cannot load library /opt/nao/plugins/platforms/libqxcb.so: (/opt/nao/bin/../lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16))
The solution is to skip the shipped libz.so.1.2.8 in lib/ with symbolic links, like so:
abacus:/opt/nao/lib$ dir libz.so*
lrwxrwxrwx 1 root root 9 feb. 4 11:16 libz.so -> libz.so.1
lrwxrwxrwx 1 root root 31 feb. 4 11:15 libz.so.1 -> /lib/x86_64-linux-gnu/libz.so.1
-rwxr-xr-x 1 root root 105032 feb. 1 16:32 libz.so.1.2.8
lrwxrwxrwx 1 root root 15 feb. 1 16:32 libz.so.1.old -> ./libz.so.1.2.8
lrwxrwxrwx 1 root root 15 feb. 1 16:32 libz.so.old -> ./libz.so.1.2.8
and
abacus:/opt/nao/lib$ dir /lib/x86_64-linux-gnu/libz.so.1
lrwxrwxrwx 1 root root 14 mai 23 2017 /lib/x86_64-linux-gnu/libz.so.1 -> libz.so.1.2.11
With this linking, both Choregraphe and robot_settings should start up.
I have a simple C program using libssl.
On Linux, I installed the openssl-dev package and compiled the program with the following line:
gcc test_libssl.c -o test_libssl -lcrypto -lssl
Now I would like to do the same on my Mac. The same line resulted in:
fatal error: 'openssl/conf.h' file not found
I tried installing openssl (openssl-dev did not work) with home-brew via brew install openssl
This gave me:
...
==> Installing openssl
==> Downloading https://www.openssl.org/source/openssl-1.0.2a.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
I found a related SO question with no answer.
I also tried
brew info openssl
and got informed that
This formula is keg-only.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
What do I have to do / install in order to be able to compile libssl-using C programs programs on OS X?
Or, is it a bad idea the first place (given the warning above)?
UPDATE:
I got the openssl installed using brew. I am not sure if this was the problem but I updated brew.
Taking brew's advice
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
and this issue into account.
Then, following #Alex Reynolds's advice, I compiled it successfully with
gcc test_libssl.c -o test_libssl -lssl -lcrypto -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include
I have Homebrew installed on El Capitan (10.11.1) and have installed a current version of OpenSSL with no apparent ill effects:
$ uname -a
Darwin hostname.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
$ brew info openssl
openssl: stable 1.0.2d (bottled)
OpenSSL SSL/TLS cryptography library
https://openssl.org/
This formula is keg-only.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
/usr/local/Cellar/openssl/1.0.2d_1 (464 files, 17M)
Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/openssl.rb
==> Dependencies
Build: makedepend ✔
==> Options
--universal
Build a universal binary
--without-check
Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
Have you tried adding the flags that it suggests to your app's build statement? You might edit your app's makefile or other build statement and add those entries, after a brew install openssl. This may help your compiler find and link the library and header files it needs.
Looks like everything is there. Here are headers:
$ ls -al /usr/local/opt/openssl/include/openssl/
total 3688
drwxr-xr-x 77 alexpreynolds admin 2618 Aug 24 13:46 .
drwxr-xr-x 3 alexpreynolds admin 102 Aug 24 13:46 ..
-rw-r--r-- 1 alexpreynolds admin 6182 Aug 24 13:46 aes.h
-rw-r--r-- 1 alexpreynolds admin 63142 Aug 24 13:46 asn1.h
-rw-r--r-- 1 alexpreynolds admin 24435 Aug 24 13:46 asn1_mac.h
-rw-r--r-- 1 alexpreynolds admin 34475 Aug 24 13:46 asn1t.h
-rw-r--r-- 1 alexpreynolds admin 38566 Aug 24 13:46 bio.h
-rw-r--r-- 1 alexpreynolds admin 5351 Aug 24 13:46 blowfish.h
...
And static and dynamic libraries:
$ ls -al /usr/local/opt/openssl/lib
total 11664
drwxr-xr-x 10 alexpreynolds admin 340 Aug 24 13:46 .
drwxr-xr-x 11 alexpreynolds admin 374 Aug 24 13:46 ..
drwxr-xr-x 14 alexpreynolds admin 476 Aug 24 13:46 engines
-r--r--r-- 1 alexpreynolds admin 1861780 Aug 24 13:46 libcrypto.1.0.0.dylib
-r--r--r-- 1 alexpreynolds admin 3206344 Aug 24 13:46 libcrypto.a
lrwxr-xr-x 1 alexpreynolds admin 21 Aug 24 13:46 libcrypto.dylib -> libcrypto.1.0.0.dylib
-r--r--r-- 1 alexpreynolds admin 364144 Aug 24 13:46 libssl.1.0.0.dylib
-r--r--r-- 1 alexpreynolds admin 524424 Aug 24 13:46 libssl.a
lrwxr-xr-x 1 alexpreynolds admin 18 Aug 24 13:46 libssl.dylib -> libssl.1.0.0.dylib
drwxr-xr-x 5 alexpreynolds admin 170 Aug 24 13:46 pkgconfig
The answer of #Alex Reynolds is correct, but if you want to compile/configure someone else's program, then you can run this beforehand:
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
i had the following curl headers, and i still could install the libcurl4 packages mentioned above-
kafka#metamorphosis:~$ ll /usr/include/curl/
total 200
drwxr-xr-x 2 root root 4096 Jan 16 13:29 ./
drwxr-xr-x 51 root root 20480 Jan 16 13:29 ../
-rw-r--r-- 1 root root 7303 Dec 18 01:11 curlbuild.h
-rw-r--r-- 1 root root 83928 Dec 18 01:11 curl.h
-rw-r--r-- 1 root root 8934 Dec 18 01:11 curlrules.h
-rw-r--r-- 1 root root 2741 Dec 18 01:11 curlver.h
-rw-r--r-- 1 root root 3472 Dec 18 01:11 easy.h
-rw-r--r-- 1 root root 2790 Dec 18 01:11 mprintf.h
-rw-r--r-- 1 root root 13836 Dec 18 01:11 multi.h
-rw-r--r-- 1 root root 1330 Dec 18 01:11 stdcheaders.h
-rw-r--r-- 1 root root 36918 Dec 18 01:11 typecheck-gcc.h
How are libcurl4-openssl-dev and libcurl4-nss-dev different from each other and from these curl.h files?
i noticed the following files after i installed the two packages using apt-get in ubuntu-
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.3.0
/usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.la
/usr/lib/x86_64-linux-gnu/libcurl.so.3
/usr/lib/x86_64-linux-gnu/libcurl.a
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so
/usr/lib/x86_64-linux-gnu/pkgconfig/libcurl.pc
Now if i have a program with a line like- #include<curl/curl.h> , how do i go about compiling it?
gcc -L /usr/include/curl/ -lcurl nginx-isolated.c doesn't seem to work.
The different libcurl4-*-dev packages are libcurl built to use different TLS backends. They all still provide (almost) the same API. They are mutually exclusive and you link with libcurl with "-lcurl" no matter which of these packages you install.
curl/curl.h is a header file and is the same no matter which TLS backend you use.
libcurl is the name of the library.
When you communicate using HTTPS, FTPS or other TLS-using servers using certificates that are signed by CAs present in the store, you can be sure that the remote server really is the one it claims to be. this way you validate trust sites.
LibCurl have three flavours of TLS Backends.
Certificate Verification with NSS
Certificate Verification with OpenSSL
Certificate Verification with GnuTLS
The three of them are libraries for establish a secure link and validate trust CA Certificates but each library has is own features, pros and cons.
OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them. It provides a simple C language application programming interface (API) to access the secure communications protocols as well as APIs to parse and write X.509, PKCS #12, and other required structures.
Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications. Applications built with NSS can support SSL v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards.
Something very important is that when programming you must select a single library to work with since it is not possible to combine them.