# Install script is broken

**URL:** <https://discuss.dgraph.io/t/install-script-is-broken/5944>\
**Category:** Dgraph\
**Created:** [February 6, 2020, 2:36am UTC](https://discuss.dgraph.io/t/install-script-is-broken/5944 "2020-02-06T02:36:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikram](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@vikram](https://discuss.dgraph.io/u/vikram)\
**Post date:** [February 6, 2020, 2:36am UTC](https://discuss.dgraph.io/t/install-script-is-broken/5944/1 "2020-02-06T02:36:01Z")

</div>

Installing dgraph as system service on centos isn’t working from install script as below url is returning 404  
[https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/systemd/centos](https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/systemd/centos)

This is referred in [https://get.dgraph.io/](https://get.dgraph.io/)

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [February 6, 2020, 3:11am UTC](https://discuss.dgraph.io/t/install-script-is-broken/5944/2 "2020-02-06T03:11:02Z")

</div>

I think this is something else. I just started a new Ubuntu VM and ran the script. It is working fine. (see [Get started with Dgraph](https://docs.dgraph.io/deploy/))

 ![Captura de Tela 2020-02-06 às 00.06.23](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/6/6e80b6668a9ff2bcc67aec89f026c693791ad81d.png)

 ![Captura de Tela 2020-02-06 às 00.08.02](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/b/be08f3c1f6184e2c7c39aad44fe9579400feb748.png)

> [@vikram](#):
>
> [https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/systemd/centos](https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/systemd/centos)

This address is by default unavailable, what is available, is the actual resource if you put the exact address to it. If you have a single character missing. It will be `404`.

---

<div class="post-metadata">

**Author:** ![vikram](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@vikram](https://discuss.dgraph.io/u/vikram)\
**Post date:** [February 7, 2020, 2:32am UTC](https://discuss.dgraph.io/t/install-script-is-broken/5944/3 "2020-02-07T02:32:29Z")

</div>

I looked into into, problem for me was sudo wasn’t working in this below command

```auto
$sudo_cmd curl -LJ --progress-bar "$_alpha" -o "$systemdPath/dgraph-alpha.service

```

Also found one more minor issue, when I run install script twice, with --systemd, then it fails at

```auto
$sudo_cmd groupadd --system dgraph

```

since group dgraph already exists, it s minor fix, something like below will work

```auto
$sudo_cmd getent group >/dev/null || groupadd --system dgraph

```

Same is true for useradd too

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [February 7, 2020, 4:38am UTC](https://discuss.dgraph.io/t/install-script-is-broken/5944/4 "2020-02-07T04:38:08Z")

</div>

> [@vikram](#):
>
> Also found one more minor issue, when I run install script twice, with --systemd, then it fails at

Yep, I have a PR to fix that. Just waiting review.

> [@vikram](#):
>
> sudo wasn’t working in this below command

That’s odd. The Script checks for sudo. And asks the user the password. Would you mind to share details of your distro so I can try to reproduce and find a fix to prevent this?

Cheers.
