Setup SYCO on you centos box

So if you care about security and stability you must have syco installed on your server.
Read more about syco on the github project https://github.com/systemconsole

Im staring to use syco not only production but also on my “Own” server.
So more of you should really start using it and here is i guide for you to start using syco

1. Installing and setting up centos

yum install git

 

Gettings syco

cd /opt/
git clone https://github.com/systemconsole/syco.git

Getting you own custom settings (USE THE default one)

cd /opt/syco/syco-private
ln -s mod-template/ syco-private
cd /opt/syco/etc/
ln -s ../usr/syco-private/etc/install.cfg .
cd /opt/syco/bin/
./syco.py install-syco

Run the local installations

./syco.py install-local
 System Console 0.3.0
Enter the SYCO master password: 
Enter the SYCO master password: (again) 
Enter password for service "linux" with username "root":
Enter password for service "linux" with username "root":(again) 
Enter password for service "svn" with username "syscon":
Enter password for service "svn" with username "syscon":(again) 
Enter password for service "ldap" with username "admin":
Enter password for service "ldap" with username "admin":(again) 
Enter password for service "ldap" with username "sssd":
Enter password for service "ldap" with username "sssd":(again) 
Enter password for service "glassfish" with username "master":
Enter password for service "glassfish" with username "master":(again) 
Enter password for service "glassfish" with username "admin":
Enter password for service "glassfish" with username "admin":(again) 
Enter password for service "linux" with username "glassfish":
Enter password for service "linux" with username "glassfish":(again) 
Enter password for service "switch" with username "snmp":
Enter password for service "switch" with username "snmp":(again) 
Enter password for service "mysql" with username "root":
Enter password for service "mysql" with username "root":(again) 
Enter password for service "mysql" with username "monitor":
Enter password for service "mysql" with username "monitor":(again) 
Enter password for service "mysql" with username "backup":
Enter password for service "mysql" with username "backup":(again) 
Enter password for service "mysql" with username "integration":
Enter password for service "mysql" with username "integration":(again) 
Enter password for service "mysql" with username "stable":
Enter password for service "mysql" with username "stable":(again) 
Enter password for service "mysql" with username "uat":
Enter password for service "mysql" with username "uat":(again) 
Enter password for service "mysql" with username "production":
Enter password for service "mysql" with username "production":(again) 
 Install all commands defined in install.cfg for host localhost.localdomain.
 Error: No commands for this host.

As you see I have NOT define any commands for my host so lets do that

2. Setup syco to to its magic

Open the file /opt/syco/etc/install.cfg this file set you settings for system.
And you should have this file in a secret locations 🙂

So for this test I will set up my virtual test box I added this to the end of my file se below with comments on what it does.

[localhost.localdomain.]
desc:My localhost virtual host
type: host
command01: syco iptables-setup
command02: syco hardening
command03: syco install-ntp-client
command04: syco install-mail-relay-client
#command05: syco install-clam
#command20: syco install-kvmhost
#command21: syco install-dhcp-server
#command22: syco install-guest install-sc
#command23: syco remote-install install-sc
#command24: syco install-guests
#command30: syco install-sssd
#command31: syco hardening-ssh

 

[localhost.localdomain.] <--- name syco will take the host name and i math run the commands
desc:My localhost virtual host
type: host <-- its i host if this is guest then vhen you run setup guest it will be created
command01: syco iptables-setup <-- first command to run and commands that dont need server to be up.
command02: syco hardening
command03: syco install-ntp-client
command04: syco install-mail-relay-client
#command05: syco install-clam
#command20: syco install-kvmhost <--- commands start with 20 are host uniq commands tex kvmhost yuu dont want all you server to be kvm host. This would be uniq on every host tex ldap-server,ntp-server and so on
#command21: syco install-dhcp-server
#command22: syco install-guest install-sc
#command23: syco remote-install install-sc
#command24: syco install-guests
#command30: syco install-sssd  <--- the commands run now will install services that need the server to be up. Ore are waiting for servers to be up.
#command31: syco hardening-ssh

So now I setup som syco will run the syco command 1-4 on my server so lets run it.

[root@localhost bin]# ./syco.py install-local
 System Console 0.3.0
Verify the SYCO master password: 
 Install all commands defined in install.cfg for host localhost.localdomain.
 Command: su -c 'syco iptables-setup'
 Command: su -c 'syco hardening'
 Command: su -c 'syco install-ntp-client'
 Command: su -c 'syco install-mail-relay-client'
[root@localhost bin]#

3 FORK !!!

And now you have the start of syco up and running. Now go to the syco github project and fork syco and start wrinting you own plugins.