apache + php + JDK + tomcat + ssl ġ.
1. java JDK ġ. ( java α )
(file>root)/export/solo/apachessl# chmod +x jdk-1_5_0_09-solaris-sparc.sh
- root .
- sun Ʈ
chmod +x Ͽ .
(file>root)/export/solo/apachessl# ./jdk-1_5_0_09-solaris-sparc.sh
- ϸ Ұ yes | no Է .
- Ϸ Ǹ 丮 .
jdk1.5.0_09/
- 丮 ϴ ġ ̵.
(file>root)/export/solo/apachessl# mv jdk1.5.0_09 /usr/local/jdk1.5.0_09
- /usr/local/ ؿ jdk1.5.0_09 ̵ .
2. openssl ġ.
- solaris Ű ġ Ȯ .
(file>root)/export/solo/apachessl# pkginfo | grep openssl
application SMCossl98b openssl
- pkginfo ýۿ openssl ġ Ǿ ִ Ȯ.
- ġ Ǿ
www.sunfreeware.com ش solaris ´ openssl ٿε
- ٿ Ű .
(file>root)/export/solo/apachessl#gunzip openssl-0.9.8d-sol8-sparc-local.gz
(file>root)/export/solo/apachessl#pkgadd -d openssl-0.9.8d-sol8-sparc-local
- Ű ġ. Ű ġ Ǹ ⺻ 丮 ġ
/usr/local/ssl ---> ⺻ ġ
- openssl ġ.
(file>root)/export/solo/apachessl# tar xvf openssl-0.9.7c.tar.gz
(file>root)/export/solo/apachessl# cd openssl-0.9.7c/
(file>root)/export/solo/apachessl# ./config --prefix=/usr/local/ssl
(file>root)/export/solo/apachessl# make
(file>root)/export/solo/apachessl# make install
3. zlib ġ.
(file>root)/export/solo/apachessl# pkginfo | grep zlib
system SUNWzlib The Zip compression library
- pkginfo ýۿ zlib ġ Ǿ ִ Ȯ.
- ġ Ǿ
www.sunfreeware.com ش solaris ´ openssl ٿε
- Ű ġ /usr/local/lib
- ٿ Ű .
(file>root)/export/solo/apachessl#gunzip zlib-1.2.3-sol8-sparc-local.gz
(file>root)/export/solo/apachessl#pkgadd -d zlib-1.2.3-sol8-sparc-local
- zlib ġ.
(file>root)/export/solo/apachessl# tar zxvf zlib-1.1.4.tar.gz
(file>root)/export/solo/apachessl# cd zlib-1.1.4/
(file>root)/export/solo/apachessl# ./configure --prefix=/usr/local/zlib
(file>root)/export/solo/apachessl# make
(file>root)/export/solo/apachessl# mkdir -p "/usr/local/zlib/include" "/usr/local/zlib/lib"
(file>root)/export/solo/apachessl# make install
4. /dev/random ġ
- ٿε
Solaris 8 ANDIrand-0.7-5.8-sparc-1.pkg http://www.cosy.sbg.ac.at/~andi/SUNrand/
(file>root)/export/solo/apachessl# pkgadd -d ANDIrand-0.7-5.8-sparc-1.pkg
----- gcc Ű ġ Ȯ. -----
Ű ġ gcc gcc 缳ġ
ٲ .
5. apache ġ.
- \ ȣ Ȯ.
- ٿε
2.0.48 httpd-2.0.48.tar.gz http://httpd.apache.org/
- ġ.
(file>root)/export/solo/apachessl#gunzip httpd-2.0.59.tar.gz
(file>root)/export/solo/apachessl#tar xvf httpd-2.0.59.tar
(file>root)/export/solo/apachessl#cd httpd-2.0.59
(file>root)/export/solo/apachessl/http-2.0.59#./configure --prefix=/usr/local/apache2.0.59 --with-mpm=prefork --enable-ssl --with-ssl=/usr/local/ssl \
--enable-deflate --with-z=/usr/local/lib --enable-dav --enable-dav-fs --enable-auth-digest --enable-info --enable-rewrite --enable-vhost-alias\
--enable-expires --enable-mime-magic
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... sparc-sun-solaris2.8
checking host system type... sparc-sun-solaris2.8
checking target system type... sparc-sun-solaris2.8
6. libxml ġ
- ٿε
2.6.1 libxml2-2.6.1.tar.gz http://xmlsoft.org/
- ġ.
(file>root)/export/solo/apachessl# tar zxvf libxml2-2.6.1.tar.gz
(file>root)/export/solo/apachessl# cd libxml2-2.6.1/
(file>root)/export/solo/apachessl/libxml2-2.6.1# ./configure --prefix=/usr/local/libxml
(file>root)/export/solo/apachessl/libxml2-2.6.1# make
(file>root)/export/solo/apachessl/libxml2-2.6.1# make install
---- ġ conf/httpd.conf
(file>root)/export/solo/apachessl# cd /usr/local/apache2.0.59/conf
(file>root)/usr/local/apache2.0.59/conf# vi ./httpd.conf
- Servername ----> .
- User nobody ؿ ߰
-> Group nobody
# Group #-1
- AddDefaultCharSet EUC-KR
ġ ۵ϴ Ȯ
(file>root)/usr/local/apache2.0.59/conf#cd /usr/local/apache2.0.59/bin
(file>root)/usr/local/apache2.0.59/bin# ./apachectl start
(file>root)/usr/local/apache2.0.59/bin#ps -ef | grep apache ----> Ȯ.
(file>root)/usr/local/apache2.0.59#mkdir -p php/lib
7. php ġ.
- ٿε
5.0.0. Beta2 php-5.0.0b2.tar.gz http://www.php.net
- ġ.
(file>root)/export/solo/apachessl# tar zxvf php-5.0.0b2.tar.gz
(file>root)/export/solo/apachessl# cd php-5.0.0b2/
(file>root)/export/solo/apachessl/php-5.0.0b2#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.0.59/bin/apxs --with-exec-dir=/usr/local/apache2.0.59/php/bin --enable-track-vars \
--with-config-file-path=/usr/local/apache2.0.59/conf --with-libxml-dir=/usr/local/libxml\
--with-mod-charset --with-language=korean --with-charset=euc_kr --enable-versioning --without-gd2
(file>root)/export/solo/apachessl/php-5.0.0b2# make
(file>root)/export/solo/apachessl/php-5.0.0b2# make install
(file>root)/export/solo/apachessl/php-5.0.0b2# cp php.ini-dist /usr/local/apache2.0.59/php/lib/php.ini
- httpd.conf . ġ php module .
/usr/local/apache2.0.59/conf/httpd.conf vi Ʒ κ ߰մϴ.
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
ġ PHP Ǿ Ȯմϴ
(file>root)/usr/local/php# cd /usr/local/apache2.0.59/bin
(file>root)/usr/local/apache2.0.59/bin# ./apachectl restart
8. mod_jk2 ()
- ٿε
(mod_jk2 2.0.2) jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43.tar.gz http://jakarta.apache.org/builds/
- ġ.
(file>root)/export/solo/apachessl# gunzip jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43.tar.gz
(file>root)/export/solo/apachessl# tar xvf jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43.tar
(file>root)/export/solo/apachessl#cd jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43
- module .
mod_jk2-2.0.43.so ----> /usr/local/apache2.0.59/modules/
(file>root)/export/solo/apachessl/jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43#cp mod_jk2-2.0.43.so /usr/local/apache2.0.59/modules/
9. tomcat ġ
- ٿε
5.0.14 Alpha jakarta-tomcat-5.0.14.tar.gz http://jakarta.apache.org/site/binindex.cgi
- ġ.
(file>root)/export/solo/apachessl#gunzip jakarta-tomcat-5.0.7.tar.gz
(file>root)/export/solo/apachessl#tar xvf jakarta-tomcat-5.0.7.tar
(file>root)/export/solo/apachessl# mv jakarta-tomcat-5.0.7/ /usr/local/tomcat_5.0.7
(file>root)/export/solo/apachessl#cd /usr/local/
- tomcat .
(file>root)/usr/local#chown -R solo:ready tomcat_5.0.7
- tomcat ȯ ũƮ .
- tomcat .cshrc shell .
ȯ .cshrc ȯ .
vi .cshrc
setenv JAVA_HOME /usr/local/jdk1.5.0_09 ---> ڿ ִ jdk1.5.0_09 ġ 丮 θ.
setenv CATALINA_HOME /usr/local/tomcat_5.0.7
set path=($JAVA_HOME/bin:$CATALINA_HOME/bin ) --- set path κп .
- tomcat .
(file>solo)/usr/local/tomcat_5.0.28% cd bin
(file>solo)/usr/local/tomcat_5.0.28/bin% ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat_5.0.28
Using CATALINA_HOME: /usr/local/tomcat_5.0.28
Using CATALINA_TMPDIR: /usr/local/tomcat_5.0.28/temp
Using JAVA_HOME: /usr/local/jdk1.5.0_09
(file>solo)/usr/local/tomcat_5.0.28/bin%
(file>solo)/usr/local/tomcat_5.0.28/bin% ps -ef | grep java ----> Ȯ.
solo 11118 1 41 11:04:36 pts/2 0:22 /usr/local/jdk1.5.0_09/bin/java -Djava.endorsed.dirs=/usr/local/tomcat_5.0.28/c
- tomcat ȯ .
(file>solo)/usr/local/tomcat_5.0.28/conf%vi server.xml Ʒ
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
----> Ʒ ߰.... κ ... ( 51° )
<Service name="Catalina">
<Connector port="8009" enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/>
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/>
</Host>
</Engine>
</Service>
</Server>
- channelSocket.port=8009 ----> ߰
(file>solo)/usr/local/tomcat_5.0.28/conf% vi jk2.properties
channelSocket.port=8009 ----> ߰.
- workers2.properties .
/www/httpd/conf/workers2.properties Ƿ Ʒ Ͽ ϴ
(file>root)/usr/local/apache2.0.59/conf#vi workers2.properties
- workers2.properties .
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
[uri:/tomcat-docs/*]
[uri:/jsp-examples/*]
[uri:/servlets-examples/*]
[shm:]
disabled=1
- LoadModule jk2_module modules/mod_jk2-2.0.43.so ߰.
(file>root)/usr/local/apache2.0.59/conf#vi httpd.conf
LoadModule jk2_module modules/mod_jk2-2.0.43.so ----
- apache + tomcat Ȯ.
Ǿ Ʒ ּҷ Ȯ ϴ
doc :
http://localhost/tomcat-docs/
JSP :
http://localhost/jsp-examples/
Servlet :
http://localhost/servlets-examples/
10. mod_perl ġ
- ٿε
1.99_11 mod_perl-2.0-current.tar.gz http://perl.apache.org/
- Ҷ perl ش Ű .
(file>root)/export/solo/apachessl#pkginfo | grep perl
Ǵ http://www.activestate.com/Products/ActivePerl/ ο perl ġ.
- ġ.
(file>root)/export/solo/apachessl#gunzip mod_perl-2.0-current.tar.gz
(file>root)/export/solo/apachessl#tar xvf mod_perl-2.0-current.tar
(file>root)/export/solo/apachessl#cd mod_perl-2.0.2/
(file>root)/export/solo/apachessl/mod_perl-2.0.2#perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2.0.59 MP_INST_APACHE2=1
(file>root)/export/solo/apachessl/mod_perl-2.0.2# make
(file>root)/export/solo/apachessl/mod_perl-2.0.2# make install
(file>root)/export/solo/apachessl/mod_perl-2.0.2#perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2.0.59 MP_INST_APACHE2=1
....
Unknown Option: MP_INST_APACHE ð.... .
(file>root)/export/solo/apachessl/mod_perl-2.0.2#perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2.0.59
- LoadModule perl_module modules/mod_perl.so .
conf/httpd.conf Ͽ ġ ۽ ö մϴ
LoadModule perl_module modules/mod_perl.so
ġ mod_perl Perl ߴ Ȯմϴ
(file>root)/usr/local/apache2.0.59/conf#vi httpd.conf
LoadModule perl_module modules/mod_perl.so ----
11. SSL .
- ѹ .
(file>root)/# cd /usr/local/ssl/bin
(file>root)/usr/local/ssl/bin# ./openssl md5 * > rand.data
(file>root)/usr/local/ssl/bin#
- Ű .
(file>root)/usr/local/ssl/bin# ./openssl genrsa -rand rand.data -des3 1024 > key.pem
144 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
........++++++
........++++++
e is 65537 (0x10001)
Enter pass phrase: ----> йȣ .
Verifying - Enter pass phrase:
(file>root)/usr/local/ssl/bin# ---> key.pem Ȯ.
- Ű ̿Ͽ CSR .
(file>root)/usr/local/ssl/bin#./openssl req -new -key key.pem > csr.pem
Enter pass phrase for key.pem: ---> Է йȣ Է
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:KR --->
State or Province Name (full name) [Some-State]:seoul ---> ̸
Locality Name (eg, city) []:gangnamgu ---> , , ̸
Organization Name (eg, company) [Internet Widgits Pty Ltd]:readysystem ȸ
Organizational Unit Name (eg, section) []:system team μ
Common Name (eg, YOUR name) []:bigcom.playebook.com URL
Email Address []:blackowl@readysystem.co.kr ̸ ּ
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
(file>root)/usr/local/ssl/bin#
(file>root)/usr/local/ssl/bin#
Ϸ csr.pem Ȯ.
(file>root)/usr/local/ssl/bin# more csr.pem
-----BEGIN CERTIFICATE REQUEST-----
MIIB6DCCAVECAQAwgacxCzAJBgNVBAYTAktSMQ4wDAYDVQQIEwVzZW91bDESMBAG
A1UEBxMJZ2FuZ25hbWd1MRQwEgYDVQQKEwtyZWFkeXN5c3RlbTEUMBIGA1UECxML
c3lzdGVtIHRlYW0xHTAbBgNVBAMTFGJpZ2NvbS5wbGF5ZWJvb2suY29tMSkwJwYJ
KoZIhvcNAQkBFhpibGFja293bEByZWFkeXN5c3RlbS5jby5rcjCBnzANBgkqhkiG
9w0BAQEFAAOBjQAwgYkCgYEA30RlTpS1T8+gUJUSLO8P7ybmFX7tipQwMqlJC+ld
43nKyB9QhERbfCGMkOckP8M+/f5upLXL7sOd4sLJfCBH6wOTEyV4OpnIx2bgEkAu
Zvrtgvf860RVmI/6aJTmYxxQn4fQUbOSflveYbrr4CbH6yE9Olxw/VX9DMKKd85u
5zMCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4GBADvQXZs7RWhOBCkc8aovTnabcHya
bZ+bOsRsI08VViBNhb3FGvyAWPp6gRQjTqPafJUfEJHXvLGYQpwIF2jziVEKfXxU
AbgbzOkEhCGtnu7L8Papv21fF0YFZ+2NKZccCZ8heex9H4QHoCvXrsdzItZRuR7m
YwZ59Z+E8yUHVmdQ
-----END CERTIFICATE REQUEST-----
(file>root)/usr/local/ssl/bin#
12. http://www.crosscert.com Ʈ ޱ.
Ʈ Ʈ ٷ ߱ ֽϴ.
߱ ޱ ؼ csr.pem ̿Ͽ ߱ ϴ.
Ʈ E-mail ް ... ̸ ʿ ش Ű ֽϴ.
̰ ̿Ͽ ؾ մϴ.
13. SSL .
- Ϸ ȣ vi ⸦ ̿Ͽ cert.pem .
(file>root)/usr/local/apache2.0.59/conf#vi cert.pem
- SSL ssl.conf .
ġ /usr/local/apache2.0.59/conf/ssl.conf
̷ ڵ .
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "/usr/local/apache2.0.59/htdocs"
ServerName www.example.com:443 ---> ش .
ServerAdmin you@example.com ----> .
ErrorLog /usr/local/apache2.0.59/logs/error_log
TransferLog /usr/local/apache2.0.59/logs/access_log
SSLCertificateFile /usr/local/apache2.0.59/conf/ssl.crt/server.crt ---> .
SSLCertificateFile /usr/local/apache2.0.59/conf/ssl.crt/cert.pem
SSLCertificateKeyFile /usr/local/apache2.0.59/conf/ssl.key/server.key ---> .
SSLCertificateKeyFile /usr/local/apache2.0.59/conf/ssl.key/key.pem
key.pem /usr/local/ssl/bin key.pem .
cp /usr/local/ssl/bin/key.pem /usr/local/apache2.0.59/conf/ssl.key
- SSL ġ Ϸ &
(file>root)/usr/local/apache2.0.59/bin# ./apachectl startssl
Apache/2.0.59 mod_ssl/2.0.59 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.
Server bigcom.playebook.com:443 (RSA)
Enter pass phrase:
Ok: Pass Phrase Dialog successful.
(file>root)/usr/local/apache2.0.59/bin#
- Ȯ.
ش Էؼ Ȯ.