Web (The content is still updating)
port
- Secure Shell(SSH) : 22
- HTTP : 80
- HTTPS : 443 ## Apache2
- Start our apache :
$ sudo service apache2 start
- Check the state of apache :
$ sudo service apache2 status
- Stop our apache :
$ sudo service apache2 stop
- Restart our apache :
$ sudo service apache2 restart
- Start the apache service at boot :
$ sudo systemctl enable apache2
- Stop apache service at boot :
$ sudo systemctl disable apache2
# Firewall - Open the firewall :
$ sudo ufw enable
- Check firewall status :
$ sudo ufw status
Status: active Status: inactive - Default allow all of the connect pass :
$ sudo ufw default allow
- Check incoming/outgoing status :
$ sudo ufw status verbose
- ufw allow ssh(22 port) :
$ sudo ufw allow ssh
- ufw allow http(80 port) :
$ sudo ufw allow http
- Remove http connect :
$ sudo ufw delete allow http/tcp
# Mariadb(Mysql) - Setup our Mariadb :
$ sudo mysql_secure_installation
- Start our server :
$ sudo systemctl start mariadb
- Check Mariadb status :
$ sudo systemctl status mariadb
- Login database :
$ mysql -u root -p
## Get in mysql database - Show the database :
> show databases;
- Get in the database :
> use 'database name'
- Show the data :
> show tables;