apache_1.3.37 + mod_ssl-2.8.28-1.3.37 + openssl-0.9.8e + php-4.4.7 + mm-1.4.2 + mysql-4.1.22

Tarball Compiling

openssl-0.9.8e
sh config no-idea no-threads -fPIC && make && make test

mm-1.4.2
./configure –disable-shared && make

mod_ssl-2.8.28-1.3.37
./configure –with-apache=../apache_1.3.37 –with-ssl=../openssl-0.9.8e –with-mm=../mm-1.4.2 –prefix=/usr/local/apache/ && cd ../apache_1.3.37

apache_1.3.37

[1.] ./configure –prefix=/usr/local/apache –enable-module=most –enable-shared=max && make 
   
   [Q1:] apache_1.3.37]# make

gcc -c  -I../../os/unix -I../../include   -DLINUX=22 -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite `../../apaci` -fpic -DSHARED_MODULE mod_auth_dbm.c && mv mod_auth_dbm.o mod_auth_dbm.lo
mod_auth_dbm.c:42:18: 錯誤:ndbm.h:沒有此一檔案或目錄
mod_auth_dbm.c: 在函式 「get_dbm_pw」 中:
mod_auth_dbm.c:110: 錯誤:「DBM」 未宣告 (在此函式內第一次使用)
mod_auth_dbm.c:110: 錯誤:(即使在一個函式內多次出現,每個未宣告的識別碼在其
mod_auth_dbm.c:110: 錯誤:所在的函式內只報告一次。)
mod_auth_dbm.c:110: 錯誤:「f」 未宣告 (在此函式內第一次使用)
mod_auth_dbm.c:111: 錯誤:「datum」 未宣告 (在此函式內第一次使用)
mod_auth_dbm.c:111: 錯誤:expected 「;」 before 「d」
mod_auth_dbm.c:114: 錯誤:「q」 未宣告 (在此函式內第一次使用)
mod_auth_dbm.c:128: 錯誤:「d」 未宣告 (在此函式內第一次使用)
make[4]: *** [mod_auth_dbm.so] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/root/apache_1.3.37/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/root/apache_1.3.37'
make: *** [build] Error 2

   [A1:] apt-get install gdbm-devel && make clean && ./configure  xxx

[2.] 建立認證 KEY,跟著其提示設定
make certificate 

[3.] make install

[4.] echo "Include /usr/local/apache/conf/ssl.conf" >> /usr/local/apache/conf/httpd.conf

[5.] 預設並沒有 listen 80 port
echo "Listen 80" >> /usr/local/apache/conf/httpd.conf

[6.] 建立一 script讓 ssl自已輸入密碼
echo "#!/bin/bach" > /usr/local/apache/bin/sslpasswd && echo "echo 123456" >> /usr/local/apache/bin/sslpasswd

[7.] vi Include /usr/local/apache/conf/ssl.conf

LoadModule ssl_module         libexec/libssl.so

Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog exec:/usr/local/apache/bin/sslpasswd
SSLSessionCache dbm:logs/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:logs/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

<VirtualHost *:443>
    DocumentRoot "/usr/local/apache/htdocs2/"
    ServerName ssorc.tw:443

    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn

    SSLEngine On
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl.crt/server.crt
    SSLCertificateKeyFile conf/ssl.key/server.key
        <Files ~ ".(cgi|shtml|phtml|php3?|php|inc)$">
            SSLOptions +StdEnvVars
        </Files>
        <Directory "/usr/local/apache/cgi-bin">
            SSLOptions +StdEnvVars
        </Directory>
    SetEnvIf User-Agent ".*MSIE.*"
            nokeepalive ssl-unclean-shutdown
            downgrade-1.0 force-response-1.0
    CustomLog logs/ssl_request_log
              "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
</VirtualHost>

   另一編譯流程
   apache_1.3.37
   ./configure –prefix=/usr/local/apache –enable-module=most –enable-shared=max && make && make install

   openssl-openssl-0.9.8e
   ./config –prefix=/usr/local –openssldir=/usr/local/openssl && make && make install

   mod_ssl-2.8.28-1.3.37
   ./configure –with-apxs=/usr/local/apache/bin/apxs –with-ssl && make && make install && make distclean

   (需自已建立 KEY檔)

mysql-4.1.22
[1.] 新增使用者
groupadd mysql && useradd -g mysql mysql -d /usr/local/mysql 

[2.] 編譯
./configure –prefix=/usr/local/mysql && make && make install
   [Q:]

../depcomp: line 512: exec: g++: not found
make[2]: *** [my_new.o] Error 127
make[2]: Leaving directory `/root/mysql-4.1.22/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/mysql-4.1.22'
make: *** [all] Error 2

   [A:] apt-get install gcc-c++

[3.] 複設設定檔
cp support-files/my-medium.cnf /etc/my.cnf

[4.] 初使化
cd /usr/local/mysql/bin && ./mysql_install_db –user=mysql

[5.] 權限
chown -R root .
chown -R mysql var
chown -R mysql .

[6.] 啟動
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

[5.] SQL bench
apt-get install perl-DBI perl-DBD-MySQL && ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock &&  cd /usr/local/mysql/sql-bench ; perl run-all-tests

[6.] 改 ROOT 密碼
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'

php-4.4.7
[1.] ./configure –with-apxs=/usr/local/apache/bin/apxs –with-mysql=/usr/local/mysql
[2.] apt-get install flex
[3.] make && make install
[4.] cp php.ini-dist /usr/local/lib/php.ini
[5.] vi /usr/local/apache/conf/httpd.conf

LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

ref: http://www.wayhorn.com/node/56

Related posts 相關文章
openssl 解開 pfx 出現錯誤
More...
php 版本週期
More...
GitLab 17.7 使用 openssl 3 與 tls 1.2
More...
使用 static-php-cli 打包 PHP 為獨立執行檔
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。