Источник: Начальная настройка сервера Ubuntu 18.04

root@iabzalov:~# adduser aiv
Adding user `aiv' ...
Adding new group `aiv' (1002) ...
Adding new user `aiv' (1002) with group `aiv' ...
Creating home directory `/home/aiv' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for aiv
Enter the new value, or press ENTER for the default
Full Name []: Igor
Room Number []: 65
Work Phone []: +7 3852 388735
Home Phone []: +7 963 502 1357
Other []:
Is the information correct? [Y/n] y
root@iabzalov:~# adduser sdv
Adding user `sdv' ...
Adding new group `sdv' (1003) ...
Adding new user `sdv' (1003) with group `sdv' ...
Creating home directory `/home/sdv' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for sdv
Enter the new value, or press ENTER for the default
Full Name []: Denis Saigashev
Room Number []:
Work Phone []:
Home Phone []: +7 902 998 4093
Other []:
Is the information correct? [Y/n] y
root@iabzalov:~# usermod -aG sudo aiv
root@iabzalov:~# usermod -aG sudo sdv
root@iabzalov:~# ufw app list
Available applications:
Apache
Apache Full
Apache Secure
Bind9
Dovecot IMAP
Dovecot POP3
Dovecot Secure IMAP
Dovecot Secure POP3
OpenSSH
root@iabzalov:~# ufw status
Status: inactive
root@iabzalov:~# ufw allow OpenSSH
Rules updated
Rules updated (v6)
root@iabzalov:~# ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@iabzalov:~# ufw status
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)

aiv@iabzalov:~$ sudo ufw allow http
aiv@iabzalov:~$ sudo ufw allow https
aiv@iabzalov:~$ sudo ufw allow from 5.166.76.6/24 to any port 8083

aiv@iabzalov:~$ sudo ufw status
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
8083 ALLOW 5.166.76.0/24
OpenSSH (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)

aiv@iabzalov:~$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Wed 2019-04-17 03:32:17 +07; 1h 19min ago
Main PID: 1026 (apache2)
Tasks: 9 (limit: 919)
CGroup: /system.slice/apache2.service
├─ 1026 /usr/sbin/apache2 -k start
├─ 1030 /usr/sbin/apache2 -k start
├─ 1044 /usr/sbin/apache2 -k start
├─ 1045 /usr/sbin/apache2 -k start
├─ 1049 /usr/sbin/apache2 -k start
├─ 1050 /usr/sbin/apache2 -k start
├─ 1055 /usr/sbin/apache2 -k start
├─ 1538 /usr/sbin/apache2 -k start
└─22982 /usr/sbin/apache2 -k start

Apr 17 03:32:15 iabzalov.site systemd[1]: Starting The Apache HTTP Server...
Apr 17 03:32:16 iabzalov.site apachectl[858]: AH00558: apache2: Could not reliably determine the server's fully qualifie
Apr 17 03:32:17 iabzalov.site systemd[1]: Started The Apache HTTP Server.

aiv@iabzalov:~$ sudo find / -name apache2-systemd.conf
/lib/systemd/system/apache2.service.d/apache2-systemd.conf

1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)