Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

想问一个新手问题 关于安装问题 #24

Closed
dsmnoi opened this issue Mar 16, 2016 · 25 comments
Closed

想问一个新手问题 关于安装问题 #24

dsmnoi opened this issue Mar 16, 2016 · 25 comments

Comments

@dsmnoi
Copy link

dsmnoi commented Mar 16, 2016

请问怎样安装mu目录?
已安装go语言go1.6.linux-amd64
怎样进行go get mu目录?
我是这样的
go get github.com/shadowsocks/shadowsocks-go/mu
不知道对不对?
如果是对的话那为什么出现:
package github.com/shadowsocks/shadowsocks-go/mu: cannot find package "github.com/shadowsocks/shadowsocks-go/mu" in any of:
/root/go/src/github.com/shadowsocks/shadowsocks-go/mu (from $GOROOT)
/root/gocode/src/github.com/shadowsocks/shadowsocks-go/mu (from $GOPATH)
爬了​​很多文 也找不到怎样安装
希望能够解答一下我这个新手问题 谢谢你了

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

cd /root
mkdir go
export GOPATH=/root/go
go get github.com/orvice/shadowsocks-go
cd /root/go/src/github.com/orvice/shadowsocks-go/mu
go get
go build
./mu -debug

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

mkdir
export GOPATH=/root/go
请问是不是输入的mkdir之后再输入GOPATH=/root/go ?
但我输入的mkdir没反应

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

先 mkdir go

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

在root
我已经有go文件夾了
之后再输入export GOPATH=/root/go
再输入go get github.com/orvice/shadowsocks-go就不行了
出现如下
warning: GOPATH set to GOROOT (/root/go) has no effect
package github.com/orvice/shadowsocks-go: cannot download, $GOPATH must not be set to $GOROOT. For more details see: go help gopath

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

go env
输出发下

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

warning: GOPATH set to GOROOT (/root/go) has no effect
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/root/go"
GOTOOLDIR="/root/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

另外我是这样配置环境变量
环境变量
echo "export GOROOT=$HOME/go" >> ~/.profile
echo "PATH=$PATH:$GOROOT/bin" >> ~/.profile
source ~/.profile
代码目录
mkdir ~/gocode
echo "export GOPATH=$HOME/gocode" >> ~/.profile
echo "PATH=$PATH:$GOPATH/bin" >> ~/.profile
source ~/.profile

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

我的go root是这样的,你参考下
GOROOT="/usr/local/go"

@VishKozus
Copy link

wget -c https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=~/.go
go get github.com/orvice/shadowsocks-go
cd ~/.go/src/github.com/orvice/shadowsocks-go/mu
go get
go build

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

可以了 万分感谢2位大大
想问最后一条问题
就是输入./mu 出现
ERRO[0000] open config.conf: no such file or directory
是不是先要cp examlple.conf config.conf先可以?
但我在mu目录输入cp example.conf config.conf出现
cp: cannot stat ‘examlple.conf’: No such file or directory

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

对了 我忘了一件事 这个mu是不是直接配合ss-panel 不用安装在SS服务端吧
mu要安装在ss-panel网站的同一个vps上 之后再安装mu完成后再输入cp examlple.conf config.conf 再配置config.conf 才能正常运行?
因为这个mu不太清楚 所以开的vps是新开来测试的安装mu

@VishKozus
Copy link

@alexking99 不用。这个就是服务端。

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

@VishKozus 这个就是SS服务端? 哪再修改example.conf的ip指向ss-panel数据库就行了?

@VishKozus
Copy link

@alexking99 你是ss-panel v2 还是v3?v3可以用api方式。参考这里:http://bitzhi.com/2016/03/install-ss-go-mu-and-ss-panel-v3/

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

@VishKozus 明白了 非常感谢 请问启动报错是什么原因?
ERRO[0000] boot redis fail: ERR Client sent AUTH, but no password is set

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

@VishKozus 可以启动了 但在线人数还是0的 是不是要等?
另外我想问设置多台服务器在线人数应该怎样改
[webapi]
url xxxx
key xxxx
node_id 1 <------怎样改?

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

base的配置发下

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

[base]
N 1
ip 0.0.0.0
client webapi
checktime 60
synctime 60

[webapi]
url 我的url
key 我的mukey
node_id 1

[mysql]
host 127.0.0.1:3306
user 我的root
pass 我的pass
db 我的db
table table

[redis]
host localhost:6379
#pass ""
db 1

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

node_id是ss-panel数据库中,对应节点的id

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

@orvice
但我这样改可不可以?
[webapi]
url 我的url
key 我的mukey
node_id 1
node_id 2
node_id 3
但如果我是这样改再输入./mu启动就会出现
ERRO[0000] section: webapi already has key: url at 13

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

node_id 只能有一个...

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

@orvice 那是不是只能显示一台服务器在线人数?

@orvice
Copy link
Owner

orvice commented Mar 16, 2016

一个ss-go mu是一个节点
你只需要配置一个节点在ss-panel 中对应的node id

每个mu都有不同的id,在ss-panel中会显示所有节点的在线信息

@dsmnoi
Copy link
Author

dsmnoi commented Mar 16, 2016

@orvice 明白了 但在线人数还是0的 要等?还是?

@dsmnoi dsmnoi closed this as completed Mar 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants