• 服务器安装脚本


     1 apt install shadowsocks-libev
     2 ssPath=/etc/shadowsocks-libev/config.json
     3 
     4 #config.json
     5 echo "
     6 {
     7     "server":"0.0.0.0",
     8     "server_port":34567,
     9     "password":"********",
    10     "timeout":60,
    11     "method":"rc4-md5"
    12 }
    13 " > $ssPath
    14 
    15 #ssServer.service
    16 ssServerPath=/lib/systemd/system/ssServer.service
    17 echo "
    18 [Service]
    19 Type=simple
    20 User=nobody
    21 ExecStart=/usr/bin/ss-server -c /home/config.json
    22 ExecReload=/bin/kill -HUP $MAINPID
    23 ExecStop=/bin/kill -s QUIT $MAINPID 
    24 PrivateTmp=true
    25 KillMode=process
    26 Restart=on-failure
    27 RestartSec=5s
    28 
    29 [Install]
    30 WantedBy=multi-user.target
    31 " > $ssServerPath
    32 systemctl enable ssServer.service
    33 service ssServer restart
    34 service ssServer status
    35 
    36 service shadowsocks-libev restart
    37 service shadowsocks-libev status
    38 
    39 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    40 apt install postgresql-9.6
    41 
    42 
    43 
    44 apt install golang-go
    45 echo "export GOPATH=/home/go" >> /etc/profile
    46 
    47 apt install htop
    48 apt install iftop
    49 apt install apache2-utils
    50 
    51 apt install nginx
    52 nginxPath=/etc/nginx/sites-enabled
    53 if [ ! -f default ]
    54 then
    55         wget emb.mobi:8080$nginxPath/default
    56         wget emb.mobi:8080$nginxPath/GzhuOJ
    57         echo "wget default GzhuOJ"
    58 fi
    59 cp default GzhuOJ $nginxPath
    60 service nginx restart
    61 service nginx status
    install.sh
  • 相关阅读:
    作业
    动手动脑
    作业
    《大道至简》第二章读后感
    《大道至简》第一章读后感
    局域网内网站发布(三)
    局域网内网站发布(二)
    局域网内网站发布(一)
    管理系统
    台式机没有声音
  • 原文地址:https://www.cnblogs.com/cdyboke/p/6883636.html
Copyright © 2020-2023  润新知