Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Ubuntu 2022 install (all-in-one)

Questions related to installing, updating, setting up and configuring
Post Reply
orangezero
Posts: 22
Joined: Fri Jan 03, 2020 7:08 pm

Ubuntu 2022 install (all-in-one)

Unread post by orangezero »

Here are my steps for an all-in-one place ubuntu install:

1. Install a fresh version of Ubuntu 20.04

2. Install lamp server:
sudo apt update (checks for updates)
sudo apt upgrade (installs those new updates)
sudo apt install tasksel (small program to automate lamp install)
sudo tasksel install lamp-server (installs apache, mysql, and php, ***would this miss anything required?***)

3. To secure your mysql server:
sudo mysql_secure_information (run through the steps as directed)

4. To allow a connection through your firewall:
sudo ufw allow in "Apache Full" (this gives access to TCP 80 and TCP 443)

5. To use a password to connect to mysql as root: ***Does this need done IF I'm not supposed to really use root?***
sudo mysql (to start mysql shell)
(should show mysql> which is the mysql shell)
SELECT user,authentication_string,plugin,host FROM mysql.user; (this will show a table with root having auth_socket, which we need to change)
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'X'; (change the X to your password)
FLUSH PRIVILEGES;
SELECT user,authentication_string,plugin,host FROM mysql.user; (now the table should show root as mysql_native_password under plugin)
exit (exit mysql shell)

5b. Create user other than root in mysql
sudo mysql -u root -p
mysql> CREATE USER 'X'@'host' identified with mysql_native_password BY 'Xpassword'; ***caching_sha2_password and auth_socket should not be used so phpmyadmin will work properly, correct?***
This creates user X with password Xpassword.

6. In Terminal, download and put nubuilder folder into /var/www/html
wget https://sourceforge.net/projects/nubuil ... t/download -O nubuilder.zip ***not sure how to show all text here, is this always linking to the newest build?***
unzip nubuilder.zip -d X (where X is the name of the folder you are putting database)

7. Create Database for nubuilder
sudo mysql -u root -p
mysql> CREATE DATABASE X
this creates a database named X

8. In Terminal, edit text file to your database name and login credentials:
nano /var/www/html/X/nuconfig.php
edit section for database name, look for line with this and change the X: $nuConfigDBName = "X";
set user and password in nuconfig.php file

9. Adjust system settings:
sudo chown -R www-data:www-data /var/www/html/X
cd /var/www/html/X
sudo chmod 400 nuconfig.php


Confirm Apache is running with: sudo systemctl status apache2.service
Confirm mysql is running with: sudo systemctl status mysql

I thought all good, and I can get general apache screen on localhost, but my browser is blank and apache log shows this error when I try to input localhost/T:
PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /var/www/html/T/core/nudatabase.php:3\nStack trace:\n#0 /var/www/html/T/core/nuchoosesetup.php(20): require_once()\n#1 /var/www/html/T/index.php(4): require_once('/var/www/html/T...')\n#2 {main}\n thrown in /var/www/html/T/core/nudatabase.php on line 3

How to fix to get working?
Also, it does appear to suggest in the nuconfig.php to use a different user other than root, so I added that as well. I still can't get more than a blank page on localhost/T/. It sucks I feel I could teach a class on setting up a lamp server, but I still fail to get it loaded. I don't like that the main impediment to nubuilder is the massive amount of work initially. Xampp is easy for me now, but I want to run it on linux.

Thanks
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: Ubuntu 2022 install (all-in-one)

Unread post by kev1n »

Hi,

Please read the comments about mb_internal_encoding()

viewtopic.php?t=9751
Post Reply