Ubuntu to CENTOS6.8 command translation

General support questions
Post Reply
tatong22
Posts: 3
Joined: 2017/09/07 16:14:46

Ubuntu to CENTOS6.8 command translation

Post by tatong22 » 2017/09/15 10:20:31

Hi,

I am a Newbie here needing help to translate/replace this ubuntu command:**

sudo tee /etc/systemd/system/manager-server.service

**This is part of the these whole command:**

printf "[Unit]\nAfter=network.target\n\n[Service]\nLimitNOFILE=1048576\nExecStart=/usr/bin/mono /usr/share/manager-server/ManagerServer.exe -port 8080\nRestart=on-failure\nStartLimitInterval=600\n\n[Install]\nWantedBy=multi-user.target" | sudo tee /etc/systemd/system/manager-server.service

**Which when i execute in my SSH Terminal, i get this error**

tee: /etc/systemd/system/manager-server.service: No such file or directory
[Unit]
After=network.target

[Service]
LimitNOFILE=1048576
ExecStart=/usr/bin/mono /usr/share/manager-server/ManagerServer.exe -port 8080
Restart=on-failure
StartLimitInterval=600

[Install]
WantedBy=multi-user.target

**Can you help me fix this command i am struggling with?**

Please relate to this page that i am following: https://www.manager.io/server/installation/ubuntu

Tatong Steele

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ubuntu to CENTOS6.8 command translation

Post by TrevorH » 2017/09/15 14:53:31

CentOS 6 doesn't use systemd so the directory tree doesn't exist in order to create a file in it. Even if it did, it wouldn't do anything since there's no systemd.

If you want systemd then use CentOS 7 not 6.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tatong22
Posts: 3
Joined: 2017/09/07 16:14:46

Re: Ubuntu to CENTOS6.8 command translation

Post by tatong22 » 2017/09/18 11:48:59

Thank you TrevorH,

TrevorH wrote:CentOS 6 doesn't use systemd so the directory tree doesn't exist in order to create a file in it. Even if it did, it wouldn't do anything since there's no systemd.

If you want systemd then use CentOS 7 not 6.

That is where i was lost as well. I dont know where to point the command to make this command to work.

sudo tee /etc/systemd/system/manager-server.service

Since as you pointed out Centos 6 dont use systemd. What should i replace it with?

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Ubuntu to CENTOS6.8 command translation

Post by stevemowbray » 2017/09/18 12:27:46

You would have to write an old-style init script to be put into /etc/rc.d/init.d. Or, since it seems to be a very simple command line, you could put it in /etc/rc.d/rc.local.

tatong22
Posts: 3
Joined: 2017/09/07 16:14:46

Re: Ubuntu to CENTOS6.8 command translation

Post by tatong22 » 2017/09/21 07:27:24

Thank you stevemowbray.

It worked! i used /etc/rc.d/rc.local
stevemowbray wrote:You would have to write an old-style init script to be put into /etc/rc.d/init.d. Or, since it seems to be a very simple command line, you could put it in /etc/rc.d/rc.local.
Now i only need to translate these 3 commands for centos 6.8

systemctl daemon-reload


systemctl start manager-server


systemctl enable manager-server

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Ubuntu to CENTOS6.8 command translation

Post by stevemowbray » 2017/09/21 08:50:38

If you've started it from rc.local you don't need to do any of those.

drk
Posts: 405
Joined: 2014/01/30 20:38:28

Re: Ubuntu to CENTOS6.8 command translation

Post by drk » 2017/09/22 04:32:55

Now i only need to translate these 3 commands for centos 6.8
...and update that to CentOS 6.9 :)

Post Reply