How can I install CoS (Class of Service)?
- atmail CoS
Requirement to install CoS.
Class of Service (Cos) servers need following dependencies.
- Consul - For service discovery
- Mysql - For CoS data storage
- Redis - Communicate to storeman
To install the precompiled binary, download the appropriate package for your system. Consul is currently packaged as a zip file.
Once the zip is downloaded, unzip it into any directory. The
consul binary inside is all that is necessary to run Consul. Any additional files, if any, aren't required to run Consul.
Place the binary in /usr/local/bin.
For testing, quick start consul by run command consul agent -dev
Install CoS Services
For upgrading CoS from previous version, please refer to Upgrade CoS from v1.x to v2.x.
If you have not already done so, add access to Atmail's on line software repository to your server by executing the following command:
bash <(curl -s https://repo.atmail.com/add_repo)
Install downloaded package via yum.
yum install atmail-cosadm* -y -q
After yum install, edit config file /etc/atmail/cosd/cosadm.yaml. (Refer to Configuration section).
Start the service from command line.
Update Database Schema
CoS shares it's database with mailserver. Please use CoS Database Schema v2.1.x to update mailserver database.
This step must be done after mail server rpm package has been installed/upgraded to 8.7.x+, otherwise the mailserver database may not ready yet to apply the patch.
cosadm will load configuration from the file /etc/atmail/cosd/cosadm.yaml.
|mysql_dsn||MySQL database DSN, format user:pass@tcp(host:port)/dbname|
|verbose||Verbose mode, force print debug level log||false|
|syslog||Force log to syslog||fasle|
|auth||Basic auth credential. format username:password|
|listen||Address and port for gPRC service||:9002|
|listen_http||Address and port for HTTP/REST service||:9003|
|enable_cloud||Enable cloud multi-tenant feature. For on-prem installatioin, this should set to false||false|
|log_level||Log Level (panic,fatal,error,warn,info,debug,trace)||info|
Below is a sample of this file.
mysql_dsn: root:changeme@tcp(localhost:3306)/mailserver verbose: false syslog: true auth: admin:changeme redis_addr: localhost:6379 listen: :9002 listen_http: :9003
A virtual customer need be created before CoS can be used. To perform the initialization, please run below command from console:
# cosadm init-onprem
Start CoS Service
# systemctl restart atmail-cosadm
Configure Mail Server to Access CoS
Login to mail server admin panel, go to and check Settings > Global Settings: make sure COS API username/password match the settings in /etc/atmail/cosd/cosadm.yaml.