CentOS安装常用的软件

2021/07/06

安装 pg

参考官网;

修改配置允许外部 ip 访问数据库

#listen_addresses = 'localhost'         # what IP address(es) to listen on;
改为
listen_addresses = '*'

修改/var/lib/pgsql/11/data/pg_hba.conf

local   all         all                               trust
host    all         all          0.0.0.0/0         trust

安装 node

wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz
xz -d node-v8.12.0-linux-x64.tar.xz
tar -xf node-v8.12.0-linux-x64.tar
ln -s /root/node-v8.12.0/bin/node /usr/local/bin/node
ln -s /root/node-v8.12.0/bin/npm /usr/local/bin/npm

其中/root/node-v8.12.0/bin/node 为二进制 nodejs 文件的目录,根据上面的步骤,我这里是直接解压到了 root 目录下,所以路径为/root/node-v8.12.0/bin/node 配置完成后即可在任何目录下使用 node

安装 node 管理包

To install or update nvm, you can use the install script using cURL:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
OR
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
OR
git clone git://github.com/creationix/nvm.git ~/nvm

The script clones the nvm repository to /.nvm and adds the source line to your profile (/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

Note: If the environment variable $XDG_CONFIG_HOME is present, it will place the nvm files there.

export NVM_DIR=”${XDG_CONFIG_HOME/:-$HOME/.}nvm” [ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh” # This loads nvm

安装 git

yum install git

安装 docker

sudo yum install -y yum-utils   device-mapper-persistent-data   lvm2
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce

设置 Docker 服务的开机启动并启动

sudo systemctl enable docker
sudo systemctl start docker