Thursday, February 27, 2014

"No recognized SSL/TLS toolkit detected" and "No acceptable C compiler found in PATH" errors

Hello, everyone!

My newly Linux RedHat6.2 installed machine frequently face the problems when I am trying to install Apache HTTPD. The problems are

1. No recognized SSL/TLS toolkit detected
2. No acceptable C compiler found in PATH

I will describe the further package should be installed before continue Apache HTTPD installation in case of facing the above errors.

No recognized SSL/TLS toolkit detected

Solution: Install openssl-devel-1.0.0-20.el6.x86_64.rpm
Dependency package:
  • zlib-devel-1.2.3-27.el6.x86_64.rpm
  • krb5-devel-1.9-22.el6.x86_64.rpm
  • keyutils-libs-devel-1.4-3.el6.x86_64.rpm
  • libcom_err-devel-1.41.12-11.el6.x86_64.rpm
  • libselinux-devel-2.0.94-5.2.el6.x86_64.rpm
  • libsepol-devel-2.0.41-4.el6.x86_64.rpm
 Installation Sequence :
  1. libsepol-devel
  2. keyutils-libs-devel, libcom_err-devel, libselinux-devel
  3. zlib-devel, krb5-devel
  4. openssl-devel

No acceptable C compiler found in PATH

Solution: Install gcc-c++-4.4.6-3.el6.x86_64.rpm
Dependency package:
  • gcc-c++-4.4.6-3.el6.x86_64.rpm
  • gcc-4.4.6-3.el6.x86_64.rpm
  • cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
  • ppl-0.10.2-11.el6.x86_64.rpm   
  • glibc-devel-2.12-1.47.el6.x86_64.rpm
  • glibc-headers-2.12-1.47.el6.x86_64.rpm
  • kernel-headers-2.6.32-220.el6.x86_64.rpm
  • cpp-4.4.6-3.el6.x86_64.rpm
  • mpfr-2.4.1-6.el6.x86_64.rpm
  • libstdc++-devel-4.4.6-3.el6.x86_64.rpm
Installation Sequence:
  1. ppl-0.10.2-11.el6.x86_64.rpm, kernel-headers-2.6.32-220.el6.x86_64.rpm, mpfr-2.4.1-6.el6.x86_64.rpm, libstdc++-devel-4.4.6-3.el6.x86_64.rpm
  2. cpp-4.4.6-3.el6.x86_64.rpm, glibc-headers-2.12-1.47.el6.x86_64.rpm, cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
  3. glibc-devel-2.12-1.47.el6.x86_64.rpm
  4. gcc-4.4.6-3.el6.x86_64.rpm
  5. gcc-c++-4.4.6-3.el6.x86_64.rpm

For as I recommend in sequence because some package has dependency package.

Hope this may useful to who is facing the same problem as mine. :D

How-to import the SSL Certificate (renewal SSL Cert)

Hello, everyone!

I stuck in SSL certification for almost a week until I found the solution how to import the SSL key. Below is my solution.

My background
  • OS : Linux RedHat 6.2
  • Web Server : Apache OpenSSL, Apache Tomcat
  • This is renewal.

For CSR generation, I will not mention much at here because it is just a command and key in the information of your organization. Anyway, this is the brief steps.

1. Create the new key
# openssl genrsa -des3 -out <key_name.key> 2048

2. Generate CSR file
# openssl req -new -key <key_name.key> -out <csr_name.csr>

3. Remove passphrase
# cp -p <key_name.key> <key_name.key.org>
# openssl rsa -in <key_name.key.org> -out <key_name.key>

4. After I send the CSR file to verify, they will send the download URL for me to get the new SSL certification. I will get 3 files totally :-
- certificate file (sslcert.crt)
- certificate chain file (ca.crt)
- certificate root file (root.crt)

Then, I grab all above 3 files and <key_name.key> into a tar file, upload to the server which I want to renewal the SSL certificate.

5. Backup your old certificate files. (tar or copy to the new filename, or any method you preferred)

6.1 Apache OpenSSL
Check the below variables and put the new certificate files into the same path and name.
- SSLCertificateFile (sslcert.crt)
- SSLCertificateKeyFile (key_name.key)
- SSLCertificateChainFile (ca.crt)
The config file is located at <apache_home>/conf/httpd.conf or <apache_home>/conf/extra/httpd-ssl.conf

6.2 Apache Tomcat
6.2.1 Generate new CA file
# cat ca.crt root.crt > chainCA.crt

6.2.2 Generate new PKCS12 file
# openssl pkcs12 -export -in <sslcert.crt> -inkey <key_name.key> -out <p12_name.p12> -CAfile <chainCA.crt> -caname root -chain

Enter the correct passphrase.

6.2.3 Put the newly created PKCS12 key file into the path which in the config file
Configuration file is located at <apacheTomcat_home>/conf/server.xml

7. Restart your web server
7.1 Apache OpenSSL
# <apache_home>/bin/apachectl restart
7.2 Apache Tomcat
# /etc/init.d/tomcat restart or service tomcat restart

8. Verify your certificate on the web browser.

All is done!

Hope this article may be useful for anyone. ^^