https://www.hostwinds.kr/tutorials/how-to-install-openlitespeed-web-server-ubuntu-18-04

 

OpenLitespeed 웹 서버 (Ubuntu 18.04) 설치 방법 | Hostwinds

LiteSpeed는 LiteSpeed Technologies에서 개발하고 소유 한 웹 서버입니다. HostWinds는 모든 기기에 LiteSpeed LSWS (Web Server Enterprise Edition)를 설치합니다. 비즈니스 웹 호스팅 여러 웹 사이트에 가능한 가장 빠

www.hostwinds.kr

과제에서 많은것을 사용하지 말라한다 

4등인 이것을 싸용하자

블로그 이미지

Or71nH

,

https://nostressdev.tistory.com/11?category=868783 

 

VirtualBox Debian - lighttpd, mariaDB, php로 wordpress 구축

워드프레스를 설치하려면 PHP를 사용할 수 있는 웹서버와 데이터베이스 서버가 필요하다. 웹 서버는 Lighttpd, 데이터베이스 서버는 MariaDB 로 진행! 소프트웨어 측면에서의 웹 서버란, 웹 브라우저

nostressdev.tistory.com

 

여기를 참고하기 바란다

포트는 열어주어야하니 ufw 설정과

virtualbox 포트 설정 

주의!! 80 포트는 맥에서 사용중이라 딴거로 변환하여 받아야한다

블로그 이미지

Or71nH

,

 

스넵샷은 보고 따라하기 밖에 답없음

블로그 이미지

Or71nH

,

 

1. monitoring 만들기

더보기
#!/bin/bash

uname_all=$(uname --all)
cpu_pro=$(grep "physical id" /proc/cpuinfo | uniq | wc -l)
vcpu_pro=$(grep "^processor" /proc/cpuinfo | wc -l)
memory_use=$(free --mega | grep Mem | awk '{printf("%i/%iMB (%.2f%%)\n", $3, $2, $3/$2*100)}')
disk_usd=$(df --total --human-readable | grep "total" | awk '{printf("%s/%s (%s)\n", $3, $4, $5)}')
cpu_load=$(top -bn1 | grep "%Cpu" | awk '{printf("%.1f%%\n", (100.0-$8)%100)}')
last_boot=$(who --boot | awk '{printf("%s %s", $3, $4)}')
lvm_use=$(if [ $(lsblk | grep "lvm" | wc -l) -eq 0 ]; then echo "no"; else echo "yes"; fi)
tcp_con=$(ss -s | grep "TCP:" | tr ',' ' ' | awk '{printf("%s ESTABLISHED\n", $4)}')
user_log=$(who --count | grep "users" | tr '=' ' ' | awk '{print $3}')
ip=$(hostname -I)
mac_ip=$(ip a | grep $ip -B 3 | awk '$1 == "link/ether" {print $2}' | head -n 1)
sudo_work=$(sudo find /var/log/sudo/*/*/* -type d | wc -l)
#sudo_work=$(journalctl _COMM=sudo | grep COMMAND | wc -l)

wall "	#Architecure: $uname_all
	#CPU physical : $cpu_pro
	#vCPU : $vcpu_pro
	#Memory Usage: $memory_use
	#Disk Usage: $disk_usd
	#CPU load: $cpu_load
	#Last boot: $last_boot
	#LVM use: $lvm_use
	#Connection TCP : $tcp_con
	#User log: $user_log
	#Network: IP $ip($mac_ip)
	#Sudo : $sudo_work cmd"

 2. 자동 출력 

 - crontab -e 

 - 추가

 -- */10 * * * * /bin/monitoring.sh

끝!

 

블로그 이미지

Or71nH

,

 

 

1. 보안 설치하기 libpam-pwquailty 

 - $ apt-get install libpam-pwquality 

 - 수정하기

 -- $ vi /etc/login.defs

 -- PASS_MAX_DAYS  30

 -- PASS_MIN_DAYS  2

 -- PASS_WARN_AGE  7

 - 현재 패스워드 정책 수정 

 -- $ chage -M 30 -m 2 -W 7 kyoulee

 -- $ chage -M 30 -m 2 -W 7 root

 - 패스워드 설정

 -- $ vi /etc/security/pwquallty.conf

 -- 수정

더보기
# Configuration for systemwide password quality limits
# Defaults:
#
# Number of characters in the new password that must not be present in the
# old password.
difok = 7
#
# Minimum acceptable size for the new password (plus one if
# credits are not disabled which is the default). (See pam_cracklib manual.)
# Cannot be set to lower value than 6.
minlen = 10
#
# The maximum credit for having digits in the new password. If less than 0
# it is the minimum number of digits in the new password.
dcredit = -1
#
# The maximum credit for having uppercase characters in the new password.
# If less than 0 it is the minimum number of uppercase characters in the new
# password.
ucredit = -1
#
# The maximum credit for having lowercase characters in the new password.
# If less than 0 it is the minimum number of lowercase characters in the new
# password.
# lcredit = 0
#
# The maximum credit for having other characters in the new password.
# If less than 0 it is the minimum number of other characters in the new
# password.
# ocredit = 0
#
# The minimum number of required classes of characters for the new
# password (digits, uppercase, lowercase, others).
# minclass = 0
#
# The maximum number of allowed consecutive same characters in the new password.
# The check is disabled if the value is 0.
maxrepeat = 3
#
# The maximum number of allowed consecutive characters of the same class in the
# new password.
# The check is disabled if the value is 0.
# maxclassrepeat = 0
#
# Whether to check for the words from the passwd entry GECOS string of the user.
# The check is enabled if the value is not 0.
gecoscheck = 1
#
# Whether to check for the words from the cracklib dictionary.
# The check is enabled if the value is not 0.
# dictcheck = 1
#
# Whether to check if it contains the user name in some form.
# The check is enabled if the value is not 0.
usercheck = 1
#
# Length of substrings from the username to check for in the password
# The check is enabled if the value is greater than 0 and usercheck is enabled.
# usersubstr = 0
#
# Whether the check is enforced by the PAM module and possibly other
# applications.
# The new password is rejected if it fails the check and the value is not 0.
# enforcing = 1
#
# Path to the cracklib dictionaries. Default is to use the cracklib default.
# dictpath =
#
# Prompt user at most N times before returning with error. The default is 1.
# retry = 3
#
# Enforces pwquality checks on the root user password.
# Enabled if the option is present.
enforce_for_root
#
# Skip testing the password quality for users that are not present in the
# /etc/passwd file.
# Enabled if the option is present.
# local_users_only

 - 패스워드 바꾸기

  -- $passwd kyoulee

  -- 비번~

 

- 수도 옵션주기 

 -- apt-get install sudo

 - sudo adduser kyoulee sudo

 - sudo groupadd user42

- sudo adduser kyoulee sudo

블로그 이미지

Or71nH

,