Myluzh Blog

Linux 启动服务 systemctl命令

2020-12-19 myluzh Linux

systemctl is-enabled servicename.service #查询服务是否开机启动 systemctl enable *.service #开机运行服务 systemctl disable *.service #取消开机运行 systemctl start *.service #启动服务 systemctl stop *.service #停止服务 systemctl restart *.service #重启服务 systemctl reload *.service #重新加载服务配置文件 systemctl status *.service #查询服务运行状态

阅读全文>>

标签: centos linux ubuntu systemctl

评论(0) (915)

Ubuntu 20.04 换国内源

2020-12-18 myluzh Linux

文件位置:/etc/apt/sources.list #添加阿里源 deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ ...

阅读全文>>

标签: ubuntu

评论(0) (845)

Ubuntu 20.04 安装配置LNMP环境

2020-12-18 myluzh Linux

0x01安装Nginx 安装Nginx sudo apt-get install nginx 启动Nginx服务 sudo /etc/init.d/nginx start 停止Nginx服务 sudo /etc/init.d/nginx stop 加载最新配置 sudo /etc/init.d/nginx reload 默认配置文件位置简单配置 /etc/nginx/sites-enabled/default server { listen 80; server_name localhost; root /var/www/html; location / { index index.php index.html; #autoindex off; } #开启php location ~ \.php(.*)$ { #"netstat -npl | grep php"可以找到php run路径 ...

阅读全文>>

标签: ubuntu lnmp

评论(0) (783)

CentOS7安装谷歌bbr加速

2020-11-10 myluzh Linux

!测试环境为CentOS 7 x64。CentOS 6及以下版本不通用 0x01  yum系统更新(更新到7.3) yum update 0x02  查看系统版本 cat /etc/redhat-release 输出如下,则表示已升级到7.3 CentOS Linux release 7.3.1611 (Core) 0x03  安装elrepo并升级内核 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 正常情况下将输出如下: Transaction Summary ================================================================================ Insta...

阅读全文>>

标签: centos bbr

评论(0) (1052)

CentOS7安装配置socks5代理

2020-11-9 myluzh Linux

0x01 安装 注意:socks需要防火墙放行端口。 1.安装依赖库 yum -y install gcc gcc-c++ automake make pam-devel openldap-devel cyrus-sasl-devel 2.下载源码包 编译 安装 wget http://downloads.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz cp ss5-3.8.9-8.tar.gz /usr/local/src cd /usr/local/src tar zxvf ss5-3.8.9-8.tar.gz cd ss5-3.8.9-8 ./configure make make install 0x02 配置 1.修改 /etc/opt/ss5/ss5.conf vi /etc/opt/ss5/ss5.conf ====================== //取消 line 87 注释 #无用户鉴权 auth 0.0.0.0/0 - - #用户鉴权(建议使用) auth 0.0.0.0/0 ...

阅读全文>>

标签: centos socks

评论(0) (1106)

CentOS7/8 防火墙 Firewalld配置

2020-11-9 myluzh Linux

一、查看防火墙状态 查看防火墙状态:systemctl status firewalld 开启防火墙:systemctl start firewalld 关闭防火墙:systemctl stop firewalld 若遇到无法开启 先用:systemctl unmask firewalld.service 然后:systemctl start firewalld.service 二、查看对外开放的端口状态 查询已开放的端口列表:firewall-cmd --zone=public --list-ports 查询指定端口是否开放:netstat -apn | grep 端口号 查询指定端口是否已开:firewall-cmd --query-port=666/tcp 提示 yes,表示开启;no表示未开启。 三、对外开发端口 查看想开的端口是否已开:firewall-cmd --query-port=123/tcp 添加指定需要开放的端口:firewall-cmd --add-port=123/tcp --permanent 重载入添加的端口:firewall-cmd --reload 查...

阅读全文>>

标签: centos 防火墙 firewalld

评论(0) (887)