Skip to content

Instantly share code, notes, and snippets.

@mcroteau
Last active January 18, 2022 13:49
Show Gist options
  • Save mcroteau/20f88539b2079dcf48630d7c2d5984eb to your computer and use it in GitHub Desktop.
Save mcroteau/20f88539b2079dcf48630d7c2d5984eb to your computer and use it in GitHub Desktop.
Ubuntu Server Setup
Install MySql Server
apt install mysql-server
Check to make sure it’s running…
systemctl status mysql
Update the root password
mysql -u root
then
alter user 'root'@'localhost' identified by 'password';
Create separate user for MySql and PhpMyAdmin
mysql -u root
create user user@localhost identified by 'password';
Grant all privileges to new user
grant all privileges on *.* to 'user'@'localhost';
Exit
exit;
Install PhpMyAdmin and everything needed for it to run…
apt install phpmyadmin
Create symbolic link to configuration and enable apache configuration
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
Enable Apache configuration for PhpMyAdmin
a2enconf phpmyadmin
install apache2 php package (thank you!)
sudo apt install php libapache2-mod-php
Reload Apache
systemctl reload apache2
now allow port 80 to be used
sudo ufw allow 80
add 81 as a port to listen on
vi /etc/apache2/ports.conf
add
Listen 8081
sudo lsof -i -P -n | grep LISTEN
### Nginx Configuration continue..
https://itectec.com/ubuntu/ubuntu-change-phpmyadmin-port-from-80-to-another-number/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment