Rev 725 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 725 | Rev 726 | ||
---|---|---|---|
1 | 1 | ||
2 | Alpine Linux Example Setup for OIDplus |
2 | Alpine Linux Example Setup for OIDplus |
3 | ====================================== |
3 | ====================================== |
4 | 4 | ||
5 | # Download Alpine Linux https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-standard-3.15.0-x86_64.iso |
5 | # Download Alpine Linux https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-standard-3.15.0-x86_64.iso |
6 | 6 | ||
7 | # Setup VMware VM |
7 | # Setup a VM, e.g. using VMware Player |
8 | 8 | ||
9 | # Basic setup |
9 | # Run Alpine setup setup |
10 | (setup-keymap) |
10 | # (On a German keyboard, the "-" key is "ß") |
11 | setup-alpine |
11 | setup-alpine |
12 | reboot |
12 | reboot |
13 | 13 | ||
14 | # Find out IP |
14 | # Optional: Enable SSH |
15 | ifconfig |
- | |
16 | - | ||
17 | # Optional: Enable SSH (e.g. 192.168.75.134) |
15 | # If you want to use SSH instead of typing the commands into the VM window |
18 | echo "PermitRootLogin yes" >> /etc/sshd/sshd_config |
16 | echo "PermitRootLogin yes" >> /etc/ssh/sshd_config |
19 | service sshd restart |
17 | service sshd restart |
20 | 18 | ||
- | 19 | # Optional: Install Nano |
|
- | 20 | # If you feel more comfortable with the "nano" editor rather than "vi", you can install nano and replace the "vi" commands below with "nano" |
|
- | 21 | apk add nano |
|
- | 22 | ||
- | 23 | # Find out the IP address of your VM |
|
- | 24 | ifconfig |
|
- | 25 | ||
21 | # Setup package repository |
26 | # Setup package repository |
22 | echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories |
27 | echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories |
- | 28 | apk update |
|
23 | apk update && apk upgrade |
29 | apk upgrade |
24 | 30 | ||
25 | # Setup MySQL |
31 | # Setup MySQL |
26 | apk add mysql |
32 | apk add mariadb mariadb-client |
27 | /etc/init.d/mariadb setup |
33 | /etc/init.d/mariadb setup |
28 | service mariadb start |
- | |
29 | mariadb-secure-installation |
34 | mariadb-secure-installation |
- | 35 | service mariadb restart |
|
30 | rc-update add mariadb default |
36 | rc-update add mariadb default |
31 | 37 | ||
32 | # Setup Apache + PHP |
38 | # Setup Apache + PHP |
33 | apk add php apache2 php-apache2 php-mysqli |
39 | apk add php apache2 php-apache2 php-mysqli |
34 | apache2 start |
40 | service apache2 start |
35 | rc-update add apache2 default |
41 | rc-update add apache2 default |
36 | 42 | ||
37 | # Download OIDplus |
43 | # Download OIDplus |
38 | cd /var/www/localhost/htdocs/ |
44 | cd /var/www/localhost/htdocs/ |
39 | wget https://www.viathinksoft.com/download/235/oidplus2_svn.tar.gz |
45 | wget https://www.viathinksoft.com/download/235/oidplus2_svn.tar.gz |
40 | tar -zxvf oidplus2_svn.tar.gz |
46 | tar -zxvf oidplus2_svn.tar.gz |
41 | rm oidplus2_svn.tar.gz |
47 | rm oidplus2_svn.tar.gz |
42 | 48 | ||
43 | # Set file owners (otherwise software updates via web interface are not possible) |
49 | # Set file owners (otherwise software updates via web interface are not possible) |
44 | chown -R apache:apache /var/www/localhost/htdocs/oidplus/ |
50 | chown -R apache:apache /var/www/localhost/htdocs/oidplus/ |
45 | 51 | ||
46 | # Install packages required for OIDplus |
52 | # Install packages required for OIDplus |
47 | # Required |
53 | # Required |
48 | # If php-gmp cannot be installed, you can use php-bcmath |
- | |
49 | # If php-mbstring cannot be installed, you can use php-iconv (however, there is currently a bug in Alpine? https://github.com/symfony/polyfill/issues/387 ) |
- | |
50 | apk add php-gmp php-session php-mbstring php-json |
54 | apk add php-gmp php-session php-mbstring php-json |
51 | # Optional (recommended) |
55 | # Optional (required for some features) |
52 | apk add php-curl php-sockets php-simplexml php-openssl |
56 | apk add php-curl php-sockets php-simplexml php-openssl |
53 | # Apply changes |
57 | # Apply changes |
54 | service apache2 restart |
58 | service apache2 restart |
55 | 59 | ||
56 | apk list --installed |grep php |
- | |
57 | #php81-curl-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
58 | #php81-iconv-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
59 | #php81-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
60 | #php81-apache2-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
61 | #php81-mysqli-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
62 | #php81-mysqlnd-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
63 | #php81-gmp-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
64 | #php81-openssl-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
65 | #php81-session-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
66 | #php81-common-8.1.1-r0 x86_64 {php81} (PHP-3.01 BSD-3-Clause LGPL-2.0-or-later MIT Zend-2.0) [installed] |
- | |
67 | php81 -m |
- | |
68 | # Core |
- | |
69 | # curl |
- | |
70 | # date |
- | |
71 | # filter |
- | |
72 | # gmp |
- | |
73 | # hash |
- | |
74 | # iconv |
- | |
75 | # json |
- | |
76 | # libxml |
- | |
77 | # mysqli |
- | |
78 | # mysqlnd |
- | |
79 | # openssl |
- | |
80 | # pcre |
- | |
81 | # readline |
- | |
82 | # Reflection |
- | |
83 | # session |
- | |
84 | # SPL |
- | |
85 | # standard |
- | |
86 | # zlib |
- | |
87 | - | ||
88 | - | ||
89 | # In the section <Directory "/var/www/localhost/htdocs"> change "AllowOverride None" to "AllowOverride All" |
60 | # In the section <Directory "/var/www/localhost/htdocs"> change "AllowOverride None" to "AllowOverride All" |
90 | vi /etc/apache2/httpd.conf |
61 | vi /etc/apache2/httpd.conf |
- | 62 | service apache2 restart |
|
- | 63 | ||
- | 64 | # Install curl client (required for the database import below) |
|
- | 65 | apk add curl |
|
91 | 66 | ||
92 | # Open in browser: http://192.168.75.134/oidplus and follow the instructions |
67 | # Open in browser: http://192.168.75.134/oidplus and follow the instructions (change the IP address to the one of your system) |
93 | 68 | ||
94 | # Initialize database (curl-string comes from setup) |
69 | # Initialize database (use the command line string that was generated by setup! This is just an example!) |
95 | apk add curl mysql-client |
- | |
96 | curl -s "http://192.168.75.134/oidplus/setup/struct_empty.sql.php?plugin=mysql&prefix=oidplus_&database=oidplus&slang=mysql" | mysql -u root -p |
70 | curl -s "http://192.168.75.134/oidplus/setup/struct_empty.sql.php?plugin=mysql&prefix=oidplus_&database=oidplus&slang=mysql" | mysql -u root -p |
97 | 71 | ||
98 | # Add data generated by setup |
72 | # Add configuration file generated by setup |
99 | vi userdata/baseconfig/config.inc.php |
73 | vi /var/www/localhost/htdocs/oidplus/userdata/baseconfig/config.inc.php |