LoginSignup
0
0

More than 5 years have passed since last update.

[メモ] CentOS4.9/RHEL4(i386)で、LAMPP(5.6.23 2016-06-28)を動かす

Posted at

phpinfo()にて、

System: Linux localhost.localdomain 2.6.9-103.ELsmp #1 SMP Fri Dec 9 04:31:51 EST 2011 i686

image.png

概要

  • 古いLinuxで、xamppを動かす。

    [vagrant@localhost ~]$ uname -a
    Linux localhost.localdomain 2.6.9-103.ELsmp #1 SMP Fri Dec 9 04:31:51 EST 2011 i686 i686 i386 GNU/Linux
    
  • xampp-linux-5.6.23-0-installer.run (2016-06-28) が32bit対応版最後のリリースなようなので、これを使う。(以降は、linuxは、64bitのみ. xampp-linux-x64-xxx)

  • ただし、そのまま実行すると、error while loading shared libraries: requires glibc 2.5 or later dynamic linkerと怒られる

  • 対応したglibcなどのライブラリを /li1 に入れて、実行ファイル内の /lib/ld-linux.so.2/li1/ld-linux.so.2 に書き換える

環境

手順

  1. xamppをインストールする
    sudo ./xampp-linux-5.6.23-0-installer.run

    参考
    [vagrant@localhost ~]$ sudo ./xampp-linux-5.6.23-0-installer.run
    ----------------------------------------------------------------------------
    Welcome to the XAMPP Setup Wizard.
    ----------------------------------------------------------------------------
    Select the components you want to install; clear the components you do not want
    to install. Click Next when you are ready to continue.
    XAMPP Core Files : Y (Cannot be edited)
    XAMPP Developer Files [Y/n] :n
    Is the selection above correct? [Y/n]: y
    ----------------------------------------------------------------------------
    Installation Directory
    XAMPP will be installed to /opt/lampp
    Press [Enter] to continue:
    ----------------------------------------------------------------------------
    Setup is now ready to begin installing XAMPP on your computer.
    Do you want to continue? [Y/n]: y
    ----------------------------------------------------------------------------
    Please wait while Setup installs XAMPP on your computer.
     Installing
     0% ______________ 50% ______________ 100%
     #########################################
    ----------------------------------------------------------------------------
    Setup has finished installing XAMPP on your computer.
    [vagrant@localhost ~]$
    
  2. glibcのインストール (tools482-lib.tar.gz)

    コピペ
    sudo tar zxf ./tools482-lib.tar.gz -C /
    sudo ln -sf /opt/tools482/ /tools482
    sudo ln -sf /opt/tools482/lib /li1
    
  3. xamppの実行ファイルを書き換える

    こぴぺ
    cd /opt/lampp/
    for i in bin/* sbin/* ; do echo $i ; sudo sed -e 's@/lib/ld-linux.so.2@/li1/ld-linux.so.2@g' -i $i; done
    
  4. lamppスタート
    sudo /opt/lampp/lampp start

    実行例
    [vagrant@localhost ~]$ sudo /opt/lampp/lampp start
    Starting XAMPP for Linux 5.6.23-0...
    XAMPP: Starting Apache...ok.
    XAMPP: Starting MySQL...ok.
    XAMPP: Starting ProFTPD...ok.
    [vagrant@localhost ~]$
    
  5. ファイヤーウォールを切る

    Stop_Firewall
    sudo /etc/rc.d/init.d/iptables stop
    sudo chkconfig iptables off
    chkconfig --list iptables
    
  6. ブラウザでアクセスする. http://__IP_ADDRESS__/
    image.png

  7. phpinfo()確認
    以下を実行して、http://__IP_ADDRESS__/phpinfo.phpにアクセス

    ファイル作成
    cat << 'EOF' | sudo tee /opt/lampp/htdocs/phpinfo.php
    <?php phpinfo(); ?>
    EOF
    cat /opt/lampp/htdocs/phpinfo.php
    

    image.png

    System: Linux localhost.localdomain 2.6.9-103.ELsmp #1 SMP Fri Dec 9 04:31:51 EST 2011 i686

  8. phpmyadmin
    以下を実行して、http://__IP_ADDRESS__/phpmyadminにアクセス

    phpmyadmin関係の設定のパーミッションを書き換える
    sudo sed -i -e 's/Require local/Require all granted/g' /opt/lampp/etc/extra/httpd-xampp.conf
    sudo /opt/lampp/lampp restart
    

    image.png

  9. lampp付属のcurlを使ってみる。

    Version比較
    CentOS4付属: curl 7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
    xampp  付属: curl 7.45.0 (i686-pc-linux-gnu)     libcurl/7.45.0 OpenSSL/1.0.2h zlib/1.2.8
    
    tlstest
    [vagrant@localhost ~]$ curl https://tlstest.paypal.com
    curl: (35) error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm
    [vagrant@localhost ~]$ /opt/lampp/bin/curl https://tlstest.paypal.com
    PayPal_Connection_OK[vagrant@localhost ~]$
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0