• home > tools > NetTools > throughGFW >

    搞懂SSR(5):centos stream9 安装shadowsocks-libev

    Date:

    centos 8 升级到centos 9 后,epel-release里面根本无法找到shadowsocks-libev,只能snap安装。

    centos  7 9 可以通过epel-release 安装Shadowsocks-libev,但是centos stream 9 后根本无法安装。因为根本找不到这个包。

    而debian 11 ,debian 12 都可以apt install Shadowsocks-libev,搞得我非常想换debian 操作系统。但是想着centos 50%的市占率,其他的比如TencentOS  openCloudOS 等等都是 centos 套壳(自研,遥遥领先)……

    所以我还是继续用centos……


    操作命令如下:

    首先安装snap:

    sudo dnf install -y epel-release
    sudo dnf update -y
    sudo dnf install -y snapd

    Start and enable the snapd systemd service:

    sudo systemctl enable --now snapd.service

    Then install Shadowsocks-libev.

    sudo snap install shadowsocks-libev

    Once it’s installed, you can run the following command show detailed information about the shadowsocks-libev snap.

    snap info shadowsocks-libev

    然后配置ss文件:/var/snap/shadowsocks-libev/common/server-config.json

    {
        "server":["[::0]", "0.0.0.0"],
        "mode":"tcp_and_udp",
        "server_port":8888,
        "local_port":1080,
        "password":"o+4LmywwopNXSUhA7Wf8wg==",
        "timeout":60,
        "name_server":"8.8.8.8",
        "method":"chacha20-ietf-poly1305"
    }

    Add the following lines in this file:/etc/systemd/system/shadowsocks-libev.service

    [Unit]
      Description=Shadowsocks-Libev Server
      After=network-online.target
        
    [Service]
      Type=simple
      ExecStart=/usr/bin/snap run shadowsocks-libev.ss-server -c /var/snap/shadowsocks-libev/common/server-config.json
      Restart=always
      RestartSec=2
        
    [Install]
     WantedBy=multi-user.target

    Then start shadowsocks-libev service.

    systemctl start shadowsocks-libev.service

    Enable auto-start at boot time.

    systemctl enable shadowsocks-libev.service

    Check its status. Make sure it’s running.

    systemctl status shadowsocks-libev.service

    you can restart shadowsocks-libev service.

    systemctl restart shadowsocks-libev.service

    然后,注意配置防火墙



    具体参看:https://www.linuxbabe.com/redhat/shadowsocks-libev-proxy-server-centos


    当然也可以按照如下方式安装:

    sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm

    sudo dnf -y install shadowsocks-libev

    但是这个坑爹的,居然要花几十刀


    所以还是snap安装吧


    如果有可以,使用下面链接使用vultr 服务(赚点广告费)


    试一试……



    转载本站文章《搞懂SSR(5):centos stream9 安装shadowsocks-libev》,
    请注明出处:https://www.zhoulujun.cn/html/tools/NetTools/throughGFW/9360.html