博文

2022年9月29日,天气:晴

图片

每次ubuntu12.04重启后,/etc/resolv.conf被重写为空或127.0.0.1

今天遇到一个问题:每次ubuntu12.04重启后,/etc/resolv.conf被重写为空或127.0.0.1 经过网上查资料以及本人验证,一下方法是可行的: 1.编辑/etc/resolvconf/resolv.conf.d/tail (如果没有该文件,则建立一个文件名为tail的文本文件即可) 2.在里面添加:nameserver xxx.xxx.xxx.xxx xxx替换为你要的实际dns地址(我设置的是192.168.1.1) 这样每次重启后,它会将你所编辑添加的dns服务器写入/etc/resolv.conf中 使resolv.conf不至于每次都重置成空白或只剩127.0.0.1。  

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

 安装mysql5.7备份出现上面报错 需要给账号权限 GRANT PROCESS ON *.* TO '数据库用户'@'localhost'; flush privileges;

ERROR: The certificate of `url' is not trusted. ERROR: The certificate of `url' hasn't got a known issuer.

ERROR: The certificate of `url' is not trusted. ERROR: The certificate of `url' hasn't got a known issuer. If you are using Debian or Ubuntu, install the ca-certificates package: $ sudo apt-get install ca-certificates If you don't care about checking the validity of the certificate, use the --no-check-certificate option: $ wget --no-check-certificate https://download/url Note: The second option is not recommended because of the possibility of a man-in-the-middle attack.

Could not get lock /var/lib/dpkg/lock - open

 rm /var/lib/dpkg/lock dpkg --configure -a

VLMCSD on Debian/Ubuntu

  Make sure “build-essential” package is installed on your Debian/Ubuntu machine. Login to you Linux with SSH and follow steps below: cd /opt/ git clone https://github.com/Wind4/vlmcsd/releases useradd -s /usr/sbin/nologin -r -M vlmcsd cd /opt/linux-kms-server/vlmcsd/ make Wait for it to finish, if there are no errors/warning continue with following: nano /lib/systemd/system/vlmcsd.service Add following to file: [Unit] Description=vlmcsd KMS emulator service After=network-online.target Wants=network-online.target [Service] Type=forking User=vlmcsd ExecStart= /opt/linux-kms-server/vlmcsd/ vlmcsd -l /var/log/vlmcsd/vlmcsd.log [Install] WantedBy=multi-user.target Save the file and continue creating the log folder and configure the permissions: mkdir /var/log/vlmcsd chown vlmcsd:vlmcsd /var/log/vlmcsd systemctl enable vlmcsd systemctl start vlmcsd To verify the status if the service is running, run following: systemctl status vlmcsd If everything is fine, it should look like this: ro...

Install Shadowsocks-libev on Debian 8 (Jessie)

The Vps is too old to get a newer OS from the provider. create /etc/apt/sources.list.d/jessie-backports.list, and fill in the following lines deb http://archive.debian.org/debian jessie-backports main deb http://archive.debian.org/debian jessie-backports-sloppy main apt-get update -o Acquire::Check-Valid-Until=false apt-get install shadowsocks-libev the  -o Acquire::Check-Valid-Until=false  is the key information. Hope it is helpful.

monero xmr

sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev git clone https://github.com/xmrig/xmrig.git cd xmrig #将捐赠级别重置为 0 sed -i ' s/kDefaultDonateLevel = 5/kDefaultDonateLevel = 0/1 ' src/donate.h sed -i ' s/kMinimumDonateLevel = 1/kMinimumDonateLevel = 0/1 ' src/donate.h mkdir build cd build cmake ..   (或者cmake .. -DARM_TARGET=7 (arm v7)) make https://xmrig.com/wizard创建 config.json文件 {     "autosave": true,     "cpu": true,     "opencl": false,     "cuda": false,     "pools": [         {             "url": "pool.supportxmr.com:5555",             "user": "46N2Ce9HFVATtz5JrdP5gt72sqYZ3vvzDdY3rJsbyU8pfErmc8ThU646Mbji78wh1AQS7Jjpo28voCrJpHZPaUa5PX7dzPG",             "pass": "sbbb",             "keepalive": true,             "tls": false ...

frps内网穿透

1、下载地址:https://github.com/fatedier/frp/releases 2、下载对应的安装包,解压,在服务器上直接配置frps.ini文件即可 [common] bind_port = **** // 服务端与客户端对应的端口 vhost_http_port = **** //客户端http端口 token = **** //服务端与客户端密匙 dashboard_port = *** //frps服务端面板端口 dashboard_user = *** //frps服务端面板登陆用户名 dashboard_pwd = **** //frps服务端面板登陆密码 3、配置服务自启动,在下载安装包里有个sytemd文件夹,修改frps.services里对应的frps.ini文件路径,将frps.service拷贝到/etc/systemd/system文件夹中,运行systemctl enable frps systemctl start frps即可,这样服务端就配置完成了。 4、客户端也同样下载对应的版本,然后配置frpc.ini文件即可 [common] server_addr = 服务器IP地址 server_port = ** //同服务器端一样 token = ** //同服务器端一样 [web] type = http local_port = 80 custom_domains = ***.shaogroup.com [static_file] type = tcp remote_port = 8090 plugin = static_file plugin_local_path = /mnt/movie 暴露的文件夹 plugin_strip_prefix = static plugin_http_user = *** 访问的用户名 plugin_http_passwd = **** 访问的密码