RaspberryPi3B: Difference between revisions
(→Apache) |
|||
| Line 82: | Line 82: | ||
UwesWikiDS | UwesWikiDS | ||
... | ... | ||
* added to /etc/apache2/sites-enabled/000-default-le-ssl.conf | |||
ProxyPass /uweheuer ajp://localhost:8009/uweheuer | |||
ProxyPassReverse /uweheuer http://localhost/uweheuer | |||
* create <code>/myprogs</code> and copy DisAndEnableUweHeuer.bat | * create <code>/myprogs</code> and copy DisAndEnableUweHeuer.bat | ||
Revision as of 23:06, 19 November 2017
Configuration
- 192.168.178.34 for WLAN
- 192.168.178.35 for LAN
- SSH credentials (e.g. for WinSCP or Putty) user=pi pwd=raspberry for both IP
- enable SSH access for root by
sudo su passwd Halloo0@1 // edit /etc/ssh/sshd_config // decommend PermitRootLogin without-password // add PermitRootLogin yes sudo service ssh restart
Software
Apache
- verion 2.4 installed by
sudo apt-get install apache2 chmod 777 /var/www/html
- to setup Apache as reverse proxy for Wildfly
sudo a2enmod proxy_ajp
- creates proxy.conf, proxy.load and proxy_ajp.load in /etc/apache2/mods-enabled
- restart
sudo /etc/init.d/apache2 restart or service apache2 restart
- find out version
apache2ctl -v
SSL
see here
MySQL
- install by
sudo apt-get install mysql-server php5-mysql mysql-client root root
- decomment in /etc/mysql/my.cnf
#bind-address = 127.0.0.1
- login with local client
mysql -u root -p
PHPMyAdmin
- installed by
apt-get install phpmyadmin root
- add to /etc/apache2/apache2.conf at the end (marked by UH)
Include /etc/phpmyadmin/apache.conf
- restart apache
Mediawiki
- download mediawiki-1.25.1.tar.gz and copy it to /tmp
- extract it by
tar -xzf mediawiki-1.25.1.tar.gz
- rename directory mediawiki-1.25.1 to mediawiki by
mv mediawiki-1.25.1 mediawiki
- move directory to the html directory by
mv /tmp/mediawiki /var/www/html/mediawiki
SSL
- edit /etc/apt/sources.list and add
deb http://ftp.debian.org/debian jessie-backports main
- update
apt-get update
- install
sudo apt-get install python-certbot-apache sudo apt-get install certbot -t jessie-backports sudo certbot --apache uweheuer.goip.de uwe.heuer@gmail.com
- creates among others /etc/letsencrypt
UweHeuer
- create database mysql505 with PHPMyAdmin
- export and import database
- create /wildfly/wildfly-11.0.0.Final/standalone/data/uweheuer
- copy abc.tmp and /wildfly/wildfly-11.0.0.Final/standalone/data
- download mysql-connector-java-5.1.44-bin.jar from MySQL site
- deploy it via the Wildfly admin console
- create datasources via Web admin console with
MySQLDS jdbc:mysql://localhost/mysql505?autoReconnect=true root root ... UwesWikiDS ...
- added to /etc/apache2/sites-enabled/000-default-le-ssl.conf
ProxyPass /uweheuer ajp://localhost:8009/uweheuer ProxyPassReverse /uweheuer http://localhost/uweheuer
- create
/myprogsand copy DisAndEnableUweHeuer.bat
Wildfly
- create /wildfly directory and chmod 777
- copy wildfly-11.0.0.Final.zip to /wildfly
- unzip
- enable remote access to Wildfly by editing /wildfly/wildfly-11.0.0.Final/standalone/configuration/standalone.xml and replace (save old version to standalone.xml_20171110):
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
with
<interface name="management">
<any-address/>
</interface>
<interface name="public">
<any-address/>
</interface>
- enable remote CLI access by adding native interface configuration to /wildfly/wildfly-11.0.0.Final/standalone/configuration/standalone.xml (save old version to standalone.xml_20171112)
- set Wildfly as a service by (there is a debian script in the doc directory and a description in the internet, but it didn't work, so used the approach from HomePC New):
create /etc/init.d/uweswildfly sudo chmod 755 /etc/init.d/uweswildfly sudo update-rc.d uweswildfly defaults // log goes to /var/log/uwes.log
- enable ajp communication to Apache2 by Web admin -> Configuration -> Subsystems -> Web/HTTP - Untertow -> Http -> View -> default server -> View -> AJP Listeners -> Add 'ajp' 'ajp'
Manual Operation
- cd /wildfly/wildfly-11.0.0.Final/bin
- start server by
./standalone.sh &
- stop server by
./jboss-cli.sh --connect command=:shutdown
- restart server by
./jboss-cli.sh --connect command=:reload
- get server status by
./jboss-cli.sh -c --commands="read-attribute server-state"
Operation
Reboot
sudo reboot
Shutdown
sudo shutdown -h 0
Update
sudo apt-get update
Version
cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"