Orange Pi 4B

OS/Orange PI 2020. 11. 25. 01:53 Posted by 파란크리스마스

출처

Linux 정보 확인

orangepi@orangepi4:~$ cat /etc/issue
Debian GNU/Linux 9 \n \l

emmc에 linux 설치

완료 후 SD메모리를 제거하고 재부팅

orangepi@orangepi4:~$ sudo install_to_emmc
 
Mon Dec 14 16:05:52 UTC 2020
===============================
Installing Linux system to emmc
===============================
 
 
WARNING: EMMC WILL BE ERASED !, Continue (y/N)?  y
Formating partition, please wait ...
GPT fdisk (gdisk) version 1.0.1
 
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present
 
Found valid GPT with protective MBR; using GPT.
 
Command (? for help): 
Expert command (? for help): Partition number (1-4): Enter the partition's new unique GUID ('R' to randomize): New GUID is 615E0000-0000-4B53-8000-1D28000054A9
 
Expert command (? for help): 
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
 
Do you want to proceed? (Y/N): OK; writing new GUID partition table (GPT) to /dev/mmcblk1.
The operation has completed successfully.
  linux partition formated.
Instaling u-boot to EMMC ...
Instaling boot.img to EMMC ...
 
Mounting EMMC partitions...
 
Copying file system to EMMC ...
 
 
*******************************
Linux system installed to EMMC.
*******************************

IP 확인

orangepi@orangepi4:~$ ip addr show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 02:fa:df:50:80:7d brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 6567sec preferred_lft 6567sec
    inet6 fe80::2aac:17b:6b35:953a/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0:  mtu 1500 qdisc pfifo_fast state DORMANT group default qlen 1000
    link/ether d4:12:43:26:11:e0 brd ff:ff:ff:ff:ff:ff

한글폰트 설치

pi@orangepi4:~$ sudo apt install fonts-nanum font-nanum-coding fonts-nanum-extra

원격 데스크톱 설치

일반적으로 Linux 서버에는 기본적으로 데스크톱 환경이 설치되어 있지 않습니다. 첫 번째 단계는 X11과 Xrdp의 백엔드 역할을 할 데스크톱 환경을 설치하는 것입니다.

데비안 저장소에서 사용할 수있는 여러 데스크톱 환경 (DE)이 있습니다. 여기에서는 Xfce를 설치할 것입니다. 빠르고 안정적이며 가벼운 데스크톱 환경으로 원격 서버에서 사용하기에 이상적입니다. Gnome과 같은 다른 데스크탑 환경을 선호하는 경우 Xfce 대신 설치할 수 있습니다.

orangepi@orangepi4:~$ sudo apt update
orangepi@orangepi4:~$ sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

Xrdp 설치

orangepi@orangepi4:~$ sudo apt install xrdp

xrdp 서비스 상태 확인

orangepi@orangepi4:~$ sudo systemctl status xrdp
● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-12-22 14:37:39 UTC; 50s ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
 Main PID: 29490 (xrdp)
   CGroup: /system.slice/xrdp.service
           └─29490 /usr/sbin/xrdp

Dec 22 14:37:38 orangepi4 systemd[1]: Starting xrdp daemon...
Dec 22 14:37:38 orangepi4 systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or 
Dec 22 14:37:39 orangepi4 systemd[1]: Started xrdp daemon.
Dec 22 14:37:40 orangepi4 xrdp[29490]: (29490)(548437458944)[INFO ] starting xrdp with pid 29490
Dec 22 14:37:40 orangepi4 xrdp[29490]: (29490)(548437458944)[INFO ] listening to port 3389 on 0.0.0.0

~/.xsession 확인

orangepi@orangepi4:~$ cat ~/.xsession
xfce4-session

KDE 설치

KDE 데스크탑 설치

orangepi@orangepi4:~$ sudo apt -y install task-kde-desktop

Plasma 설정

KDE로 원격 데스크탑 실행시 설정

orangepi@orangepi4:~$ sudo echo "startkde" > ~/.xsession

댓글을 달아 주세요

Ubuntu 20.04 : PHP5 설치

Programming/Apache, PHP 2020. 11. 25. 00:43 Posted by 파란크리스마스

출처

필요 라이브러리 설치

bluesanta@Kubuntu:~$ sudo apt install libc-client2007e-dev libgdbm-dev libgmp-dev libkrb5-dev

libmcrypt 설치

bluesanta@Kubuntu:~$ wget http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
bluesanta@Kubuntu:~$ tar xvfz libmcrypt-2.5.8.tar.gz
bluesanta@Kubuntu:~$ cd libmcrypt-2.5.8/
bluesanta@Kubuntu:~/libmcrypt-2.5.8$ ./configure
bluesanta@Kubuntu:~/libmcrypt-2.5.8$ make
bluesanta@Kubuntu:~/libmcrypt-2.5.8$ sudo make install

mhash 설치

bluesanta@Kubuntu:~$ wget https://sourceforge.net/projects/mhash/files/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
bluesanta@Kubuntu:~$ tar xvfz mhash-0.9.9.9.tar.gz
bluesanta@Kubuntu:~$ cd mhash-0.9.9.9/
bluesanta@Kubuntu:~/mhash-0.9.9.9$ ./configure
bluesanta@Kubuntu:~/mhash-0.9.9.9$ make
bluesanta@Kubuntu:~/mhash-0.9.9.9$ sudo make install

FreeTDS 설치

bluesanta@Kubuntu:~$ wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-patched.tar.gz
bluesanta@Kubuntu:~$ tar xvfz freetds-patched.tar.gz
bluesanta@Kubuntu:~$ cd freetds-1.2.12/
bluesanta@Kubuntu:~/freetds-1.2.12$ ./configure -prefix=/usr/local/freetds --disable-odbc --disable-debug --enable-msdblib
bluesanta@Kubuntu:~/freetds-1.2.12$ make
bluesanta@Kubuntu:~/freetds-1.2.12$ sudo make install

freetype2 설치

bluesanta@Kubuntu:~$ wget https://downloads.sourceforge.net/freetype/freetype-2.10.4.tar.xz
bluesanta@Kubuntu:~$ tar xvf freetype-2.10.4.tar.xz
bluesanta@Kubuntu:~$ cd freetype-2.10.4/
bluesanta@Kubuntu:~/freetype-2.10.4$ ./configure --prefix=/usr --enable-freetype-config 
bluesanta@Kubuntu:~/freetype-2.10.4$ make -j4
bluesanta@Kubuntu:~/freetype-2.10.4$ sudo make install

openssl 설치

bluesanta@Kubuntu:~$ wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz
bluesanta@Kubuntu:~$ tar xvfz openssl-1.0.2u.tar.gz
bluesanta@Kubuntu:~$ cd openssl-1.0.2u
bluesanta@Kubuntu:~/openssl-1.0.2u$ ./config -fPIC shared --prefix=/opt/openssl-1.0.2u
bluesanta@Kubuntu:~/openssl-1.0.2u$ make -j4
bluesanta@Kubuntu:~/openssl-1.0.2u$ sudo make install
bluesanta@Kubuntu:~/openssl-1.0.2u$/opt/openssl-1.0.2u/bin/openssl version
OpenSSL 1.0.2u  20 Dec 2019

libcurl 설치

bluesanta@Kubuntu:~$ wget https://curl.haxx.se/download/curl-7.73.0.tar.gz
bluesanta@Kubuntu:~$ tar xvfz curl-7.73.0.tar.gz 
bluesanta@Kubuntu:~$ cd curl-7.73
bluesanta@Kubuntu:~/curl-7.73.0$ env PKG_CONFIG_PATH=/opt/openssl-1.0.2u/lib/pkgconfig ./configure --prefix=/opt/curl-7.73.0 --with-openssl
... 생략 ...
  SSL:              enabled (OpenSSL)
... 생략 ...
bluesanta@Kubuntu:~/curl-7.73.0$ make
bluesanta@Kubuntu:~/curl-7.73.0$ sudo make install
bluesanta@Kubuntu:~/curl-7.73.0$ sudo ln -s /opt/openssl-1.0.2u/lib/libssl.so.1.0.0 /usr/lib/libssl.so.1.0.0
bluesanta@Kubuntu:~/curl-7.73.0$ sudo ln -s /opt/openssl-1.0.2u/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.1.0.0
bluesanta@Kubuntu:~/curl-7.73.0$ /opt/curl-7.73.0/bin/curl --version
curl 7.73.0 (x86_64-pc-linux-gnu) libcurl/7.73.0 OpenSSL/1.0.2u zlib/1.2.11
Release-Date: 2020-10-14
Protocols: dict file ftp ftps gopher http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

PHP5 설치

1. PHP5 컴파일 오류 수정

오류 메시지

configure: error: Unable to locate gmp.h

해결방법

bluesanta@Kubuntu:~$ sudo ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h

2. PHP5 컴파일 오류 수정

오류 메시지

configure: error: wrong mysql library version or lib not found. Check config.log for more information.

해결방법

bluesanta@Kubuntu:~/php-5.6.40$ sudo ln -s /bluesanta/mysql-5.7.23/lib/libmysqlclient.so /bluesanta/mysql-5.7.23/lib/libmysqlclient_r.so

2. PHP5 컴파일 오류 회피

오류 메시지

/bin/bash: line 1: 3884732 세그멘테이션 오류 (core dumped) ` if test -x "/home/bluesanta/php-5.6.40/sapi/cli/php"; then /home/bluesanta/php-5.6.40/build/shtool echo -n -- "/home/bluesanta/php-5.6.40/sapi/cli/php -n"; if test "x" != "x"; then /home/bluesanta/php-5.6.40/build/shtool echo -n -- " -d extension_dir=/home/bluesanta/php-5.6.40/modules"; for i in bz2 zlib phar; do if test -f "/home/bluesanta/php-5.6.40/modules/$i.la"; then . /home/bluesanta/php-5.6.40/modules/$i.la; /home/bluesanta/php-5.6.40/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi; else /home/bluesanta/php-5.6.40/build/shtool echo -n -- "/home/bluesanta/php-5.6.40/sapi/cli/php"; fi;` -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' /home/bluesanta/php-5.6.40/ext/phar/build_precommand.php > ext/phar/phar.php
make: *** [Makefile:381: ext/phar/phar.php] 오류 139
make: *** 끝나지 않은 작업을 기다리고 있습니다....

configure 해당 옵션 제거

--with-imap=/usr/local/imap-2007f \
--with-imap-ssl \

PHP5 컴파일

bluesanta@Kubuntu:~$ wget https://www.php.net/distributions/php-5.6.40.tar.gz
bluesanta@Kubuntu:~$ tar xvfz php-5.6.40.tar.gz
bluesanta@Kubuntu:~$ bluesanta@Kubuntu:~$ cd php-5.6.40/
bluesanta@Kubuntu:~/php-5.6.40$ env PKG_CONFIG_PATH=/opt/openssl-1.0.2u/lib/pkgconfig \
./configure --prefix=/bluesanta/apps/php-5.6.40 \
--enable-fpm \
--with-apxs2=/bluesanta/apps/apache24_php5/bin/apxs \
--with-libdir=/lib \
--with-gettext \
--with-gmp \
--with-gd \
--with-jpeg-dir=/usr/local/jpeg \
--with-png-dir=/usr/local/lib \
--with-mcrypt=/usr/local/lib \
--with-iconv \
--with-freetype-dir=/usr/local/freetype \
--with-config-file-path=/usr/local/lib \
--enable-gd-native-ttf \
--enable-bcmath \
--enable-exif \
--with-mcrypt \
--with-zlib \
--with-bz2 \
--enable-mbstring \
--enable-opcache \
--with-openssl=/opt/openssl-1.0.2u \
--with-curl=/opt/curl-7.73.0/bin/curl \
--with-mysql-sock=/bluesanta/mysql-5.7.23/mysql.sock \
--with-mysqli=/bluesanta/mysql-5.7.23/bin/mysql_config \
--with-pdo-mysql=/bluesanta/mysql-5.7.23 \
--with-mysql \
--with-mssql=/usr/local/freetds \
--enable-pcntl \
--enable-mbregex \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-libxml-dir=/usr \
--with-kerberos \
--disable-debug \
--enable-soap \
--with-gdbm \
--enable-ftp \
--enable-calendar \
--enable-shmop \
--enable-inline-optimization \
--enable-sigchild \
--enable-sockets \
--enable-maintainer-zts
bluesanta@Kubuntu:~/php-5.6.40$ make -j4
 
... 생략 ...
 
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/local/freetds/lib/libsybdb.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: warning: libcrypto.so.1.1, needed by /usr/local/freetds/lib/libsybdb.so, may conflict with libcrypto.so.1.0.0
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/local/freetds/lib/libsybdb.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: warning: libcrypto.so.1.1, needed by /usr/local/freetds/lib/libsybdb.so, may conflict with libcrypto.so.1.0.0
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
directorytreeiterator.inc
clicommand.inc
directorygraphiterator.inc
invertedregexiterator.inc
pharcommand.inc
phar.inc
/usr/bin/ld: warning: libssl.so.1.1, needed by /usr/local/freetds/lib/libsybdb.so, may conflict with libssl.so.1.0.0
/usr/bin/ld: warning: libcrypto.so.1.1, needed by /usr/local/freetds/lib/libsybdb.so, may conflict with libcrypto.so.1.0.0
bluesanta@Kubuntu:~/php-5.6.40$ make test

PHP5 설치

bluesanta@Kubuntu:~/php-5.6.40$ make install
/bin/bash /home/bluesanta/php-5.6.40/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /home/bluesanta/php-5.6.40/modules
Installing PHP SAPI module:       apache2handler
/bluesanta/apps/apache24/build/instdso.sh SH_LIBTOOL='/bluesanta/apps/apache24/build/libtool' libphp5.la /bluesanta/apps/apache24/modules
/bluesanta/apps/apache24/build/libtool --mode=install install libphp5.la /bluesanta/apps/apache24/modules/
libtool: install: install .libs/libphp5.so /bluesanta/apps/apache24/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /bluesanta/apps/apache24/modules/libphp5.la
libtool: warning: remember to run 'libtool --finish /home/bluesanta/php-5.6.40/libs'
chmod 755 /bluesanta/apps/apache24/modules/libphp5.so
[activating module `php5' in /bluesanta/apps/apache24/conf/httpd.conf]
Installing shared extensions:     /bluesanta/apps/php-5.6.40/lib/php/extensions/no-debug-zts-20131226/
Installing PHP CLI binary:        /bluesanta/apps/php-5.6.40/bin/
Installing PHP CLI man page:      /bluesanta/apps/php-5.6.40/php/man/man1/
Installing PHP FPM binary:        /bluesanta/apps/php-5.6.40/sbin/
Installing PHP FPM config:        /bluesanta/apps/php-5.6.40/etc/
Installing PHP FPM man page:      /bluesanta/apps/php-5.6.40/php/man/man8/
Installing PHP FPM status page:   /bluesanta/apps/php-5.6.40/php/php/fpm/
Installing PHP CGI binary:        /bluesanta/apps/php-5.6.40/bin/
Installing PHP CGI man page:      /bluesanta/apps/php-5.6.40/php/man/man1/
Installing build environment:     /bluesanta/apps/php-5.6.40/lib/php/build/
Installing header files:           /bluesanta/apps/php-5.6.40/include/php/
Installing helper programs:       /bluesanta/apps/php-5.6.40/bin/
  program: phpize
  program: php-config
Installing man pages:             /bluesanta/apps/php-5.6.40/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /bluesanta/apps/php-5.6.40/lib/php/
[PEAR] Archive_Tar    - already installed: 1.4.4
[PEAR] Console_Getopt - already installed: 1.4.1
[PEAR] Structures_Graph- already installed: 1.1.1
[PEAR] XML_Util       - already installed: 1.4.3
[PEAR] PEAR           - already installed: 1.10.7
Wrote PEAR system config file at: /bluesanta/apps/php-5.6.40/etc/pear.conf
You may want to add: /bluesanta/apps/php-5.6.40/lib/php to your php.ini include_path
/home/bluesanta/php-5.6.40/build/shtool install -c ext/phar/phar.phar /bluesanta/apps/php-5.6.40/bin
ln -s -f phar.phar /bluesanta/apps/php-5.6.40/bin/phar
Installing PDO headers:           /bluesanta/apps/php-5.6.40/include/php/ext/pdo/




php.ini 복사

bluesanta@Kubuntu:~/php-5.6.40$ cp php.ini-production /bluesanta/apps/php-5.6.40/php.ini

libphp5.so 복사

bluesanta@Kubuntu:~/php-5.6.40$ cp /bluesanta/apps/apache24/modules/libphp5.so /bluesanta/apps/apache24_php5/modules/libphp5.so

/bluesanta/apps/apache24_php5/conf/httpd.conf 내용 추가

bluesanta@Kubuntu:~/php-5.6.40$ vi /bluesanta/apps/apache24_php5/conf/httpd.conf

#Listen 12.34.56.78:80
Listen 5050

# php 
LoadModule php5_module        modules/libphp5.so
PHPIniDir "/bluesanta/apps/php-5.6.40"

... 생략 ...

    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    AddHandler application/x-httpd-php .php4 .php .phtml .ph .inc

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    AddType application/x-httpd-php .php4 .php .phtml .ph .inc

</IfModule>

서비스 등록 파일 apache2_php5.service 생성

bluesanta@Kubuntu:~$ cd /bluesanta/apps/apache24_php5/bin/
bluesanta@Kubuntu:/bluesanta/apps/apache24_php5/bin$ vi apache2_php5.service

apache2_php5.service 내용

[Unit]
Description=The Apache HTTP Server(PHP5)
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/bluesanta/apps/apache24_php5/bin/apachectl start
ExecStop=/bluesanta/apps/apache24_php5/bin/apachectl stop
ExecReload=/bluesanta/apps/apache24_php5/bin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target

apache2_php5.service 파일 /etc/systemd/system 디렉토리에 복사

bluesanta@Kubuntu:/bluesanta/apps/apache24_php5/bin$ chmod +x apache2_php5.service
bluesanta@Kubuntu:/bluesanta/apps/apache24_php5/bin$ sudo cp apache2_php5.service /etc/systemd/system

Apache 서비스 등록

bluesanta@Kubuntu:/bluesanta/apps/apache24_php5/bin$ sudo systemctl enable apache2_php5
Created symlink /etc/systemd/system/multi-user.target.wants/apache2_php5.service → /etc/systemd/system/apache2_php5.service.

Apache 서비스 실행

pi@Kubuntu:/bluesanta/apps/apache24/bin$ sudo systemctl start apache2_php5

Apache 서비스 상태 확인

bluesanta@Kubuntu:/bluesanta/apps/apache24_php5/bin$ sudo systemctl status apache2_php5
● apache2_php5.service - The Apache HTTP Server(PHP5)
     Loaded: loaded (/etc/systemd/system/apache2_php5.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Thu 2020-11-26 01:05:49 KST; 13s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 4178335 ExecStart=/bluesanta/apps/apache24_php5/bin/apachectl start (code=exited, status=0/SUCCESS)
    Process: 4178350 ExecStop=/bluesanta/apps/apache24_php5/bin/apachectl stop (code=exited, status=0/SUCCESS)
 
11월 26 01:05:48 Kubuntu systemd[1]: Starting The Apache HTTP Server(PHP5)...
11월 26 01:05:49 Kubuntu apachectl[4178337]: httpd (pid 1179212) already running
11월 26 01:05:49 Kubuntu systemd[1]: apache2_php5.service: Succeeded.
11월 26 01:05:49 Kubuntu systemd[1]: Started The Apache HTTP Server(PHP5).

댓글을 달아 주세요

Ubuntu 20.04 : OwnCloud 설치

OS/Linux 2020. 11. 24. 23:58 Posted by 파란크리스마스

출처

MySQL - OwnCloud DB와 사용자 생성

pi@Kubuntu:~$ cd /bluesanta/mysql-5.7.23
pi@Kubuntu:/bluesanta/mysql-5.7.23$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1161
Server version: 5.7.23-log Source distribution
 
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> CREATE DATABASE owncloud;
Query OK, 1 row affected (0.01 sec)
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> create user 'owncloud'@'localhost' identified by 'owncloud!!';
Query OK, 0 rows affected (0.02 sec)
 
mysql> GRANT ALL privileges ON owncloud.* TO 'owncloud'@'localhost' identified by 'owncloud!!'; 
Query OK, 0 rows affected, 2 warnings (0.00 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
mysql> exit
Bye
pi@Kubuntu:/bluesanta/mysql-5.7.23$

OwnCloud 설치

bluesanta@Kubuntu:~$ cd /bluesanta/apps
bluesanta@Kubuntu:/bluesanta/apps$ wget https://download.owncloud.org/community/owncloud-complete-20200731.tar.bz2
bluesanta@Kubuntu:/bluesanta/apps$ tar xvf owncloud-complete-20200731.tar.bz2
bluesanta@Kubuntu:/bluesanta/apps$ sudo chown -R www-data:www-data owncloud

Apache2에 경로 추가

bluesanta@Kubuntu:~$ vi /bluesanta/apps/apache24/conf/httpd.conf

Alias /cloud "/bluesanta/apps/owncloud/"

<Directory /bluesanta/apps/owncloud/>
  Options +FollowSymlinks
  AllowOverride All
  Require all granted

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /bluesanta/apps/owncloud
 SetEnv HTTP_HOME /bluesanta/apps/owncloud

</Directory>

Apache2 재시작

$ sudo service apache2 restart

댓글을 달아 주세요

Ubuntu 20.04 : PHP zip 확장모듈 설치

OS/Linux 2020. 11. 23. 23:01 Posted by 파란크리스마스

출처

libzip 컴파일

bluesanta@Kubuntu:~$ wget https://libzip.org/download/libzip-1.7.3.tar.gz
bluesanta@Kubuntu:~$ tar xvfz libzip-1.7.3.tar.gz
bluesanta@Kubuntu:~$ cd libzip-1.7.3/
bluesanta@Kubuntu:~/libzip-1.7.3$ mkdir build
bluesanta@Kubuntu:~/libzip-1.7.3$ cd build
bluesanta@Kubuntu:~/libzip-1.7.3/build$ cmake ..
bluesanta@Kubuntu:~/libzip-1.7.3/build$ make
bluesanta@Kubuntu:~/libzip-1.7.3/build$ make test
bluesanta@Kubuntu:~/libzip-1.7.3/build$ sudo make install
 
... 생략 ...
 
-- Installing: /usr/local/bin/zipcmp
-- Set runtime path of "/usr/local/bin/zipcmp" to ""
-- Installing: /usr/local/bin/zipmerge
-- Set runtime path of "/usr/local/bin/zipmerge" to ""
-- Installing: /usr/local/bin/ziptool
-- Set runtime path of "/usr/local/bin/ziptool" to ""

php zip module 설치

bluesanta@Kubuntu:~$ wget https://pecl.php.net/get/zip-1.19.2.tgz
bluesanta@Kubuntu:~$ tar zxvf zip-1.19.2.tgz
bluesanta@Kubuntu:~$ cd zip-1.19.2/
bluesanta@Kubuntu:~/zip-1.19.2$ /bluesanta/apps/php-7.4.12/bin/phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
bluesanta@Kubuntu:~/zip-1.19.2$ ./configure  --prefix=/bluesanta/apps/php-7.4.12 --with-php-config=/bluesanta/apps/php-7.4.12/bin/php-config
bluesanta@Kubuntu:~/zip-1.15.2$ make && make test
bluesanta@Kubuntu:~/zip-1.19.2$ make install
Installing shared extensions:     /bluesanta/apps/php-7.4.12/lib/php/extensions/no-debug-zts-20190902/

/bluesanta/apps/php-7.4.12/php.ini 내용 추가

bluesanta@Kubuntu:~$ vi /bluesanta/apps/php-7.4.12/php.ini

[zip]
extension_dir=/bluesanta/apps/php-7.4.12/lib/php/extensions/no-debug-zts-20190902/
extension=zip.so

댓글을 달아 주세요

Ubuntu 20.04 : PHP7.4.12 수동설치

OS/Linux 2020. 11. 23. 02:02 Posted by 파란크리스마스

출처

컴파일 관련 라이브러리 설치

$ sudo apt install pkg-config libxml2-dev libsqlite3-dev libgmp-dev libonig-dev libbz2-dev libreadline-dev libxslt1-dev

php 컴파일

pi@Kubuntu:/bluesanta$ cd /bluesanta/
pi@Kubuntu:/bluesanta$ wget https://www.php.net/distributions/php-7.4.12.tar.gz
pi@Kubuntu:/bluesanta$ tar xvfz php-7.4.12.tar.gz 
pi@Kubuntu:/bluesanta$ cd php-7.4.12/
pi@Kubuntu:/bluesanta/php-7.4.12$ ./configure --prefix=/bluesanta/apps/php-7.4.12 --with-apxs2=/bluesanta/apps/apache24/bin/apxs --enable-fpm --enable-inline-optimization --enable-shared --enable-soap --with-xmlrpc --with-openssl --with-mhash --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --enable-ftp --enable-gd --with-openssl-dir --with-zlib-dir --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --enable-mbregex --enable-pdo --with-mysqli=/bluesanta/mysql-5.7.23/bin/mysql_config --with-pdo-mysql=/bluesanta/mysql-5.7.23/bin/mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-xsl --enable-mysqlnd-compression-support --with-pear --enable-opcache --with-mhash --with-curl --with-openssl --with-zlib --enable-intl
pi@Kubuntu:/bluesanta/php-7.4.12$ make -j4

php 모듈 테스트

pi@Kubuntu:/bluesanta/php-7.4.12$ make test
 
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Capture SSL session meta array in stream context [ext/openssl/tests/session_meta_capture.phpt]
Basic bitwise stream crypto context flag assignment [ext/openssl/tests/stream_crypto_flags_001.phpt]
TLSv1.1 and TLSv1.2 bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_002.phpt]
Server bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_003.phpt]
Specific protocol method specification [ext/openssl/tests/stream_crypto_flags_004.phpt]
PDO MySQL specific class constants [ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt]
=====================================================================
 
=====================================================================
WARNED TEST SUMMARY
---------------------------------------------------------------------
FPM: Buffered worker output decorated log with multiple continuous messages (stdout/stderr mixed) [sapi/fpm/tests/log-bwd-multiple-msgs-stdout-stderr.phpt] (warn: XFAIL section but test passes)
=====================================================================
 
You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: n
make: *** [Makefile:232: test] 오류 1

php 설치

pi@Kubuntu:/bluesanta/php-7.4.12$ make install
Installing PHP SAPI module:       apache2handler
/bluesanta/apps/apache24/build/instdso.sh SH_LIBTOOL='/bluesanta/apps/apache24/build/libtool' libphp7.la /bluesanta/apps/apache24/modules
/bluesanta/apps/apache24/build/libtool --mode=install install libphp7.la /bluesanta/apps/apache24/modules/
libtool: install: install .libs/libphp7.so /bluesanta/apps/apache24/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /bluesanta/apps/apache24/modules/libphp7.la
libtool: warning: remember to run 'libtool --finish /bluesanta/php-7.4.12/libs'
chmod 755 /bluesanta/apps/apache24/modules/libphp7.so
[activating module `php7' in /bluesanta/apps/apache24/conf/httpd.conf]
Installing shared extensions:     /bluesanta/apps/php-7.4.12/lib/php/extensions/no-debug-zts-20190902/
Installing PHP CLI binary:        /bluesanta/apps/php-7.4.12/bin/
Installing PHP CLI man page:      /bluesanta/apps/php-7.4.12/php/man/man1/
Installing PHP FPM binary:        /bluesanta/apps/php-7.4.12/sbin/
Installing PHP FPM defconfig:     /bluesanta/apps/php-7.4.12/etc/
Installing PHP FPM man page:      /bluesanta/apps/php-7.4.12/php/man/man8/
Installing PHP FPM status page:   /bluesanta/apps/php-7.4.12/php/php/fpm/
Installing phpdbg binary:         /bluesanta/apps/php-7.4.12/bin/
Installing phpdbg man page:       /bluesanta/apps/php-7.4.12/php/man/man1/
Installing PHP CGI binary:        /bluesanta/apps/php-7.4.12/bin/
Installing PHP CGI man page:      /bluesanta/apps/php-7.4.12/php/man/man1/
Installing build environment:     /bluesanta/apps/php-7.4.12/lib/php/build/
Installing header files:          /bluesanta/apps/php-7.4.12/include/php/
Installing helper programs:       /bluesanta/apps/php-7.4.12/bin/
  program: phpize
  program: php-config
Installing man pages:             /bluesanta/apps/php-7.4.12/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /bluesanta/apps/php-7.4.12/lib/php/
[PEAR] Archive_Tar    - installed: 1.4.9
[PEAR] Console_Getopt - installed: 1.4.3
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.5
warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.4.9 is not the recommended version 1.4.4
[PEAR] PEAR           - installed: 1.10.12
Wrote PEAR system config file at: /bluesanta/apps/php-7.4.12/etc/pear.conf
You may want to add: /bluesanta/apps/php-7.4.12/lib/php to your php.ini include_path
/bluesanta/php-7.4.12/build/shtool install -c ext/phar/phar.phar /bluesanta/apps/php-7.4.12/bin/phar.phar
ln -s -f phar.phar /bluesanta/apps/php-7.4.12/bin/phar
Installing PDO headers:           /bluesanta/apps/php-7.4.12/include/php/ext/pdo/

php.ini 복사

pi@Kubuntu:/bluesanta/php-7.4.12$ cp php.ini-production /bluesanta/apps/php-7.4.12/php.ini


/bluesanta/apps/apache24/conf\httpd.conf 내용 추가

# php
LoadModule php7_module        modules/libphp7.so
PHPIniDir "/bluesanta/apps/php-7.4.12"

... 생략 ...

    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    AddHandler application/x-httpd-php .php4 .php .phtml .ph .inc

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    AddType application/x-httpd-php .php4 .php .phtml .ph .inc

</IfModule>

Apache 웹서버 재실행

$ sudo systemctl restart apache2

댓글을 달아 주세요

Ubuntu 20.04 : Apache 웹서버 컴파일 설치

Programming/Apache, PHP 2020. 11. 18. 22:48 Posted by 파란크리스마스

출처

필수 라이브러리 설치

$ sudo apt install libexpat1-dev

PCRE 설치

pi@Kubuntu:/bluesanta/apps$ wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
pi@Kubuntu:/bluesanta/apps$ tar xvfz pcre-8.44.tar.gz
pi@Kubuntu:/bluesanta/apps$ cd pcre-8.44/
pi@Kubuntu:/bluesanta/apps/pcre-8.44$ ./configure --prefix=/usr/local/pcre-8.44
pi@Kubuntu:/bluesanta/apps/pcre-8.44$ make
pi@Kubuntu:/bluesanta/apps/pcre-8.44$ sudo make install

Apache 웹서버 컴파일 & 설치

pi@Kubuntu:~$ cd /bluesanta/apps
pi@Kubuntu:/bluesanta/apps$ wget https://downloads.apache.org//httpd/httpd-2.4.46.tar.gz
pi@Kubuntu:/bluesanta/apps$ tar xvfz httpd-2.4.46.tar.gz
pi@Kubuntu:/bluesanta/apps$ cd httpd-2.4.46/
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ cd srclib
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ tar xvfz apr-1.7.0.tar.gz
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ mv apr-1.7.0 apr
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ tar xvfz apr-util-1.6.1.tar.gz
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ mv apr-util-1.6.1 apr-util
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ tar xvfz pcre-8.44.tar.gz
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46/srclib$ mv pcre-8.44 pcre
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ cd ..
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ ./configure --prefix=/bluesanta/apps/apache24 --with-pcre=/usr/local/pcre-8.44 --enable-cgi --enable-info --enable-deflate --enable-ssl --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-ftp --enable-expires --enable-headers --enable-rewrite --enable-so --with-included-apr --with-included-apr-util --with-included-pcre
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ make
pi@Kubuntu:/bluesanta/apps/httpd-2.4.46$ make install

Apache 웹서버 환경 설정

pi@Kubuntu:/bluesanta/apps/apache24$ cd conf
pi@Kubuntu:/bluesanta/apps/apache24/conf$ vi httpd.conf

ServerName 주석을 풀고 localhost로 설정

#ServerName www.example.com:80
ServerName localhost

서비스 등록 파일 apache2.service 생성

pi@Kubuntu:~$ cd /bluesanta/apps/apache24/bin/
pi@Kubuntu:/bluesanta/apps/apache24/bin$ vi apache2.service

apache2.service 내용

[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/bluesanta/apps/apache24/bin/apachectl start
ExecStop=/bluesanta/apps/apache24/bin/apachectl stop
ExecReload=/bluesanta/apps/apache24/bin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target

apache2.service 파일 /etc/systemd/system 디렉토리에 복사

pi@Kubuntu:/bluesanta/apps/apache24/bin$ chmod +x apache2.service
pi@Kubuntu:/bluesanta/apps$ sudo cp apache2.service /etc/systemd/system

Apache 서비스 등록

pi@Kubuntu:/bluesanta/apps/apache24/bin$ sudo systemctl enable apache2
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /etc/systemd/system/apache2.service.

Apache 서비스 실행

pi@Kubuntu:/bluesanta/apps/apache24/bin$ sudo systemctl start apache2

Apache 서비스 상태 확인

$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/etc/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-11-19 00:06:39 KST; 3s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 154499 ExecStart=/bluesanta/apps/apache24/bin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 154519 (httpd)
      Tasks: 82 (limit: 18693)
     Memory: 6.9M
     CGroup: /system.slice/apache2.service
             ├─154519 /bluesanta/apps/apache24/bin/httpd -k start
             ├─154520 /bluesanta/apps/apache24/bin/httpd -k start
             ├─154521 /bluesanta/apps/apache24/bin/httpd -k start
             └─154522 /bluesanta/apps/apache24/bin/httpd -k start
 
11월 19 00:06:39 Kubuntu systemd[1]: Starting The Apache HTTP Server...
11월 19 00:06:39 Kubuntu systemd[1]: Started The Apache HTTP Server.



Apache 웹서버 컴파일 참조 라이브러리 설치

srclib 디렉토리 사용전에 사용했던 것으로 불필요 - 나중에 참고용으로 남겨둠

apr 라이브러리 설치

pi@Kubuntu:/bluesanta/apps$ wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz
pi@Kubuntu:/bluesanta/apps$ tar xvfz apr-1.7.0.tar.gz
pi@Kubuntu:/bluesanta/apps$ cd apr-1.7.0/
pi@Kubuntu:/bluesanta/apps/apr-1.7.0$ ./configure
pi@Kubuntu:/bluesanta/apps/apr-1.7.0$ make
pi@Kubuntu:/bluesanta/apps/apr-1.7.0$ sudo make install
 
... 생략 ...
 
----------------------------------------------------------------------
/usr/bin/install -c -m 644 apr.exp /usr/local/apr/lib/apr.exp
/usr/bin/install -c -m 644 apr.pc /usr/local/apr/lib/pkgconfig/apr-1.pc
for f in libtool shlibtool; do \
    if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/local/apr/build-1; fi; \
done
/usr/bin/install -c -m 755 /bluesanta/apps/apr-1.7.0/build/mkdir.sh /usr/local/apr/build-1
for f in make_exports.awk make_var_export.awk; do \
    /usr/bin/install -c -m 644 /bluesanta/apps/apr-1.7.0/build/${f} /usr/local/apr/build-1; \
done
/usr/bin/install -c -m 644 build/apr_rules.out /usr/local/apr/build-1/apr_rules.mk
/usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config

apr-util 라이브러리 설치

pi@Kubuntu:/bluesanta/apps$ wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz
pi@Kubuntu:/bluesanta/apps$ tar xvfz apr-util-1.6.1.tar.gz
pi@Kubuntu:/bluesanta/apps$ cd apr-util-1.6.1/
pi@Kubuntu:/bluesanta/apps/apr-util-1.6.1$ ./configure -with-apr=/usr/local/apr
pi@Kubuntu:/bluesanta/apps/apr-util-1.6.1$ make
pi@Kubuntu:/bluesanta/apps/apr-util-1.6.1$ sudo make install
 
... 생략 ...
 
----------------------------------------------------------------------
/usr/bin/install -c -m 644 aprutil.exp /usr/local/apr/lib
/usr/bin/install -c -m 755 apu-config.out /usr/local/apr/bin/apu-1-config

댓글을 달아 주세요

Ubuntu 20.04 : Tomcat 서비스 등록

Programming/Java 2020. 11. 14. 13:25 Posted by 파란크리스마스

출처

tomcat 설치

pi@Kubuntu:~$ cd /bluesanta/apps
pi@Kubuntu:/bluesanta/apps$ wget https://downloads.apache.org/tomcat/tomcat-8/v8.5.59/bin/apache-tomcat-8.5.59.tar.gz
pi@Kubuntu:/bluesanta/apps$ tar xvfz apache-tomcat-8.5.59.tar.gz

tomcat /opt 디렉토리에 소프트 링크 걸기

pi@Kubuntu:/bluesanta/apps$ sudo ln -s /bluesanta/apps/apache-tomcat-8.5.59 /opt/apache-tomcat-8.5.59

서비스 등록 파일 tomcat.service 생성

pi@Kubuntu:/bluesanta/apps$ cd /etc/systemd/system
pi@Kubuntu:/etc/systemd/system$ sudo vi /etc/systemd/system/tomcat.service

tomcat.service 내용

[Unit]
Description=tomcat 8
After=network.target syslog.target

[Service]
Type=forking
Environment="JAVA_HOME=/opt/jdk1.8.0_271"
User=root
Group=root
ExecStart=/opt/apache-tomcat-8.5.59/bin/startup.sh
ExecStop=/opt/apache-tomcat-8.5.59/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

tomcat 서비스 등록

pi@Kubuntu:/etc/systemd/system$ sudo systemctl enable tomcat.service
Created symlink /etc/systemd/system/multi-user.target.wants/tomcat.service → /etc/systemd/system/tomcat.service.

tomcat 서비스 실행

pi@Kubuntu:/etc/systemd/system$ sudo systemctl start tomcat.service

tomcat 서비스 상태 확인

pi@Kubuntu:/etc/systemd/system$ sudo systemctl status tomcat.service
● tomcat.service - tomcat 8
     Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2020-11-14 14:27:13 KST; 39s ago
    Process: 103228 ExecStart=/opt/apache-tomcat-8.5.59/bin/startup.sh (code=exited, status=0/SUCCESS)
   Main PID: 103256 (java)
      Tasks: 33 (limit: 18694)
     Memory: 119.5M
     CGroup: /system.slice/tomcat.service
             └─103256 /usr/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-8.5.59/conf/logging.properties -Djava.util.logging.manager=org.ap>

11월 14 14:27:13 Kubuntu systemd[1]: Starting tomcat 8...
11월 14 14:27:13 Kubuntu startup.sh[103228]: Tomcat started.
11월 14 14:27:13 Kubuntu systemd[1]: Started tomcat 8.

댓글을 달아 주세요

Apache 2.4 : phpMyAdmin 설치

Programming/Apache, PHP 2020. 11. 11. 02:19 Posted by 파란크리스마스

출처

1. 다운로드

phpMyAdmin에서 phpMyAdmin-5.0.4-all-languages.zip 파일 다운로드

2. 압축풀기

phpMyAdmin-5.0.4-all-languages.zip 압축파일을 C:\usr\local\phpMyAdmin-5.0.4-all-languages 폴더에 압축 해제

3. config.inc.php 파일 생성

C:\usr\local\phpMyAdmin-5.0.4-all-languages\config.sample.inc.php 파일을 config.inc.php로 복사

4. 환경파일 수정(config.inc.php)

/**
 * This is needed for cookie based authentication to encrypt password in
 * cookie. Needs to be 32 chars long.
 */
$cfg['blowfish_secret'] = 'gNsWq$%#%$#%EDFSsffsegbVp6LCJw6w'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/**
 * Servers configuration
 */
$i = 0;

/**
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
// $cfg['Servers'][$i]['user'] = 'root';

5. httpd.conf 가상폴더 추가

Tomcat 연동이 없는 경우

Alias /mysql "C:/usr/local/phpMyAdmin-5.0.4-all-languages"

<Directory "C:/usr/local/phpMyAdmin-5.0.4-all-languages">
    Options FollowSymLinks
    DirectoryIndex index.html index.htm index.php *.jsp *.php
    Order allow,deny
    Allow from all
</Directory>

Tomcat 연동의 경우

# Tomcat 연동
<IfModule jk_module>
    JkWorkersFile    conf/workers.properties
    JkLogFile        logs/mod_jk.log
    JkLogLevel       info
    JkMount /* 	load_balancer
</IfModule>

AddDefaultCharset Off 

# phpMyAdmin
<VirtualHost *:80>
    ServerAdmin admin@phpmyadmin.abc.kr
    DocumentRoot "C:/usr/local/phpMyAdmin-5.0.4-all-languages"
    ServerName localhost
#    ServerAlias /mysql
#    DirectoryIndex index.php
    Alias /mysql "C:/usr/local/phpMyAdmin-5.0.4-all-languages"

    <Directory "C:/usr/local/phpMyAdmin-5.0.4-all-languages">
        AllowOverride ALL
        Options FollowSymLinks MultiViews
        DirectoryIndex index.html index.htm index.php *.jsp *.php
        Require all granted
    </Directory>
    
</VirtualHost>

6. php.ini 수정

; When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
;
;   extension=/path/to/extension/mysqli.so
extension=php_mysqli.dll
;extension=mbstring
extension=php_mbstring.dll
;extension=pdo_mysql
extension=php_pdo_mysql.dll

댓글을 달아 주세요

출처

RSA 개인키를 생성

$ openssl genrsa -out private.key 2048
Generating RSA private key, 2048 bit long modulus
....................................+++++
..........+++++
e is 65537 (0x10001)

RSA 개인키를 이용해서 RSA 공개키를 생성

$ openssl rsa -in private.key -pubout -out public.key
writing RSA key

CSR(인증요청서) 생성

$ openssl req -new -key private.key -out private.csr
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]:_
Locality Name (eg, city) []:Seoul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:bluexmas
Organizational Unit Name (eg, section) []:root CA
Common Name (e.g. server FQDN or YOUR name) []:test.iptime.org
Email Address []:test@test.com
 
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:test
An optional company name []:test

CRT(인증서)만들기

CA 역할을 할 CA 대칭키 생성

$ openssl genrsa -aes256 -out rootCA.key 2048
Generating RSA private key, 2048 bit long modulus
..................................................+++++
....................+++++
e is 65537 (0x10001)
Enter pass phrase for rootCA.key:test
Verifying - Enter pass phrase for rootCA.key:test

rootCA.key를 이용해서 rootCA.pem 생성

$ openssl req -x509 -new -nodes -key rootCA.key -days 2650 -out rootCA.pem
Enter pass phrase for rootCA.key:test
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]:_
Locality Name (eg, city) []:Seoul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:bluexmas
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:test
Email Address []:test

웹서버에 HTTPS적용을 위해 필요한 CRT 인증서를 생성

$ openssl x509 -req -in private.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out private.crt -days 3650        Signature ok
subject=/C=KR/ST=_/L=Seoul/O=bluexmas/OU=root CA/CN=lastxmas.iptime.org/emailAddress=test@test.com
Getting CA Private Key
Enter pass phrase for rootCA.key:test

C:\usr\local\Apache24\conf\httpd.conf

# Secure (SSL/TLS) connections
Include conf/httpd-ssl.conf

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so

C:\usr\local\Apache24\conf\httpd-ssl.conf

#
# When we also provide SSL we have to listen to the 
# standard HTTP port (see above) and to the HTTPS port
#
Listen 443

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is an internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog  builtin

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism 
#   to use and second the expiring timeout (in seconds).
#SSLSessionCache         "dbm:c:/Apache24/logs/ssl_scache"
SSLSessionCache        "shmcb:C:/usr/local/Apache24/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

##
## SSL Virtual Host Context
##

<virtualhost _default_:443="">

#   General setup for the virtual host
# DocumentRoot "C:/usr/local/Apache24/htdocs"
DocumentRoot "C:/usr/local/Apache24/public_html"
ServerName www.example.com:443
ServerAdmin admin@example.com
ErrorLog "C:/usr/local/Apache24/logs/error.log"
TransferLog "C:/usr/local/Apache24/logs/access.log"

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

#   Server Certificate:
#   Point SSLCertificateFile at a PEM encoded certificate.  If
#   the certificate is encrypted, then you will be prompted for a
#   pass phrase.  Note that a kill -HUP will prompt again.  Keep
#   in mind that if you have both an RSA and a DSA certificate you
#   can configure both in parallel (to also allow the use of DSA
#   ciphers, etc.)
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
#   require an ECC certificate which can also be configured in
#   parallel.
SSLCertificateFile "C:/usr/local/Apache24/conf/private.crt"

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
#   ECC keys, when in use, can also be configured in parallel
SSLCertificateKeyFile "C:/usr/local/Apache24/conf/private.key"

댓글을 달아 주세요