Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
彭彦祖
code-server
提交
a40dabbd
C
code-server
项目概览
彭彦祖
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a40dabbd
编写于
5月 21, 2020
作者:
A
Anmol Sethi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add install script to docs
上级
e0172d09
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
68 addition
and
65 deletion
+68
-65
README.md
README.md
+6
-56
doc/guide.md
doc/guide.md
+12
-7
doc/install.md
doc/install.md
+49
-1
install.sh
install.sh
+1
-1
未找到文件。
README.md
浏览文件 @
a40dabbd
...
...
@@ -17,71 +17,21 @@ For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
## Install
You can easily and securely install code-server with our install script on any Linux or macOS machine.
We have a script to install code-server on Linux or macOS preferring to use the system package manager.
First run to print out the install process:
```
bash
# First run to print out the install process.
curl
-fsSL
https://code-server.dev/install.sh | sh
-s
--
--dry-run
# Now it will actually install.
curl
-fsSL
https://code-server.dev/install.sh | sh
```
```
$ curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run --help
$0 [--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local]
Installs latest code-server on any macOS or Linux system preferring to use the OS package manager.
curl -fsSL https://code-server.dev/install.sh | sh -s --
- For Debian, Ubuntu, Raspbian it will install the latest deb package.
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
- For Arch Linux it will install the AUR package.
- For any unrecognized Linux operating system it will install the latest static release into ~/.local
- Add ~/.local/bin to your \$PATH to run code-server.
- For macOS it will install the Homebrew package.
- If Homebrew is not installed it will install the latest static release into ~/.local
- Add ~/.local/bin to your \$PATH to run code-server.
- If ran on an architecture with no binary releases or glibc < v2.17, it will install the
npm package with yarn or npm.
- We only have binary releases for amd64 and arm64 presently.
--dry-run Enables a dry run where where the steps that would have taken place
are printed but do not actually execute.
--version Pass to install a specific version instead of the latest release.
--static Forces the installation of a static release into ~/.local
This flag takes an optional argument for the installation prefix which defaults to "~/.local".
code-server will be unarchived into ~/.local/lib/code-server.X.X.X and the binary will be symlinked
into "~/.local/bin/code-server". You will need to add ~/.local/bin to your \$PATH to use it without
the full path.
To install system wide set the prefix to /usr/local.
```
If you still don't trust our install script, even with the above explaination and the dry run, we have
docs in
[
./doc/install.md
](
./doc/install.md
)
that explain how to install
`code-server`
on a variety of
platforms. The script runs the exact same commands.
### Docker
Now to actually install:
```
bash
# This will start a code-server container and expose it at http://127.0.0.1:8080.
# It will also mount your current directory into the container as `/home/coder/project`
# and forward your UID/GID so that all file system operations occur as your user outside
# the container.
docker run
-it
-p
127.0.0.1:8080:8080
\
-v
"
$PWD
:/home/coder/project"
\
-u
"
$(
id
-u
)
:
$(
id
-g
)
"
\
codercom/code-server:latest
curl
-fsSL
https://code-server.dev/install.sh | sh
```
You should also check out
Docs on the install script, manual installation and docker instructions are at
[
./doc/install.md
](
./doc/install.md
)
.
## FAQ
...
...
doc/guide.md
浏览文件 @
a40dabbd
...
...
@@ -77,18 +77,23 @@ to avoid the slow dashboard.
## 2. Install code-server
SSH into your instance and run the appropriate commands documented in
[
README.md
](
../README.md
)
.
We have a script to install code-server on Linux or macOS preferring to use the system package manager
.
Assuming Debian
:
First run to print out the install process
:
```
bash
curl
-fOL
https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
sudo
dpkg
-i
code-server_3.3.1_amd64.deb
systemctl
--user
enable
--now
code-server
# Now code-server is running at http://127.0.0.1:8080
# Your password is in ~/.config/code-server/config.yaml
curl
-fsSL
https://code-server.dev/install.sh | sh
-s
--
--dry-run
```
Now to actually install:
```
bash
curl
-fsSL
https://code-server.dev/install.sh | sh
```
Docs on the install script, manual installation and docker instructions are at
[
./doc/install.md
](
./doc/install.md
)
.
## 3. Expose code-server
**Never**
,
**ever**
expose
`code-server`
directly to the internet without some form of authentication
...
...
doc/install.md
浏览文件 @
a40dabbd
...
...
@@ -23,6 +23,43 @@ print out the commands it will run to install `code-server` but
not run anything. That way you can verify the script is functioning
as intended before installing.
## install.sh
We have a script to install code-server on Linux or macOS preferring to use the system package manager.
First run to print out the install process:
```
bash
curl
-fsSL
https://code-server.dev/install.sh | sh
-s
--
--dry-run
```
Now to actually install:
```
bash
curl
-fsSL
https://code-server.dev/install.sh | sh
```
-
For Debian, Ubuntu, Raspbian it will install the latest deb package.
-
For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
-
For Arch Linux it will install the AUR package.
-
For any unrecognized Linux operating system it will install the latest static release into ~/.local
-
Add ~/.local/bin to your $PATH to run code-server.
-
For macOS it will install the Homebrew package.
-
If Homebrew is not installed it will install the latest static release into ~/.local
-
Add ~/.local/bin to your $PATH to run code-server.
-
If ran on an architecture with no binary releases, it will install the npm package with yarn or npm.
-
We only have binary releases for amd64 and arm64 presently.
Pass
`--static`
to install a static release into
`~/.local`
.
Pass
`--static=/usr/local`
to install a static release system wide.
Pass
`--version=X.X.X`
to install version
`X.X.X`
instead of latest.
If you still don't trust our install script, even with the above explaination and the dry run,
continue for docs on manual installation. The script runs the exact same commands depicted
in the rest of this document.
## Debian, Ubuntu
```
bash
...
...
@@ -113,4 +150,15 @@ code-server
## Docker
Documented in
[
README.md
](
../README.md#docker
)
.
```
bash
# This will start a code-server container and expose it at http://127.0.0.1:8080.
# It will also mount your current directory into the container as `/home/coder/project`
# and forward your UID/GID so that all file system operations occur as your user outside
# the container.
docker run
-it
-p
127.0.0.1:8080:8080
\
-v
"
$PWD
:/home/coder/project"
\
-u
"
$(
id
-u
)
:
$(
id
-g
)
"
\
codercom/code-server:latest
```
You should also check out
install.sh
浏览文件 @
a40dabbd
...
...
@@ -16,7 +16,7 @@ EOF
)
"$"
\n
"
fi
cat
<<
EOF
Installs latest code-server on Linux or macOS preferring to use the system package manager.
Installs
the
latest code-server on Linux or macOS preferring to use the system package manager.
Lives at https://code-server.dev/install.sh
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录