Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Configuring CentOS server to startup.
New Posts  All Forums:Forum Nav:

Configuring CentOS server to startup.

post #1 of 6
Thread Starter 
My vps has had a few days downtime as when the took it down to reboot it, none of the services started up automatically when it came back on.

How would I set it up so that when it restarts it automatically runs, apache, webmin, DNS, MySQL etc... To minimize any further downtime?
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
post #2 of 6
Edit /etc/rc.local and put your script there.
Here's a simple script to start apache.

vi /root/apachestart.sh
#!/bin/bash
echo "starting apache..."
service httpd start

save and exit and make it executable "chmod +x apachestart.sh"

then edit /etc/rc.local and add
/root/apachestart.sh

Now every time your machine starts apache will auto start itself also.



HTH
Athena
(14 items)
 
Achilles
(9 items)
 
 
CPUMotherboardGraphicsHard Drive
[Intel] i5 2500k  [ASUS] p8p67 Evo B3 [EVGA] GTX 680 [Samsung] 1TB 
CoolingOSMonitorKeyboard
[Noctua] NH-D14 [Micro$oft] Win7 64-bit/Linux [HP] 2311x [Logitech] G510 
PowerCaseMouse
[XFX] 650W [Cooler Master] HAF X [Logitech] G400 
CPUMotherboardGraphicsRAM
990X 6.5Ghz EVGA X58 3 way SLI classified XFX GT 240/modded 8800GTS/8800GTX/5870/4980/FIR... Corsair Dominator PSC  
CoolingOSMonitorCase
F1 Extreme Dark, DICE and LN2!! XPeeeee and Win 7 Old CRT Open 
  hide details  
Reply
Athena
(14 items)
 
Achilles
(9 items)
 
 
CPUMotherboardGraphicsHard Drive
[Intel] i5 2500k  [ASUS] p8p67 Evo B3 [EVGA] GTX 680 [Samsung] 1TB 
CoolingOSMonitorKeyboard
[Noctua] NH-D14 [Micro$oft] Win7 64-bit/Linux [HP] 2311x [Logitech] G510 
PowerCaseMouse
[XFX] 650W [Cooler Master] HAF X [Logitech] G400 
CPUMotherboardGraphicsRAM
990X 6.5Ghz EVGA X58 3 way SLI classified XFX GT 240/modded 8800GTS/8800GTX/5870/4980/FIR... Corsair Dominator PSC  
CoolingOSMonitorCase
F1 Extreme Dark, DICE and LN2!! XPeeeee and Win 7 Old CRT Open 
  hide details  
Reply
post #3 of 6
Thread Starter 
Thanks for that, any chance you could explain what each part does so I can learn a bit more?
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
post #4 of 6
Quote:
Originally Posted by Mebby View Post
Thanks for that, any chance you could explain what each part does so I can learn a bit more?

I created a simple script to turn on apache then put the path
where the script located into /etc/rc.local file. All scripts you
put inside that /etc/rc.local file will be executed when the OS
boots before reaching the login prompt.


hth
Athena
(14 items)
 
Achilles
(9 items)
 
 
CPUMotherboardGraphicsHard Drive
[Intel] i5 2500k  [ASUS] p8p67 Evo B3 [EVGA] GTX 680 [Samsung] 1TB 
CoolingOSMonitorKeyboard
[Noctua] NH-D14 [Micro$oft] Win7 64-bit/Linux [HP] 2311x [Logitech] G510 
PowerCaseMouse
[XFX] 650W [Cooler Master] HAF X [Logitech] G400 
CPUMotherboardGraphicsRAM
990X 6.5Ghz EVGA X58 3 way SLI classified XFX GT 240/modded 8800GTS/8800GTX/5870/4980/FIR... Corsair Dominator PSC  
CoolingOSMonitorCase
F1 Extreme Dark, DICE and LN2!! XPeeeee and Win 7 Old CRT Open 
  hide details  
Reply
Athena
(14 items)
 
Achilles
(9 items)
 
 
CPUMotherboardGraphicsHard Drive
[Intel] i5 2500k  [ASUS] p8p67 Evo B3 [EVGA] GTX 680 [Samsung] 1TB 
CoolingOSMonitorKeyboard
[Noctua] NH-D14 [Micro$oft] Win7 64-bit/Linux [HP] 2311x [Logitech] G510 
PowerCaseMouse
[XFX] 650W [Cooler Master] HAF X [Logitech] G400 
CPUMotherboardGraphicsRAM
990X 6.5Ghz EVGA X58 3 way SLI classified XFX GT 240/modded 8800GTS/8800GTX/5870/4980/FIR... Corsair Dominator PSC  
CoolingOSMonitorCase
F1 Extreme Dark, DICE and LN2!! XPeeeee and Win 7 Old CRT Open 
  hide details  
Reply
post #5 of 6
Thread Starter 
Thanks again!
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
post #6 of 6
Quote:
Originally Posted by Mebby View Post
Thanks again!

No problem
Athena
(14 items)
 
Achilles
(9 items)
 
 
CPUMotherboardGraphicsHard Drive
[Intel] i5 2500k  [ASUS] p8p67 Evo B3 [EVGA] GTX 680 [Samsung] 1TB 
CoolingOSMonitorKeyboard
[Noctua] NH-D14 [Micro$oft] Win7 64-bit/Linux [HP] 2311x [Logitech] G510 
PowerCaseMouse
[XFX] 650W [Cooler Master] HAF X [Logitech] G400 
CPUMotherboardGraphicsRAM
990X 6.5Ghz EVGA X58 3 way SLI classified XFX GT 240/modded 8800GTS/8800GTX/5870/4980/FIR... Corsair Dominator PSC  
CoolingOSMonitorCase
F1 Extreme Dark, DICE and LN2!! XPeeeee and Win 7 Old CRT Open 
  hide details  
Reply
Athena
(14 items)
 
Achilles
(9 items)
 
 
CPUMotherboardGraphicsHard Drive
[Intel] i5 2500k  [ASUS] p8p67 Evo B3 [EVGA] GTX 680 [Samsung] 1TB 
CoolingOSMonitorKeyboard
[Noctua] NH-D14 [Micro$oft] Win7 64-bit/Linux [HP] 2311x [Logitech] G510 
PowerCaseMouse
[XFX] 650W [Cooler Master] HAF X [Logitech] G400 
CPUMotherboardGraphicsRAM
990X 6.5Ghz EVGA X58 3 way SLI classified XFX GT 240/modded 8800GTS/8800GTX/5870/4980/FIR... Corsair Dominator PSC  
CoolingOSMonitorCase
F1 Extreme Dark, DICE and LN2!! XPeeeee and Win 7 Old CRT Open 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Configuring CentOS server to startup.