Centos7 Ocserv安装使用用户名密码认证
gsls200808
于 2021-03-11 22:18:31 发布
一键搭建V2Ray,小白福利一条命令搞定V2Ray搭建,最详细的V2Ray图文教程!
已有服务器的同学可以跳过这部分,没有服务器的同学可以先创建服务器,我使用的是搬瓦工。
首先进入官网首页:搬瓦工(BandwagonHost) ,然后点击顶部的”Register”按钮进行注册。
上图中的邮箱(Email Address)、密码(Password)、确认密码(Confirm Password)请认真填写,其他随便填。可以填真实信息。
勾选下面的“I have read and agree to the Terms of Service”,最后点击“Submit”按钮,注册后默认登录成功,接下来就可以选择你的VPS方案了。
个人只推荐,$169.99/年的 DC6 CN2 GIA-E 套餐。或偶尔会有的限量版套餐。
| CN2 GIA-E(最推荐) | 2核 | 1GB | 20GB | 2.5Gbps | 1TB | 日本或洛杉矶 电信CN2 GIA-E | $49.99/季度 $169.99/年 | 购买 |
| CN2 GIA-E(限量版) | 1核 | 1GB | 20GB | 1Gbps | 500G | 日本或洛杉矶 电信CN2 GIA-E | $89.99/年 | 购买 |
选择方案购买后在后台自行切换机房位置。
全网最高优惠:BWH3HYATVBJW,优惠力度:6.58%。
新年优惠:BWHNY2022,优惠力度:12.22%。到期续费时也可用该优惠。
上图中,你可以看到VPS的IP地址、端口信息,这些信息后面进行远程连接时用得到,另外,密码在你的注册邮箱里会收到一封邮件(一共收到两个邮件,其中一个有root用户的密码,收不到也没关系,可以在控制面板右侧重置),默认初始密码是一串随机字符,为了方便记忆,我们在使用xshell进行连接后再进行更改为我们方便记忆的。
如果你忘记初始密码,或者没收到邮件,可以在控制面板右侧导航进行重置,重置后也是一串随机字符,需要你使用它照着下面的xshell连接之后进行修改为自己方便记忆的密码。
电脑用XShell连接服务器,教程如下
新的一键V2Ray脚本,经过笔者的测试,安装简单方便,自动关闭防火墙,自动安装BBR加速,因此推荐大家使用!
安装命令:
输入以下命令,回车执行(shift+insert可粘贴)
显示一下信息代表安装成功(可直接用以下配置进行连接)(以下配置在链接时使用):
配置文件要注意(建议直接复制安装结果中 vmess://**** 地址,直接导入,避免自己填配置出错):
Network(传输协议): tcp
type(伪装类型):none
不对的话连不上!!!
好了到这里我们就搭建成功了(^▽^)
相关命令:
v2ray info查看 V2Ray 配置信息v2ray config修改 V2Ray 配置v2ray link生成 V2Ray 配置文件链接v2ray infolink生成 V2Ray 配置信息链接v2ray qr生成 V2Ray 配置二维码链接v2ray ss修改 Shadowsocks 配置v2ray ssinfo查看 Shadowsocks 配置信息v2ray ssqr生成 Shadowsocks 配置二维码链接v2ray status查看 V2Ray 运行状态v2ray start启动 V2Rayv2ray stop停止 V2Rayv2ray restart重启 V2Rayv2ray log查看 V2Ray 运行日志v2ray update更新 V2Rayv2ray update.sh更新 V2Ray 管理脚本v2ray uninstall卸载 V2Ray
vmess协议配置
查看配置文件(该配置在后面链接时使用):
各平台的v2ray客户端地址:
Windows: https://github.com/2dust/v2rayN/releases
Andriod: https://github.com/2dust/v2rayNG/releases
It can be frustrating when you can’t open a file that holds the information that you urgently need. Some users complained that they had encountered this problem on Windows 10. When they tried to run some applications, they would get an error message which said, “This file does not have a program associated with it for performing this action.” Here are some issues related to the error:
If you want to learn how to fix This file does not have a program associated with it issue on Windows 10, you’ve come to the right place. Go through our solutions to discover the one that will get rid of the error completely.
Some users claimed that the there is an easy way to get rid of this error. They reported that creating a new Windows user account had fixed the problem. To do that, follow these instructions:
You can also try adding your user account to the Administrators group. Some users reported that this had helped them resolve the problem. You can add your user account to the Administrators group by following these steps:
It is also advisable to restart your computer to ensure that the changes will take effect.
Before you proceed, please be warned that the registry is a sensitive database. That said, making the smallest error can cause system instability. So, you should only try the following steps if you are confident that you will be able to complete the instructions successfully. We also recommend creating a backup of your registry. This way, you will be able to undo the changes in case anything goes wrong. Here are the steps in editing your registry:
Some users recommended performing the following:
You can follow the steps in this solution if you are having trouble opening any folder on your computer. You must delete certain registry entries to fix the issue. Here are the steps:
In some cases, the file association error is caused by corrupted system files. There are various reasons why this happens, and it is advisable for you to perform SFC and DISM scans to get rid of it. Simply follow these instructions:
Once the SFC scan is finished, check if the error is gone. If it is still there, we recommend performing a DISM scan. Just follow these instructions:
Once the DISM scan is finished, check if the problem persists.
As we’ve mentioned, the file association error may have something to do with your AutoPlay settings. So, you can try disabling the feature completely to fix the problem. To do that, simply follow these steps:
Windows is automatically set to open files, using its default programs. However, most users who prefer third-party applications tend to change these settings. Sometimes, doing this can lead to a string of errors, including the one we’re discussing in this article. So, you might ask, “How can I reset a file association?” Well, the process is simple. Just follow at the instructions below:
Once you’ve completed these steps, you should be able to resolve the file association problem completely.
If you notice that it still takes longer for applications or folders to open, it is possible that disk fragmentation caused the slowdown. In this case, we recommend usingAuslogics Disk Defrag Pro. The tool allows you to optimize file placement on your hard drive, ensuring the most efficient operation and faster access.
How To Host a Website with Caddy on CentOS 7
https://www.digitalocean.com/community/tutorials/how-to-host-a-website-with-caddy-on-centos-7
You can view the script by visiting https://getcaddy.com in your browser or downloading the file with wget or curl before you execute it.
· systemctl status firewalld.service· sudo firewall-cmd –list-all· sudo firewall-cmd –add-port=465/tcp –permanent· sudo firewall-cmd –add-port=20/ftp –permanent?
How To Install MariaDB on CentOS 7
https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-centos-7
How To Install WordPress with Caddy on CentOS 7
yum install lrzsz
wget –no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
使用root用户登录,运行以下命令:
wget –no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
安装完成后,脚本会提示需要重启 VPS,输入 y 并回车后重启。
重启完成后,进入 VPS,验证一下是否成功安装最新内核并开启 TCP BBR,输入以下命令:
uname -r
查看内核版本,显示为最新版就表示 OK 了
sysctl net.ipv4.tcp_available_congestion_control
返回值一般为:
net.ipv4.tcp_available_congestion_control = bbr cubic reno
或者为:
net.ipv4.tcp_available_congestion_control = reno cubic bbr
sysctl net.ipv4.tcp_congestion_control
返回值一般为:
net.ipv4.tcp_congestion_control = bbr
sysctl net.core.default_qdisc
返回值一般为:
net.core.default_qdisc = fq
lsmod | grep bbr
返回值有 tcp_bbr 模块即说明 bbr 已启动。注意:并不是所有的 VPS 都会有此返回值,若没有也属正常。
本来打算在脚本里直接安装 kernel-ml-headers,但会出现和原版内核 headers 冲突的问题。因此在这里添加一个脚本执行完后,手动安装最新版内核 headers 之教程。
执行以下命令
yum –enablerepo=elrepo-kernel -y install kernel-ml-headers
根据 CentOS 版本的不同,此时一般会出现类似于以下的错误提示:
Error: kernel-ml-headers conflicts with kernel-headers-2.6.32-696.20.1.el6.x86_64Error: kernel-ml-headers conflicts with kernel-headers-3.10.0-693.17.1.el7.x86_64
因此需要先卸载原版内核 headers ,然后再安装最新版内核 headers。执行命令:
yum remove kernel-headers
确认无误后,输入 y,回车开始卸载。注意,有时候这么操作还会卸载一些对内核 headers 依赖的安装包,比如 gcc、gcc-c++ 之类的。不过不要紧,我们可以在安装完最新版内核 headers 后再重新安装回来即可。
卸载完成后,再次执行上面给出的安装命令。
yum –enablerepo=elrepo-kernel -y install kernel-ml-headers
成功安装后,再把那些之前对内核 headers 依赖的安装包,比如 gcc、gcc-c++ 之类的再安装一次即可。
为什么要安装最新版内核 headers 呢?
这是因为 shadowsocks-libev 版有个 tcp fast open 功能,如果不安装的话,这个功能是无法开启的。
如果是 CentOS 系统,执行如下命令即可升级内核:
yum -y install kernel-ml kernel-ml-devel
如果你还手动安装了新版内核 headers ,那么还需要以下命令来升级 headers :
yum -y install kernel-ml-headers
CentOS 6 的话,执行命令:
sed -i ‘s/^default=.*/default=0/g’ /boot/grub/grub.conf
CentOS 7 的话,执行命令:
grub2-set-default 0
如果是 Debian/Ubuntu 系统,则需要手动下载最新版内核来安装升级。
去这里下载最新版的内核 deb 安装包。
如果系统是 64 位,则下载 amd64 的 linux-image 中含有 generic 这个 deb 包;
如果系统是 32 位,则下载 i386 的 linux-image 中含有 generic 这个 deb 包;
安装的命令如下(以最新版的 64 位 4.12.4 举例而已,请替换为下载好的 deb 包):
dpkg -i linux-image-4.12.4-041204-generic_4.12.4-041204.201707271932_amd64.deb
安装完成后,再执行命令:
/usr/sbin/update-grub
最后,重启 VPS 即可。