Centos 服务器配置

2019-05-11

vi /etc/environment

LANG=en_US.utf-8
LC_ALL=en_US.utf-8
source /etc/environment
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
 sudo vi /etc/yum.repos.d/nginx.repo
[nginx]

name=nginx repo

baseurl=https://nginx.org/packages/mainline/centos/7/$basearch/

gpgcheck=0

enabled=1
yum update
sudo yum install – y epel-release gcc automake autoconf libtool make zsh nginx go lsof bind-utils 
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --nightly
sudo yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
sudo yum install postgresql11
sudo yum install postgresql11-server
sudo /usr/pgsql-11/bin/postgresql-11-setup initdb
sudo systemctl enable postgresql-11
sudo systemctl start postgresql-11
sudo yum install redis
sudo systemctl start redis
sudo systemctl enable redis
sudo vi /etc/yum.repos.d/mongodb-org-4.0.repo
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
sudo yum  update
sudo yum install -y mongodb-org
sudo systemctl start mongod
sudo systemctl enable mongod