|
Update available packages
|
sudo apt update |
|
Upgrades all currently installed packages
|
sudo apt upgrade |
|
Remove packages that are no longer required
|
sudo apt autoremove |
|
1. Install ufw
|
sudo apt install ufw |
|
2 Setup default policies
|
sudo ufw default deny incoming |
sudo ufw default allow outgoing |
|
|
3. Allow SSH
|
sudo ufw allow 22 |
|
...or
|
sudo ufw allow ssh |
|
4. Enable ufw
|
sudo ufw enable |
|
5. Allow other connections
|
|
|
...Apache
|
sudo ufw allow 'Apache Full' |
|
...Webmin
|
sudo ufw allow 10000 |
|
View current ufw status
|
sudo ufw status verbose |
|
1. Edit the sources list
|
sudo nano /etc/apt/sources.list |
|
Add the following line to your sources file
|
deb https://download.webmin.com/download/repository sarge contrib |
|
2. Download the Webmin PGP key
|
|
3. Install the Webmin PGP key
|
sudo apt-key add jcameron-key.asc |
|
4. Update packages including the Webmin repository
|
sudo apt update |
|
5. Install Webmin
|
sudo apt install webmin |
|
Once the installation finishes, you'll be presented with the following output:
|
|
Webmin install complete. You can now login to https://your_server_ip:10000 as root with your root password, or as any user who can use
sudo. |
|
Add port 10000 to your firewall
|
sudo ufw allow 10000 |
|
Install Apache 2.x
|
sudo apt install apache2 |
|
... or, as a single command
|
sudo apt update && apt-get install apache2 |
|
Enable ports through
ufw firewall |
sudo ufw allow http && ufw allow https |
|
... or, via pre-defined app settings
|
sudo ufw allow 'Apache Full' |
|
Start Apache
|
sudo apachectl start |
|
Restart Apache after changing settings
|
sudo apachectl restart |
|
Where is Apache installed
|
which apache2 |
|
1. Install PHP
|
sudo apt install php libapache2-mod-php |
|
2. Restart Apache
|
sudo systemctl restart apache2 |
|
Check where PHP is installed
|
which php |
|
Check PHP version
|
php -v |
|
Check INI file configuration
|
php --ini |
|
Dump PHP configuration
|
php --info |
|
Install optional modules
|
apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php |
|
check all the PHP modules available in Ubuntu
|
apt-cache search --names-only ^php |
|
Install MySQL
|
sudo apt install mysql-server |
|
Once the installation is complete, the MySQL server should be started automatically.
|
|
|
Check the status of MySQL
|
sudo netstat -tap | grep mysql |
|
Start the service (if not running)
|
sudo systemctl restart mysql.service |
|
Install MongoDB package
|
sudo apt install -y mongodb-org |
|
Check MongoDB service status
|
sudo systemctl status mongodb |
|
Start MongoDB
|
sudo systemctl start mongod.service |
|
Stop MongoDB
|
sudo systemctl stop mongod.service |
|
Restart the MongoDB service
|
sudo systemctl restart mongodb |
|
Enable automatic service startup
|
sudo systemctl enable mongod.service |
|
Disable automatic service startup
|
sudo systemctl disable mongodb |
"I've been trying to install Webmin on my Ubuntu 18.04 server following various guides, but I keep running into issues. After adding the repository and updating, the installation seems to complete, but I can’t access Webmin at **https://[server IP]:10000/**. I checked that `ufw` is allowing port 10000, but still no luck. Restarting Webmin with `sudo systemctl restart webmin` doesn’t seem to help either. I'm wondering if there's something outdated in the process or if Webmin no longer supports 18.04 properly. Should I be looking at a different method? I found this updated guide on **[Install Webmin on Ubuntu](https://docs.vultr.com/how-to-install-webmin-on-ubuntu-24-04)**—would following those steps work on my version, or should I consider upgrading my server? Any advice would be appreciated!"
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.