sudo apt install apache2 libapache2-mod-fcgid
sudo apt-get install mysql-server
sudo apt-get install php libapache2-mod-php php-mysql
sudo vi /etc/apache2/mods-enabled/dir.conf
Make index.php 1st item, from from end. and save exit.
sudo systemctl restart apache2
sudo apt-get install php-cli
sudo systemctl restart apache2
Allow ssh
1. First update OS# Fetches the list of available updates
sudo apt update
# Installs some updates; does not remove packages
sudo apt upgrade
# Removes any old packages that are no longer needed
sudo apt autoremove
2. Install ssh
sudo apt install openssh-server
sudo systemctl status ssh
3. Update Firewall
sudo ufw allow ssh
Firewall
$ sudo ufw status
Status: inactive
$ sudo ufw enable
Firewall is active and enabled on system startup
$ sudo ufw status
Status: active
$ sudo ufw allow 80
$ sudo ufw allow 443
$ sudo ufw disable
Firewall stopped and disabled on system startup
Restart with above command
sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
80 ALLOW IN Anywhere
443 ALLOW IN Anywhere
22/tcp (v6) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
443 (v6) ALLOW IN Anywhere (v6)
SSH commands
SSH service by running:
$ sudo systemctl stop ssh
To start it again run:
$ sudo systemctl start ssh
To disable the SSH service to start during system boot run:
$ sudo systemctl disable ssh
br />To enable it again type:
$ sudo systemctl enable ssh
No comments:
Post a Comment