CentOS | 謎樣のMIS https://twmis.com Https://twmis.com Thu, 10 Oct 2024 07:04:35 +0000 zh-TW hourly 1 https://twmis.com/wp-content/uploads/2026/06/cropped-2026-04-26-19-53-25-Photoroom-32x32.png CentOS | 謎樣のMIS https://twmis.com 32 32 Debian 上安裝YunoHost面板 https://twmis.com/debian-%e4%b8%8a%e5%ae%89%e8%a3%9dyunohost%e9%9d%a2%e6%9d%bf/?utm_source=rss&utm_medium=rss&utm_campaign=debian-%25e4%25b8%258a%25e5%25ae%2589%25e8%25a3%259dyunohost%25e9%259d%25a2%25e6%259d%25bf https://twmis.com/debian-%e4%b8%8a%e5%ae%89%e8%a3%9dyunohost%e9%9d%a2%e6%9d%bf/#respond Wed, 23 Oct 2019 16:36:10 +0000 https://twmis.com/?p=249 官網:https://yunohost.org/ 詳細安裝說明 https://yunohost.org/#/ …

The post Debian 上安裝YunoHost面板 first appeared on 謎樣のMIS.

]]>
官網:https://yunohost.org/

詳細安裝說明 https://yunohost.org/#/install_manually

一旦有了Debian 9 內核> = 3.12並訪問了服務器上的命令行(直接或通過SSH),就可以通過以root身份運行命令來安裝yunohost:

curl https://install.yunohost.org | bash

(如果curl未在系統上安裝,則可能需要使用進行安裝apt install curl。否則,如果命令沒有執行任何操作,則可能需要apt install ca-certificates

The post Debian 上安裝YunoHost面板 first appeared on 謎樣のMIS.

]]>
https://twmis.com/debian-%e4%b8%8a%e5%ae%89%e8%a3%9dyunohost%e9%9d%a2%e6%9d%bf/feed/ 0
Debian 9上安裝VestaCP面板 https://twmis.com/debian-9%e4%b8%8a%e5%ae%89%e8%a3%9dvestacp%e9%9d%a2%e6%9d%bf/?utm_source=rss&utm_medium=rss&utm_campaign=debian-9%25e4%25b8%258a%25e5%25ae%2589%25e8%25a3%259dvestacp%25e9%259d%25a2%25e6%259d%25bf https://twmis.com/debian-9%e4%b8%8a%e5%ae%89%e8%a3%9dvestacp%e9%9d%a2%e6%9d%bf/#respond Wed, 23 Oct 2019 16:30:14 +0000 https://twmis.com/?p=245 官網:https://vestacp.com/進階的安裝設定可參考官網說明操作系統支援 CentOS、Debi …

The post Debian 9上安裝VestaCP面板 first appeared on 謎樣のMIS.

]]>
官網:https://vestacp.com/
進階的安裝設定可參考官網說明
操作系統支援 CentOS、Debian、Ubuntu

# Connect to your server as root via SSH
ssh root@your.server
# Download installation script
curl -O http://vestacp.com/pub/vst-install.sh
# Run it
bash vst-install.sh

The post Debian 9上安裝VestaCP面板 first appeared on 謎樣のMIS.

]]>
https://twmis.com/debian-9%e4%b8%8a%e5%ae%89%e8%a3%9dvestacp%e9%9d%a2%e6%9d%bf/feed/ 0
CentOS 7 增加 swap https://twmis.com/centos-7-%e5%a2%9e%e5%8a%a0-swap/?utm_source=rss&utm_medium=rss&utm_campaign=centos-7-%25e5%25a2%259e%25e5%258a%25a0-swap https://twmis.com/centos-7-%e5%a2%9e%e5%8a%a0-swap/#respond Sat, 01 Sep 2018 03:59:46 +0000 https://twmis.com/?p=79 CentOS 7 增加 swap dd if=/dev/zero of=/swap bs=1024 count …

The post CentOS 7 增加 swap first appeared on 謎樣のMIS.

]]>
CentOS 7 增加 swap

dd if=/dev/zero of=/swap bs=1024 count=1048576
mkswap /swap
swapon /swap
vi /etc/fstab
/swap swap swap default 0 0

The post CentOS 7 增加 swap first appeared on 謎樣のMIS.

]]>
https://twmis.com/centos-7-%e5%a2%9e%e5%8a%a0-swap/feed/ 0
CentOS 7安裝fail2ban(iptables) https://twmis.com/centos-7%e5%ae%89%e8%a3%9dfail2ban/?utm_source=rss&utm_medium=rss&utm_campaign=centos-7%25e5%25ae%2589%25e8%25a3%259dfail2ban https://twmis.com/centos-7%e5%ae%89%e8%a3%9dfail2ban/#respond Tue, 28 Aug 2018 17:35:18 +0000 https://twmis.com/?p=48 CentOS 7安裝fail2ban 1.yum yum -y install fail2ban 2.setu …

The post CentOS 7安裝fail2ban(iptables) first appeared on 謎樣のMIS.

]]>
CentOS 7安裝fail2ban

1.yum

yum -y install fail2ban

2.setup

vi /etc/fail2ban/jail.conf

[ssh-iptables]
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
logpath = /var/log/secure
maxretry = 3
bantime = 86400

[vsftpd-iptables]
enabled = true
filter = vsftpd
action = iptables[name=VSFTPD, port=ftp, protocol=tcp]
logpath = /var/log/secure
maxretry = 3
bantime = 86400

[dovecot]
enabled = true
filter = dovecot
action = iptables-multiport[name=dovecot, port=”pop3,pop3s,imap,imaps,smtp,smtps,submission,sieve”, protocol=tcp]
logpath = /var/log/secure
maxretry = 5
bantime = 36000 #單位為秒,這邊是10小時

[dovecot-auth]
enabled = true
filter = dovecot
action = iptables-multiport[name=dovecot-auth, port=”pop3,pop3s,imap,imaps,submission,465,sieve”, protocol=tcp]
logpath = /var/log/secure
maxretry = 5
bantime = 36000 #單位為秒,這邊是10小時

[named-refused-udp]
enabled = true
filter = named-refused
action = iptables-multiport[name=Named, port=”domain,953″, protocol=udp]
logpath = /var/log/named/named_security.log
bantime = 30000000

[named-refused-tcp]
enabled = true
filter = named-refused
action = iptables-multiport[name=Named, port=”domain,953″, protocol=tcp]
logpath = /var/log/named/named_security.log
bantime = 30000000

fail2ban-client status 查看全部有幾組設定檔
fail2ban-client status dovecot 查看dovecot規則的狀態
查看目前防火牆阻擋的情況
iptables -L -n
iptables -S

誤判清除與開放:
若是某些原因造成誤鎖,可用iptables打開它

先查看規則鏈 iptables -n -L
Chain f2b-dovecot (1 references)
target prot opt source destination
REJECT all — 123.456.789.123 0.0.0.0/0 reject-with icmp-port-unreachable
RETURN all — 0.0.0.0/0 0.0.0.0/0

iptables -D f2b-dovecot -s 123.456.789.123 -j REJECT
這樣就移掉了

The post CentOS 7安裝fail2ban(iptables) first appeared on 謎樣のMIS.

]]>
https://twmis.com/centos-7%e5%ae%89%e8%a3%9dfail2ban/feed/ 0
CentOS 7安裝NGINX,PHP7,Mariadb https://twmis.com/centos-7%e5%ae%89%e8%a3%9dnginxphp7mariadb/?utm_source=rss&utm_medium=rss&utm_campaign=centos-7%25e5%25ae%2589%25e8%25a3%259dnginxphp7mariadb https://twmis.com/centos-7%e5%ae%89%e8%a3%9dnginxphp7mariadb/#respond Tue, 28 Aug 2018 17:33:34 +0000 https://twmis.com/?p=46 CentOS 7安裝NGINX,PHP7,Mariadb 1.add repo vi /etc/yum.rep …

The post CentOS 7安裝NGINX,PHP7,Mariadb first appeared on 謎樣のMIS.

]]>
CentOS 7安裝NGINX,PHP7,Mariadb

1.add repo

vi /etc/yum.repos.d/nginx.repo

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

2.

rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

3. Update && Upgrade

yum -y update && yum -y upgrade

4.install

yum -y install nginx mariadb mariadb-server php-cli php-fpm php-gd php-curl php-mbstring php-mcrypt php-odbc php-mysqlnd php-xmlrpc php-xml php-pdo php-opcache tar bzip2

5.systemctrl enable

systemctl enable nginx && systemctl enable php-fpm && systemctl enable mariadb

6.systemctrl start

systemctl start nginx && systemctl start php-fpm && systemctl start mariadb

7.setup mariadb

/usr/bin/mysql_secure_installation

8.modify /etc/php-fpm.d/www.conf

vi /etc/php-fpm.d/www.conf
listen = 127.0.0.1:9000
user = nginx
group = nginx
listen.owner = nginx
listen.group = nginx

The post CentOS 7安裝NGINX,PHP7,Mariadb first appeared on 謎樣のMIS.

]]>
https://twmis.com/centos-7%e5%ae%89%e8%a3%9dnginxphp7mariadb/feed/ 0
CentOS 7安裝BBR https://twmis.com/centos-7%e5%ae%89%e8%a3%9dbbr/?utm_source=rss&utm_medium=rss&utm_campaign=centos-7%25e5%25ae%2589%25e8%25a3%259dbbr https://twmis.com/centos-7%e5%ae%89%e8%a3%9dbbr/#respond Tue, 28 Aug 2018 17:28:50 +0000 https://twmis.com/?p=44 CentOS 7安裝BBR rpm –import https://www.elrepo.org/ …

The post CentOS 7安裝BBR first appeared on 謎樣のMIS.

]]>
CentOS 7安裝BBR

rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum –enablerepo=elrepo-kernel install kernel-ml -y
awk -F\’ ‘$1==”menuentry ” {print i++ ” : ” $2}’ /etc/grub2.cfg

grub2-set-default 0

reboot

vi /etc/sysctl.conf
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

sysctl -p

lsmod | grep bbr

reboot

The post CentOS 7安裝BBR first appeared on 謎樣のMIS.

]]>
https://twmis.com/centos-7%e5%ae%89%e8%a3%9dbbr/feed/ 0