Re: [PLUG] MediaWiki configuration

2023-04-21 Thread Michael Rasmussen

Could you elaborate on your problems?
I am a MediaWiki user.

---
   Michael Rasmussen
Be Appropriate && Follow Your Curiosity

On 2023-04-20 19:25, Keith Lofstrom wrote:

Any recent MediaWiki deployers on the list?

For many years, I have operated many old MoinMoin (Python)
wikis on many old distros.  MoinMoin isn't getting much
maintenance attention, while Python is evolving beyond
compatibility with MoinMoin code.

MediaWiki (PHP), the engine underneath Wikipedia, currently
has the majority share of new wiki deployments, and is
actively (perhaps TOO actively) maintained and enhanced.

So, I hope to "futureproof" my wikis by converting them to
MediaWiki.  There are cheesy scripts for that.

As I write this, I have not yet successfully configured
a functional MediaWiki instance.  There are many tutorials
online about that, but most are years out of date.
For example, procedures for setting up mysql, rather than
the current mariaDB.

I'm probably not asking the right questions or looking at
the best tutorial websites.

IF YOU HAVE SET UP MEDIAWIKI RECENTLY, CAN YOU POINT ME
AT GOOD /RECENT/ TUTORIALS?

Perhaps the most useful thing would be an "ls -lR" listing
of the files and programs and libraries used by a recent
implementation of MediaWiki, so I know what files are
supposed to be there, permissions and ownerships and sizes.

And yes, I will sign an NDA if necessary, and can even
offer boilerplate forms for that.

Keith L.

P.S.; I know there are rental MediaWikiFarms, but I hope
to continue integrating my wikis with legacy html pages
and online executables.  MediaWiki has many extensions
that might help with this.


Re: [PLUG] MediaWiki configuration

2023-04-21 Thread Ted Mittelstaedt
My guess is that it's not the MediaWiki install that's the problem it's the 
dependencies.

On Ubuntu for example if you install apache first then php, it won't enable 
mod_php and may not even install it.

This causes endless problems with people who don't have a lot of experience 
installing this kind of software on Linux.  MediaWiki does have a installation 
requirements page that gives, for example a  generic install line for a fresh 
ubuntu installation that would install php and all of the dependencies properly 
but if the system is already setup and installed then it may not do it 
properly.  But of course, MediaWiki's page on doing this does NOT discuss all 
of the dependencies of the MediaWiki dependencies they are telling you to 
install so it's pretty lame - typical of UNIX man pages, it's only useful to 
someone who already knows what's in the man page. LOL.

If Keith is trying to install MediaWiki on a system that already has MoinMoin 
on it, and run both of them in parallel on the same system that may require 
some advanced configuration.

Keith, here is a soup-to-nuts install instruction set for you.  It only took me 
1.5 hours to make up, it's easy.  Note that the actual MediaWiki install only 
took about 15 minutes the rest was the server setup.  It assumes a fresh Ubuntu 
20 virtual image install on Amazon Web Services.  I'll leave the image up and 
running for a week and if you want to SSH into it then send me a userID and 
password you want to use and I'll setup a shell account you can use to login 
and look at the files and such.  The wiki is here:

https://media.portlandia-servers.com/w/index.php/Main_Pageand it's online 
now.

Instructions:

Setup a free account on AWS  https://aws.amazon.com/console/

Login to AWS portal as root user and go to EC2 Dashboard

Click Instances

Click dropdown on Launch Instances and Launch Instance

Name it "MediaWiki Test Server"

under Quickstart click Ubuntu

Leave it at Ubuntu Server 22.04 LTS  free tier eligible

Leave Architecture at 64 bit x86

Under Instance type leave it at t2.micro free tier eligible

Under key pair create a new key pair named "TESTMasterKeyPair"  Download it.

Under Firewall leave at Create security group and tick allow SSH and allow 
https and http

Select 30GB  of standard (mag media) root volume NOT encrypted) storage

click Launch Instance

Click back on EC2,  Instances

Click on the Instance ID

Copy the Public IPv4 DNS name in this case 
ec2-34-217-63-231.us-west-2.compute.amazonaws.com

Optionally CNAME it your DNS provider to some name.

Download private key file you created earlier

On windows, 
Browse to c:\program files\putty and run puttygen
  Click Load on existing private key
  Click Save and save it as the ppk file do not add a passphrase
  In Putty click Connection -> SSH -> Auth -> Credentials and load the ppk file

Use putty to initially ssh in:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

From Linux,

ssh -i " TESTMasterKeyPair.pem" 
ubu...@ec2-34-217-63-231.us-west-2.compute.amazonaws.com

After SSHing into the system with ID of ubuntu, sudo -s

adduser tedm, password whateveryouwant
add tedm into admin group,  vi /etc/group

go to /etc/ssh and modify sshd_config to have a YES in PasswordAuthentication
reboot

Now you can SSH in via a real SSH client like Teraterm normally instead of a 
stripped down emulator like putty

Give it a minute or to to finish rebooting then 
Ssh into ec2-34-217-63-231.us-west-2.compute.amazonaws.com

In the new server it's hostname is 

tedm@ip-172-31-20-73:~$ cat /etc/hostname
ip-172-31-20-73
tedm@ip-172-31-20-73:~$

Optionally, 
set domain name to what you want.  I'll use media.portlandia-servers.com for fun

sudo -s

change hostname to what you want

vi /etc/hostname

root@ip-172-31-20-73:/home/tedm# cat /etc/hostname
media
root@ip-172-31-20-73:/home/tedm#

then set your hostname in /etc/hosts

root@ip-172-31-20-73:/home/tedm# cat /etc/hosts
127.0.0.1 media.portlandia-servers.com media
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback

apt update
apt dist-upgrade
ok on newer kernel

reboot

ssh into media.portlandia-servers.com

sudo -s

apt install php

this installs php 8.1 and apache and mod-php8.1

apt install php-mysql

apt install mysql-server   this puts in mysql 8 client and server

From the line out of the mediaserver wiki install instructions here 

https://www.mediawiki.org/wiki/Manual:Installation_requirements

(strike the mariadb-server)

apt-get install php php-apcu php-intl php-mbstring php-xml php-mysql 
php-calendar  apache2

Now setup mysql:

mysql_secure_installation
No on validate password
when it goes into the loop asking for the password then erroring it, in another 
ssh session 

pkill -f mysql_secure_installation

this leaves mysql open.  As sudo -s in the first session

root@media:/home/tedm# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL