Hello CentOS forum users ! This is my first thread and i need your help. I will explain you how i installed OpenCA to CentOS 5.9 (Final) step by step. [VirtualBox]
192.168.1.22 box ip
dhcppc2 box hostname
Code:
useradd openca
yum -y update
yum install -y gcc gpg ftp links make unzip openssl-devel expat-devel httpd mod_ssl mysql-server db4-devel mysql-devel
perl -MCPAN -e shell
install CGI::Session Convert::ASN1 Digest::MD5 Digest::SHA1 Encode::Unicode IO::Socket::SSL IO::Stringy MIME::Base64 MIME::Lite MIME::Tools MailTool Net::Server URI XML::Twig XML::SAX::Base Digest::HMAC Authen::SASL Net::SSLeay
install G/GU/GUIDO/libintl-perl-1.20.tar.gz
install G/GB/GBARR/perl-ldap-0.4001.tar.gz
nano /etc/hosts ( added 192.168.1.22 dhcppc2 ra)
nano /etc/httpd/conf/httpd.conf (added ServerName dhcppc2)
mysql_install_db
nano /etc/my.cnf (added skip-bdb at [mysqld] section)
service mysqld start
mysqladmin -u root password 'password'
mysqladmin -u root -h dhcppc2 password 'password'
mysql -p
create database openca;
GRANT create,drop,select,delete,insert,update ON openca.* TO 'openca_u'@'localhost' IDENTIFIED by 'database_password';
GRANT create,drop,select,delete,insert,update ON openca.* TO 'openca_u'@'dhcppc2' IDENTIFIED by 'database_password';
FLUSH privileges;
exit;
service mysqld restart
cd /home/openca
mkdir downloads
cd downloads
wget http://www.openca.org/cgi-bin/download?target=openca-tools-1.3.0.tar.gz
tar xvzf openca-tools-1.3.0.tar.gz
cd openca-tools-1.3.0
./configure -prefix=/opt/openca -exec-prefix=/opt/openca -with-openca-prefix=/opt/openca -with-openca-user=openca -with-openca-group=openca
make
make install
cd ..
wget http://www.openca.org/cgi-bin/download?target=openca-base-1.1.1.tar.gz
tar xvzf openca-base-1.1.1.tar.gz
cd openca-base-1.1.1
./configure -prefix=/opt/openca -exec-prefix=/opt/openca -with-openca-prefix=/opt/openca -with-openca-user=openca -with-openca-group=openca -with-module-prefix=/opt/openca/modules with-web-host=dhcppc2 --with-httpd-user=apache -with-httpd-group=apache -with-openca-tools-prefix=/opt/openca
make
make install-offline
cd src/scripts
make install
chown -R apache:apache /opt/openca/var/openca/log/
nano /opt/openca/etc/openca/config.xml
changed <name>db_host</name> , <name>db_user</name> , <name>db_passwd</name> , with box host , openca_u and database password which was set above
also comment the "no dataexchange configuration" and uncomment the "acts as CA only" section.
cd /opt/openca/etc/openca
./configure_etc.sh
nano /opt/openca/modules/perl5/OpenCA/User.pm (added use constant ERR_USER_STATUS_UNKNOWN => [ 3100, "Could not determine user status" ]; )
nano /opt/openca/lib/openca/functions/initServer (replaced our (%AUTOCONF, $common_libs, $config, $users, $loginUser); with our (%AUTOCONF, $common_libs, $config, $curr_user, $users, $loginUser); and i18nGettext ( "OpenCA::User init error!" ); with i18nGettext ( "OpenCA::User init error!" ) )
service iptables save
service iptables stop
chkconfig iptables off
cd /opt/openca/etc/openca
./openca_start
and when trying to open http://192.168.1.22/pki/ca it gives me error !
OpenCA Error: Server is not online or does not accept requests (/opt/openca/var/openca/tmp/openca_socket - /opt/openca/var/openca/tmp/openca_socket). 0
log file stderr.log at /opt/openca/var/openca/log
Code:
Process Backgrounded
2013/03/01-01:51:08 OpenCA::Server (type Net::Server::Fork) starting! pid(4144)
Binding to UNIX socket file /opt/openca/var/openca/tmp/openca_socket using SOCK_STREAM
Setting gid to "48 48"
Setting uid to "48"
and
Code:
bash-3.2$ id
uid=48(apache) gid=48(apache) groups=48(apache) context=root:system_r:unconfined_t:SystemLow-SystemHigh
Can someone help me ? Thanks !