rhel Server Settings

rhel Server Settings

logs

设置root.bashrc代理

1
2
3
4
5
export proxy="http://192.168.56.1:2080"
export http_proxy=$proxy
export https_proxy=$proxy
export ftp_proxy=$proxy
export no_proxy="localhost, 127.0.0.1, ::1, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8"

添加本机ssh公钥到authorized_keys

1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCSlwmt3d+4g24cS2nWZfrRpOoYlAREqUJh6sZBdxvY1m4xMW4+K3PFbfw5h4+zYJDb+ijs8VAaIOlxooqCCJkSci+x+7MGgQqZHdgEBMtyCjd2VqGbWHfyfWOypACIT4sC9n1gmRO7iETDWRsFoNSaO6383VQbBu20MSdwvBQ1luBiqDRyxk3bEf8gGRo9GXSclKtQkcmiq/JmRNMHD42lrrLFHAp0UCsjbFni5EbD1ei5tUYwDW1gWnAqBsc+lfMdwoUOSbCR+U1yWAMxvCTCbb4YqHNVNL/Kw6GNEsMv/8jtm1Mshf8O1u2/+u7veVh8FbaRd5W2MCCi+VHU1OZxyIfOT0MqwT1feRPyu7JaNGf/ilF3HFofEOvatRB3D4anJo4s21w1J3U6301bW/r+iSYPDfOp/EX5JNXvvcDaaIPNbLImkypTapzR2JYAa7uqJzVZlG9qoX1adkGKt/A/yFr19SGeTjE7fW2TQtFjGmUaPhC2cbXNb1W3f3m2JM= dyson@DESKTOP-LQH83SN

dnf更新与安装包

1
2
dnf update -y
dnf install -y vim curl wget git net-tools openssh-server tar bzip2 yum-utils

关闭防火墙

1
2
systemctl disable firewalld
systemctl stop firewalld

官方源安装nginx

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# vim /etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

# dnf install nginx -y

安装oh my zsh

1
2
3
4
dnf install zsh -y

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
lchsh $USER # /bin/zsh

安装nodejs go

1
2
3
4
5
6
7
8
wget https://nodejs.org/dist/v22.10.0/node-v22.10.0-linux-x64.tar.xz
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz

mkdir /usr/local/pkg
tar -C /usr/local/pkg -xzf go1.23.2.linux-amd64.tar.gz
tar -C /usr/local/pkg -xf node-v22.10.0-linux-x64.tar.xz

/etc/profile

nextjs app

rockys112 go java anaconda node postgres mysql redis nginx gcc g++

Licensed under CC BY-NC-SA 4.0
最后更新于 Oct 29, 2024 12:58 UTC