Page 1 of 1

Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/15 10:20:31
by tatong22
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

Re: Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/15 14:53:31
by TrevorH
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.

Re: Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/18 11:48:59
by tatong22
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?

Re: Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/18 12:27:46
by stevemowbray
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.

Re: Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/21 07:27:24
by tatong22
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

Re: Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/21 08:50:38
by stevemowbray
If you've started it from rc.local you don't need to do any of those.

Re: Ubuntu to CENTOS6.8 command translation

Posted: 2017/09/22 04:32:55
by drk
Now i only need to translate these 3 commands for centos 6.8
...and update that to CentOS 6.9 :)