Strato VPS Linux
- € 5 / maand
- 1 CPU vCore
- 2 GB RAM
- 50 GS SSD
- 100 Mbit/s
- ∞ dataverkeer
Upgrade packages 24.04.2
Vooraf
admin@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble
Dan upgrade gestart:
sudo apt-get dist-upgrade
Er werden heel wat packages bijgewerkt, maar het versienr. van Ubuntu bleef 24.04.2.LTS
WinSCP sudo su connection for admin - 250606
- Clone a 'normal' sftp connection: Manage > Clone to New Site
- Then, in the 'Session' pane, click on Advanced...
- In the Environment section, click on SFTP
- In the Protocol options pane, add the SFTP server: sudo su -c /usr/lib/sftp-server
- click OK, then Save, and again OK
When trying to use this connection, you now get:
Error
Connection has been unexpectedly closed.
Server sent command exit status 127.
Cannot initialize SFTP protocol. Is the host running an SFTP server?
OK Reconnect Help
That's because you need a passwordless sudo su possibility to use sudo su in WinSCP. You can obtain this possibility as follows:
Passwordless login for admin
First make sure admin can do sudo su without the need of a password:
See:
https://askubuntu.com/questions/147241/execute-sudo-without-password
- log in as root
- go to /usr/sbin
sudo visudo
Then, at the bottom, add:
admin ALL=(ALL) NOPASSWD: ALL
Mail - 250520
Je hebt
sendmail en
postfix. Maar postfix wordt beschouwd als de betere keuze voor moderne omgevingen.
Dus sendmail volledig verwijderd:
https://askubuntu.com/questions/460820/completely-remove-sendmail
En postfix geïnstalleerd:
https://documentation.ubuntu.com/server/how-to/mail-services/install-postfix/index.html
De test e-mail in Foswiki werkt dan, wel als webmaster b***y.be gebruikt, niet b***d.be.
SSL - 250519
Het was blijkbaar een probleem dat de configuratiebestanden van Apache niet in /etc/apache2/sites-available stonden.
Dat is zowel een probleem voor
a2ensite / a2dissite als voor
certbot.
De oplossing is: je plaatst ze in /srv/conf/sites met permissies rw-r--r-- en als owner:group admin:admin
En dan maak je symlinks in /etc/apache2/sites-available.
Die hebben dan rights rwxrwxrwx en owner:group root:root.
Op die manier kun je de conf-bestanden wel als admin bewerken.
Users verwijderen
linux - Removing user entry from /etc/passwd - Unix & Linux Stack Exchange
- userdel mosquitto
- userdel owntracks
Upgrade from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS - 240214
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade
Je krijgt een waarschuwing dat je het over ssh doet:
Continue running under SSH?
This session appears to be running under ssh. It is not recommended to perform an upgrade over ssh currently because in case of failure it is harder to recover.
If you continue, an additional ssh daemon will be started at port '1022'.
Do you want to continue?
Maar alles ging goed.
Herinstallatie - 240726
Herinstallatie ging vroeger makkelijk (omdat je nog met wachtwoord kon inloggen?). In ieder geval heb ik een aantal pogingen nodig gehad om public & private key nu met elkaar te laten praten.
Lesson learned: als je kiest voor
Opnieuw installeren, moet je naast een (al dan niet nieuw) wachtwoord (dat je nooit zal gebruiken*) ook een
Publieke SSH-key ingeven.
Doe het overeenkomstig de beschrijving
hier.
Daarmee bedoel ik: kopieer de key uit het veld Public key for pasting into OpenSSH authorized_keys file en gebruik NIET de key die je hebt opgeslagen via de knop 'Save public key'.
De waarde in het veld is een
oneliner, terwijl in het .pub-bestand de key wordt opgebroken in regels van 64 karakters.
Het venster VM-herinstallatie aanvaardt beide (het zal niet reclameren), maar je kunt achteraf geheid niet inloggen via PuTTY of WinSCP!!!
*als je als admin wil root worden doe je
sudo su
en moet je het wachtwoord van admin ingeven
*als je als root wil admin worden doe je
su admin
en moet je geen wachtwoord ingeven
OS
VPS Ubuntu 22.04 LTS 64bit
Locale
echo $LANG
Na installatie staat alles standaard op
nl_NL.utf8.
Workaround
In
/root/.bashrc aangepast, volgende toegevoegd op het einde:
export LANG=en_US.UTF-8
export LANGUAGE=en_EN.UTF-8
export LC_ALL=en_US.UTF-8
LANGUAGE en LC_ALL mogen van mij eigenlijk 'leeg' zijn.
source:
https://gathering.tweakers.net/forum/list_messages/2115670
Solution
Achteraf ontdekte ik dat Ubuntu 'normaal' kijkt naar /etc/default/locale. Maar die zag er netjes als volgt uit:
LANG=en_US.UTF-8
Althans, in Ubuntu.
In Debian stond die op nl_NL.UTF-8. Dus daar moest ik die wel op en_US.UTF-8 instellen.
Een blik op
/etc/environment en
/etc/profile zorgde ervoor dat ik vaststelde dat de drie variabelen werden gezet in /etc/profile. Dus daar heb ik ze gewoon uitgemarkeerd (#), en uiteraard heb ik ze ook weggehaald uit /root/.bashrc.
En vervolgens heb ik de taalbestanden opnieuw gegenereerd nadat ik nl_NL.utf8 had weggehaald uit
/etc/locale.gen.
root@stratoserver:~# locale-gen --purge
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
De optie
--purge verwijdert bestaande locales vooraleer de nieuwe/andere worden gegenereerd.
Zie:
Voor Debian:
Private & Public key (om zonder wachtwoord te kunnen inloggen)
Zie:
https://www.configserverfirewall.com/windows-10/putty-server-refused-our-key/
- genereer met de PuTTY Key Generator (keygen) een public & een private key en sla de private key op
- laad in !PuTTY de gewenste configuratie
- Ga dan in de linkerkolom (Category) naar Connection > SSH > Auth
- Browse... dan in het panel 'Authentication parameters' naar de gegenereerde private key
- Op de server zelf heb je per user een public key nodig - voor root plaats je die in /root/.ssh/authorized_keys
Admin user
Voor je ook maar iets installeert of doet, maak gewoon een andere user aan waarmee je dan werkt.
Zie:
Add the new user
adduser admin
26/07/24: bovenstaande werkt niet meer, maar resulteert in:
adduser: The group 'admin' already exists.
Volgende werkt wel:
adduser admin --ingroup admin
Bron:
https://askubuntu.com/questions/837537/how-to-add-an-user-called-admin
Add user to the sudo group
usermod -aG sudo admin
-a(dd to )G(roup)
Check that the new user was added to the sudo group:
getent group sudo
get ent(ries from administrative database file …)
Verify the new user has sudo access
su - admin
Private & Public key (om zonder wachtwoord te kunnen inloggen)
Je kunt de
authorized_keys van de root user gewoon kopiëren voor de admin (of eender welke andere) user. Belangrijk is wel dat je
owner en group wijzigt, anders krijg je volgende foutmelding:
in PuTTY zelf:
Using username "admin".
Server refused our key
En er popt dan nog een dialoog op
!PuTTY Fatal Error
No supported authentication methods available (server sent: publickey)
LAMP
Overeenkomstig volgende
beschrijving
sudo apt-get install lamp-server^ -y
Daarna starten en autostart maken van Apache en MySQL:
Apache
nginx stoppen en autostart uitschakelen
Ik weet niet of het altijd zo is, maar op de Ubuntu-distributie op mijn Strato-server stond
nginx als default webserver, wat ook automatisch opstart.
killall nginx
sudo update-rc.d -f nginx disable
source:
https://askubuntu.com/questions/177041/nginx-disable-autostart
Apache starten en autostart inchakelen
admin@ubuntu:~$ sudo systemctl start apache2
admin@ubuntu:~$ sudo systemctl enable apache2
MySQL
admin@ubuntu:~$ sudo systemctl start mysql
admin@ubuntu:~$ sudo systemctl enable mysql
Beveiligen van MySQL
admin@ubuntu:~$ sudo mysql_secure_installation
Beantwoord als volgt:
- Would you like to setup VALIDATE PASSWORD component? ► 'y'
- There are three levels of password validation policy: Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2 ► '2'
- Remove anonymous users? (Press y|Y for Yes, any other key for No) : 'y'
- Disallow root login remotely? (Press y|Y for Yes, any other key for No) : 'y'
- Remove test database and access to it? (Press y|Y for Yes, any other key for No) : 'y'
- Reload privilege tables now? (Press y|Y for Yes, any other key for No) : 'y'
All done!
Inloggen kan daarna als volgt:
sudo mysql -u root mysql
PHP 8.1
sudo apt-get install php php-opcache php-gd php-curl php-mysqlnd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip -y
phpMyAdmin
sudo apt-get install phpmyadmin
Alles gaat goed tot je een wachtwoord voor phpmyadmin moet voorzien. Ondanks het feit dat het aan alle vereisten voldoet, krijg je de melding:
An error occurred while installing the database:
mysql said: ERROR 1819 (HY000) at line 1: Your password does not satisfy the current policy requirements .
Je kunt dan retry proberen, evt. een andere authentictieplugin proberen (mysql_native_password ipv default), maar bij mij bleef het maar mislukken.
Ik heb dan gewoon in een ander venster de phpmyadmin-gebruiker aangemaakt, waarna de wizard van phpmyadmin wel verderging en de hele installatie netjes afrondde.
mysql> create user 'phpmyadmin'@'localhost' identified by 'ITScomplicated$_@123!';
OPGELET
!phpMyAdmin werkt na deze installatie enkel met PHP 8.x. Als je wisselt naar 7.x, zal de tool niet bereikbaar zijn!
PHP 8.3 én 7.4
na een sudo upgrade gingen we van 8.1 naar 8.3, maar eigenlijk wil ik ook nog een 7.4.
Zie
hier hoe.
sudo add-apt-repository ppa:ondrej/apache2
sudo add-apt-repository ppa:ondrej/php
En dan op basis van de php-zaken die ik hierboven installeerde, dezelfde geïnstalleerd voor 7.4.
sudo apt-get install php7.4 php7.4-opcache php7.4-gd php7.4-curl php7.4-mysqlnd php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysqlnd php7.4-xml php7.4-zip -y
Om te wisselen tussen versies:
sudo update-alternatives --config php
OPGELET
Je moet ook de bijhorende Apache-module wisselen
En wel als volgt:
sudo a2dismod php8.1
sudo a2enmod php7.4
sudo systemctl restart apache2
Bij het enablen van de php7.4-module wordt het volgende geretourneerd:
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Enabling module php7.4.
Ben daar nog niet verder op ingegaan...
Plesk
Niet doen! Don't install it. It completely reconfigures and messes up your server!
LAMP
After the above actions, your LAMP environment is up and running! Congrats!
Drupal on your LAMP
Now we have a fully configured LAMP, now how to proceed to use it to serve your website. In order to use the full potential of the LAMP (web server, database server, PHP), I'll here explain how to setup a Drupal site on your LAMP.
Apache - virtual host
Gebaseerd op:
https://www.redswitches.com/blog/how-to-install-lamp-in-ubuntu/#CreateAVirtualHostForYourWebsite
Maar dan kreeg ik nog een 403.
Eerst srv eigendom gemaakt van admin (ging niet in WinSCP, admin stond er nog niet bij in de drop-down), dus als root:
chown admin:admin srv
Vervolgens daarin htdocs/boossy.example gemaakt, weer als admin.
mkdir /srv/htdocs/boossy.example
Zorg dat er een index.html-bestand staat (dit is in afwachting, gewoon om te zien of onze Apache naar behoren werkt):
<html>
<head>
<title>Example website</title>
</head>
<body>
<h1>Hello World!</h1>
<p>This is the landing page of <strong>Example.org </strong>.</p>
</body>
</html>
Vervolgens een configuratiebestand gemaakt:
sudo vi /etc/apache2/sites-available/boossy.example.conf
met volgende inhoud
<VirtualHost *:80>
ServerName boossy.example
ServerAlias www.boossy.example
ServerAdmin webmaster@localhost
DocumentRoot /srv/htdocs/boossy.example
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Je kunt de nieuwe site nu enablen:
sudo a2ensite boossy.example
Als je geen entry in je HOSTS-bestand hebt, moet je de default site uitschakelen:
sudo a2dissite 000-default
Test de configuratie:
sudo apache2ctl configtest
Waarschijnlijk krijg je dit:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Deze melding mag/kun je negeren, maar je kunt ze ook als volgt oplossen:
Set ServerName
gebaseerd op pakket / opdrachtnummer
in /etc/hosts file:
127.0.0.1 server578
in /etc/apache2/apache2.conf file:
ServerName server578
Daarna krijg je alleen nog
Syntax OK en kun je Apache dus herladen:
sudo systemctl reload apache2
Ga naar het IP-adres, en je krijgt:
403 Forbidden -- #disappointment
Overcome 403 Forbidden
Zie:
https://stackoverflow.com/questions/6959189/apache-virtualhost-403-forbidden
Dus voeg onderaan in boossy.example.conf het volgende toe:
<Directory "/srv/htdocs/boossy.example">
Order allow,deny
Allow from all
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
Surf opnieuw naar het IP-adres
et ça marche.
Voeg
boossy.example toe aan je
lokale hosts file.
Je virtual host is nu ook bereikbaar als
http://boossy.example/.
Als je nu de default site weer inschakelt krijg je op het IP-adres de 'Apache 2 Default Page', en op
http://boossy.example de inhoud van je virtual host.
Apache - Virtual host for a subdomain
That's
virtually the same (pun intended).
Be aware that if you haven't configure a DNS name on your LAMP server, you'll have to define all virtual domain names on your local machine in your hosts file, also the subdomains, e.g.:
123.456.789.012 mydomain.org sub.mydomain.org
MySQL - create a database
Wellicht gebruik je liefst phpMyAdmin, maar de phpmyadmin user die we hebben gecreëerd, heeft geen rechten om een database te maken. Als je als phpmyadmin user ook alle rechten wil (alle databases zien, databases aanmaken, gebruikersaccounts maken, enz.), moet je die als root user toekennen:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
Bron:
https://forum.hestiacp.com/t/phpmyadmin-root-permissions-and-view-all-databases/9342/4
Nu kun je in phpMyAdmin een database aanmaken.
Collation
Drupal beveelt als
COLLATION utf8mb4_unicode_ci of utf8mb4_general_ci aan, maar bij mij stond het ingesteld op utf8mb4_0900_ai_ci. Je kunt dit in phpMyAdmin als volgt wijzigen:
- click on the name of your database in the left panel
- click on the tab Operations/Handelingen
- in the Collation/Collatie panel: choose utf8mb4_unicode_ci
- check the Change all tables collations/Wijzig alle tabelcollaties checkbox
- then click on the Go/Starten button
User
Ga naar de tab
Gebruikersaccounts.
Klik onder
Nieuw op de link
Gebruikersaccount toevoegen.
Vul de volgende gegevens in:
Aanmeldingsinformatie:
- Gebruikersnaam
- Servernaam: kies lokaal/local (localhost)
- Wachtwoord + Tik opnieuw in
Globale rechten:
- Bij Data, vink de volgende rechten aan (de bovenste vier): SELECT, INSERT, UPDATE, DELETE
- Bij Structuur, vink de volgende rechten aan (de bovenste vijf): CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES
Bron:
https://www.drupal.org/docs/getting-started/installing-drupal/create-a-database#:~:text=At%20the%20MySQL%2FMariaDB%20prompt,CREATE%20TEMPORARY%20TABLES%20ON%20databasename.
Install Drupal 7.82
Read the
Installing Drupal 7 documentation.
I don't know why I chose 7.82, because version 7.101 was already available, but, anyways...
- Make sure PHP 7.4 is enabled, as well as the accompanying Apache module (see above).
I also enabled the Apache rewrite module and installed some extra Linux packages (don't know where I read this...):
sudo a2enmod rewrite
sudo systemctl restart apache2
sudo apt install php-cli php-sqlite3
Choose profile
Choose language
Verify requirements
- File system - The directory sites/default/files does not exist. ...
► create it
File system - The directory sites/default/files is not writable. ...
► correct the permissions:
chmod -R 777 files
- Settings file - The settings file does not exist
► copy sites/default/default.settings.php to settings.php
Settings file - The settings file is not writable. ...
► correct the permissions:
chmod 777 settings.php
Set up database
Dat hebben we dus al gedaan - zie hoger.
Install profile
- Zet sites/default/settings.php nu op enkel schrijven: r--r--r--
- e-mailadressen bij SITE INFORMATION en SITE MAINTENANCE ACCOUNT zijn verplichte velden
Finished
- Werk bij tot Drupal 7.101
Restore existing Drupal site on your LAMP
I use Akeeba to backup and restore sites. Restoration succeeds, however, I can only access the home page. All other pages show a "Page Not Found".
Consulted the following page:
"Page Not Found" Errors on every page except homepage
- http://vmg.boossy.org/index.php?q=user => works => Drupal's page serving mechanism is working properly
(login gives the impression to fail, but succeeds)
- phpinfo() shows mod_rewrite is enabled
<?php
phpinfo();
?>
Consulted the following page:
Is this a correct way to enable htaccess in Apache 2.4.7
Added
!AllowOverride All to the
section of the vmg.boossy.org VirtualHost in boossy.org.conf:
<Directory "/srv/htdocs/vmg.boossy.org">
AllowOverride All
Order allow,deny
Allow from all
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
Apparently, this is telling Apache that all configurations can be overridden in /srv/htdocs/vmg.boossy.org and all its sub-directories (recursively).
Reloaded the Apache config and huppakee, the site works!
Backup / Snapshot of my good config
The nightmare of everyone is a system that's no longer working correctly. Now that I have a good starting point (LAMP with a couple of Drupal sites), I'd like to make snapshot.
Er is in ieder geval plaats genoeg: admin@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 388M 1016K 387M 1% /run
/dev/vda1 97G 4.0G 93G 5% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/vda15 105M 6.1M 99M 6% /boot/efi
tmpfs 388M 4.0K 388M 1% /run/user/1000
sudo apt-get update
sudo apt-get install sendmail
Warning: 3 database(s) sources
were not found, (but were created)
please investigate.
Kickstart
extraction fails =>
daarna: index.php verschijnt, maar de andere pagina's geven een 404
=> boossy.org.conf: errorlog en customlog afgeleid naar /srv/logs
=> sites/Default/settings.php:
- $base_url gecorrigeerd
- permissies op 444 gezet
Setup
MySQL
admin@ubuntu:~$ sudo mysql_secure_installation
...
Skipping password set for root as authentication with auth_socket is used by default.
...
If you would like to use password authentication instead, this can be done with the "ALTER_USER" command.
See https://dev.mysql.com/doc/refman/8.0/en/alter-user.html#alter-user-password-management for more information.
Dan kun je als volgt inloggen:
sudo mysql -u root mysql
En dan kun je toch een wachtwoord instellen als volgt:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
En dan zou je daarna dus toch kunnen inloggen met een wachtwoord.
Java
OK
MySQL
zie: https://ubuntu.com/server/docs/databases-mysql
Installatie
sudo apt install mysql-server
Status
sudo service mysql status
Netwerkstatus
sudo ss -tap | grep mysql
Set root password
Zorg ervoor dat je 'sudo' gebruikt, of je krijgt geen toegang:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
sudo mysql -u root --skip-password
Log in after root password creation
Zorg ervoor dat je 'sudo' gebruikt, of je krijgt geen toegang!
sudo mysql -u root -p
Access your server db on your Windows client using e.g. MySQL Workbench:
- revert to !MySQL native password authentication¹:
- log into mysql
- issue the following command:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';
- define a tunnel in your !PuTTY session:
- load the session
- go to category Connection > SSH > Tunnels
- in the Port forwarding pane, Add new forwarded port:
- Source port: ####
- Destination: localhost:3306
- then press the Add button
- now return to category Session and press the Save button to preserve your changes
- now launch the !MySQL Workbench and click the + icon to setup a new connection:
- enter the Connection Name
- normally, in the Parameters tab, just change the Port to the port number you've used in your PuTTY connections settings above (####)
- then click the Test Connection button
¹Source: https://askubuntu.com/questions/773446/unable-to-connect-via-mysql-workbench-to-localhost-in-ubuntu-16-04-passwordless
¹Achteraf toch weer gewijzigd naar caching_sha2_password, en bleef werken in MySQL Workbench, maar toch ook een tweede user met identieke rechten gemaakt.
WildFly
v1 on Ubuntu
- /etc/default/wildfly-env
- /etc/init.d/wildfly-env
+ autostart:
- sudo update-rc.d wildfly-env defaults
v2 on Debian
See: https://linuxhostsupport.com/blog/how-to-install-wildfly-14-on-debian-9/
/etc/default/wildfly
Contrary to the description, use your server IP instead of 0.0.0.0
Line endings
Make sure the line endings of your Linux scripts are not DOS, but Linux/Unix like. If necessary, correct them in vi by issuing the following command:
:set fileformat=unix
Source: https://stackoverflow.com/questions/2920416/configure-bin-shm-bad-interpreter
Files concerned:
- vi /etc/default/wildfly
- vi /opt/wildfly/bin/launch.sh
- vi /etc/systemd/system/wildfly.service
- vi /etc/apache2/sites-available/your-domain.conf
java.lang.OutOfMemoryError
Adjust memory settings in /opt/wildfly/bin/standalone.conf
# JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="-Xms384m -Xmx512m -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
So both the values for -Xms and -XX:MetaspaceSize must be larger.
ulimit -a?
core file size (blocks, -c) 0
...
max locked memory (kbytes, -l) 64
...
Op server101 is dat unlimited en 16384 resp.
ulimit -c unlimited
ulimit -l 16384
Maar eigenlijk niet nodig, blijkt achteraf
/opt/wildfly/standalone/configuration/logging.properties
File in gebruik ziet er totaal anders uit dan in de distributie, nochtans geen handmatige wijzigingen gedaan, maar:
# Note this file has been generated and will be overwritten if a
# logging subsystem has been defined in the XML configuration.
/opt/wildfly/standalone/configuration/standalone.xml: bind addresses
Alle bind addresses staan standaard op 127.0.0.1.
Wijzig dat in het publieke IP-adres van je server:
...
<wsdl-host>${jboss.bind.address:123.4.5.6}</wsdl-host>
...
<inet-address value="${jboss.bind.address.management:123.4.5.6}"/>
...
<inet-address value="${jboss.bind.address:123.4.5.6}"/>
...
Launch: manually and/or as a service
Manually
/opt/wildfly/bin/launch.sh standalone standalone.xml 12.345.678.901
If everything goes fine, the startup ends with something like:
11:14:36,061 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6)
11:14:36,262 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://12.345.678.901:9990/management
11:14:36,275 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://12.345.678.901:9990
11:14:36,276 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 5262ms - Started 331 of 577 services (393 services are lazy, passive or on-demand)
As a service
three commands: start, stop, status
systemctl start wildfly
systemctl status wildfly
● wildfly.service - The WildFly Application Server
Loaded: loaded (/etc/systemd/system/wildfly.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2022-03-29 11:18:04 CEST; 4s ago
Main PID: 2824 (sh)
Tasks: 98
CGroup: /system.slice/wildfly.service
├─2824 /bin/sh /opt/wildfly/bin/launch.sh standalone standalone.xml 1.2.3.4
├─2825 /bin/sh /opt/wildfly/bin/standalone.sh -c standalone.xml -b 1.2.3.4
└─2881 java -D[Standalone] -server -Xms384m -Xmx512m -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jbo
Mar 29 11:18:04 h1234567.myserver.tld systemd[1]: Started The WildFly Application Server.
systemctl stop wildfly
DefaultTasksMax=infinity
Looking back on my changes, I noticed that the following setting also needs to be changed for WildFly to run on my system (don't know if it makes any difference for running it manually and/or as a service):
In /etc/systemd/system.conf, add the following:
DefaultTasksMax=infinity
(source: https://stackoverflow.com/questions/16789288/java-lang-outofmemoryerror-unable-to-create-new-native-thread)
Check in the browser
When the server runs, go to http://12.345.678.901:8080 to verify if you get the "Welcome to WildFly 10" page.
Apache + mod_jk
Installatie
sudo apt install apache2
Als het goed is, is je server nu in een browser als site bereikbaar over zijn ip-adres:
http://12.345.678.90/
/etc/systemd/journald.conf:
Storage=persistent
Nodig?
Configuratie
1) Modules
apachectl -M
toont welke modules al actief zijn.
Dan is het een kwestie van de resterende in te schakelen (a2enmod), als ze niet conflicteren met andere (zoals mpm_event en mpm_worker). Dan moet je de conflicterende eerst uitschakelen (a2dismod):
sudo a2enmod authz_groupfile
sudo a2enmod cgid
sudo a2enmod expires
sudo a2enmod headers
sudo a2enmod info
sudo a2dismod mpm_event
sudo a2enmod mpm_worker
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
sudo a2enmod rewrite
sudo a2enmod ssl
sudo systemctl restart apache2
2) Verdere configuratie
- /srv/conf/serverx.conf
- /etc/apache2/sites-available/serverx.conf → /srv/conf/serverx.conf
- /etc/apache2/sites-enabled/serverx.conf → ../sites-available/serverx.conf
3) hosts file op client
Zolang je geen domein bestelt of verhuist, kun je je site bereiken via http://12.345.678.90/.
Wil je toch http://mijndomein.tld gebruiken, wijzig dan het bestand "C:\Windows\System32\drivers\etc\hosts" op je lokale toestel:
12.345.678.90 mijndomein.tld
sendmail
Release upgrade naar Ubuntu 24.04 LTS
- waarschuwing dat je installeert via ssh - toch doorgegaan - alles vlot verlopen
- volgende upgrade via VNC-console?
foswiki on your LAMP
Ondanks het feit dat ik de stappen van de installation file (https://foswiki.org/System/InstallationGuide) volgde, bleef ik plain text krijgen.
Pas na het uitvoeren van onderstaande, kreeg ik een error (wat in dit geval dus beter is dan de plain text van ervoor):
[1] Install [mod_perl].
root@www:~# apt -y install libapache2-mod-perl2
root@www:~# vi /etc/apache2/conf-available/mod_perl.conf
# create new
# for example, set PerlRun mode under the "/var/www/perl"
PerlSwitches -w
PerlSwitches -T
Alias /perl /var/www/perl
<Directory /var/www/perl>
AddHandler perl-script .cgi .pl
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders
Options +ExecCGI
</Directory>
<Location /perl-status>
SetHandler perl-script
PerlResponseHandler Apache2::Status
Require ip 127.0.0.1 10.0.0.0/24
</Location>
root@www:~# a2enconf mod_perl
Enabling conf mod_perl.
To activate the new configuration, you need to run:
systemctl reload apache2
root@www:~# a2enmod cgid
Enabling module cgid.
To activate the new configuration, you need to run:
systemctl restart apache2
root@www:~# systemctl restart apache2
bron: https://www.server-world.info/en/note?os=Ubuntu_24.04&p=httpd2&f=6
wilde eerst niet starten
oplossing: https://askubuntu.com/questions/1085295/error-while-trying-to-upgrade-from-ubuntu-18-04-to-18-10-please-install-all-av
vi /opt/wildfly/bin/launch.sh
tags
Ctrl+M Ctrl M Control M ^M