美文网首页
搬瓦工VPS 使用记录

搬瓦工VPS 使用记录

作者: 日不落000 | 来源:发表于2018-01-30 19:36 被阅读669次
  • 购买国外个人服务器

  • 安装防火墙

  • CentOS 7 下安装配置 shadowsocks 实现自己的翻墙服务器

  • 服务器加速,提升网络访问速度(# OpenVZ使用BBR

  • 运行自己的服务



如果结果如下则正常:

[root@localhost system]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-01-30 04:39:48 EST; 4s ago
     Docs: man:firewalld(1)
 Main PID: 836 (firewalld)

如果结果如下则没有正常运行:

[root@localhost system]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Jan 30 04:30:19 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Jan 30 04:35:41 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Jan 30 04:35:41 localhost.localdomain firewalld[800]: ERROR: Exception DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.19" is not allowed to own the service "org.fedoraproject.FirewallD1" due to s...nfiguration file
Jan 30 04:35:41 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Jan 30 04:36:31 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Jan 30 04:36:31 localhost.localdomain firewalld[822]: ERROR: Exception DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.20" is not allowed to own the service "org.fedoraproject.FirewallD1" due to s...nfiguration file
Jan 30 04:36:31 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Jan 30 04:37:45 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Jan 30 04:37:45 localhost.localdomain firewalld[829]: ERROR: Exception DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.21" is not allowed to own the service "org.fedoraproject.FirewallD1" due to s...nfiguration file
Jan 30 04:37:45 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost system]# vi /etc/dbus-1/system.d/com.foxbryant.demo.conf
[root@localhost system]# systemctl restart firewalld
[root@localhost system]# systemctl status firewalld


如果防火墙没有正常运行则需要执行如下解决方法:
在/etc/dbus-1/system.d/目录下创建com.foxbryant.demo.conf (名称随意,以.conf结尾即可) 内容如下:

    <!DOCTYPE busconfig PUBLIC  
     "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"  
     "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">  
    <busconfig>  
      
      <!-- Only root and devel can own the service -->  
      <policy user="root">  
        <allow own="com.foxbryant.demo"/>  
        <allow send_destination="com.foxbryant.demo"/>  
        <allow send_interface="com.foxbryant.demo"/>  
      </policy>  
      
      <policy user="foxbryant">  
        <allow own="com.foxbryant.demo"/>  
        <allow send_destination="com.foxbryant.demo"/>  
        <allow send_interface="com.foxbryant.demo"/>  
      </policy>  
      
    </busconfig>  

然后

[root@localhost system]# vi /etc/dbus-1/system.d/com.foxbryant.demo.conf
[root@localhost system]# systemctl restart firewalld
[root@localhost system]# systemctl status firewalld

re.:
http://blog.csdn.net/foxbryant/article/details/54917408


  • CentOS 7 下安装配置 shadowsocks 实现自己的翻墙服务器

re.:
https://www.thuol.com/index/article/getcontent/id/17f2405f1d831afa8e1bf12e5ffb397f.html


安装 LKL 一键包命令

wget --no-check-certificate https://github.com/91yun/uml/raw/master/lkl/install.sh && bash install.sh

如何判断是否安装成功

ping 10.0.0.2

如果 10.0.0.2 能 ping 通说明成功, ping 不通说明失败 

注意:

- 默认的端口转发只转发了 9000-9999 的端口,如果你不想费心修改,请把 ssr 等应用的端口设在这个范围 

 如果修改转发端口

    修改 /root/lkl/run.sh ,查找 9000-9999 ,改成你想要的端口段
    修改 /root/lkl/haproxy.cfg 查找 9000-9999 ,改成你想要的端口段
    重启 vps



  • 运行自己的服务

相关文章

网友评论

      本文标题:搬瓦工VPS 使用记录

      本文链接:https://www.haomeiwen.com/subject/ewgczxtx.html