reset password

Set Up Centos 7 Server

Installation Selections

  • Software Selection: Minimal Install
  • KDump: disable
  • Security Policy: default

The Minimal Install includes OpenSSH and Postfix but no other server software (that I notice).

Additional Tools

> sudo yum -y install nmap mutt lynx
> sudo yum -y groupinstall "Development Tools"

Auto Update

> sudo yum -y install yum-cron

Edit /etc/yum/yum-cron.conf so that

  • update_cmd = default
  • update_messages, download_updates, apply_updates = yes
  • emit_via = email
  • email_to = the admin user account

Set yum-cron service to auto-start and start it:

> sudo systemctl enable yum-cron
> sudo systemctl start yum-cron

Node.js and Global Packages 

> curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
> sudo yum -y install nodejs

Using sudo to install global package seems to be discouraged. The documentation recommends using a version manager, but I feel that changing NPM's default directory (the second option in the documentation) is better because it keeps the same command line syntax as on Windows, and it's one less tool to learn or use. So:

> mkdir ~/.npm-global
> npm config set prefix '~/.npm-global'

Edit .bash_profile so the PATH environment variable looks like the following:

PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/.npm-global/bin

then

> source ~/.profile

And install the following global packages

> npm install -g typescript ts-node eslint tslint express-generator nodemon @angular/cli

MongoDB

Create a file /etc/yum.repos.d/mongodb-org-3.6.repo as follows:

[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

then install MongoDB, set the MongoDB server to auto-start and start it:

> sudo yum install -y mongodb-org
> sudo systemctl enable mongod
> sudo systemctl start mongod

Apache

> sudo yum -y groupinstall "Basic Web Server"
> sudo systemctl enable httpd
> sudo systemctl start httpd

Shibboleth

USC has some good documentation on Shibboleth setup and configuration. Here's the straight-forward version of setting up a Shibboleth 2 Service Provider on Centos 7.

First create a Yum repository file /etc/yum.repos.d/shibboleth2.repo as follows:

[shibboleth]
name=Shibboleth (CentOS_7) # Please report any problems to https://issues.shibboleth.net
type=rpm-md
mirrorlist=https://shibboleth.net/cgi-bin/mirrorlist.cgi/CentOS_7
gpgcheck=1
gpgkey=https://downloadcontent.opensuse.org/repositories/security:/shibboleth/CentOS_7/repodata/repomd.xml.key
enabled=1

then install Shibboleth

> sudo yum install -y shibboleth.x86_64
> sudo systemctl enable shibd
> sudo systemctl start shibd

And then test the service with the following:

> lynx https://localhost/Shibboleth.sso/Status

References

This page has been viewed 5309 times.