netstat -ntlp
lsof -i:9091
yum install lrzsz -y
yum install fail2ban
vim /etc/fail2ban/jail.d/jail.local
#de****t這裡是設定全域性設定,如果下面的監控沒有設定就以全域性設定的值設定。
[default]
# 用於指定哪些位址ip可以忽略 fail2ban 防禦,以空格間隔。
ignoreip = 127.0.0.1/8
# 客戶端主機被禁止的時長(預設單位為秒)
bantime = 3600
# 過濾的時長(秒)
findtime = 600
# 匹配到的閾值(次數)
maxretry = 3
[ssh-iptables]
# 是否開啟
enabled =
true
# 過濾規則
filter = sshd
# 動作
action = iptables[name=ssh, port=ssh, protocol=tcp]
# 日誌檔案的路徑
logpath = /var/log/secure
# 匹配到的閾值(次數)
maxretry = 3
# 啟動
systemctl start fail2ban.service
# 檢視被禁止的ip
fail2ban-client status ssh-iptables
fail2ban-client reload
wget
rpm -uvh mysql57-community-release-el7.rpm
yum repolist all |
grep mysql
yum install mysql-community-server
systemctl start mysqld.service
grep
'password' /var/log/mysqld.log
mysql -uroot -p
alter user 'root'@'localhost' identified by '123qwe!@#qwe'
use mysql
update user set host =
'%' where host =
'localhost'
flush privileges
github上面有倉庫的位址 我們只需要將源配置好就可以了
wget
vim /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=
gpgcheck=1
gpgkey=
repo_gpgcheck=0
enabled=1
yum clean all
yum makecache
yum install rabbitmq-server-3.7.12-1.el7.noarch.rpm
rabbitmq命令
啟動rabbitmq服務
systemctl start rabbitmq-server.service
關閉rabbitmqctl stop
狀態檢視
rabbitmqctl status
啟用外掛程式
rabbitmq-plugins enable rabbitmq_management
重啟服務
service rabbitmq-server restart
新增帳號:root 密碼:root
rabbitmqctl add_user root root
賦予其administrator角色
rabbitmqctl set_user_tags root administrator
設定許可權
rabbitmqctl set_permissions -p / root ".*"
".*"
".*"
訪問
linux快速搭建Docker環境
linux運維記錄之搭建docker服務 day2 安裝docker的依賴庫。新增docker ce的軟體源資訊 安裝docker ce yum makecache fast yum y install docker ce 啟動docker服務 systemctl start docker1.首先你...
LAMP環境快速搭建
1.安裝httpd httpd 安裝httpd root localhost httpd chkconfig httpd on 開機啟動 root localhost httpd service httpd start 啟動服務 root localhost httpd elinks source ...
linux搭建環境
搭建lamp環境 centos6.9 安裝軟體有兩種方式一種是原始碼包安裝,另一種是二進位製包安裝。兩種各有好處,按需選擇 使用非常簡單。1.更新一下yum y update 2.安裝ap安裝php 安裝完成後,用 etc init.d httpd start 啟動apache 設為開機啟動 chk...