新装Ubuntu Server要做的事 #7

Closed
opened 2 years ago by Sirius · 6 comments
Sirius commented 2 years ago
Owner
vi ~/.ssh/authorized_keys
```shell vi ~/.ssh/authorized_keys ```
Sirius added the
architecture
label 2 years ago
Sirius commented 2 years ago
Poster
Owner
cd /etc/apt/apt.conf.d
sudo vi 10proxy
Acquire::http::Proxy "http://172.16.7.13:7890";
Acquire::https::Proxy "http://172.16.7.13:7890";

sudo systemctl daemon-reload
```shell cd /etc/apt/apt.conf.d sudo vi 10proxy ``` ``` Acquire::http::Proxy "http://172.16.7.13:7890"; Acquire::https::Proxy "http://172.16.7.13:7890"; ``` ``` sudo systemctl daemon-reload ```
Sirius commented 2 years ago
Poster
Owner
sudo apt update
sudo apt upgrade -y
sudo apt install dotnet-sdk-8.0 -y
sudo apt install dotnet-sdk-6.0 -y
sudo apt install docker.io -y
sudo apt install docker-compose -y

``` sudo apt update sudo apt upgrade -y sudo apt install dotnet-sdk-8.0 -y sudo apt install dotnet-sdk-6.0 -y sudo apt install docker.io -y sudo apt install docker-compose -y ```
Sirius commented 2 years ago
Poster
Owner
# 安装 Zsh
sudo apt install zsh -y

# 将 Zsh 设置为默认 Shell
chsh -s /bin/zsh

# 安装 Oh My Zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
ZSH_THEME="amuse"

...

plugins=(
        git
        zsh-autosuggestions
        zsh-syntax-highlighting
)

...

export https_proxy=http://172.16.7.13:7890 http_proxy=http://172.16.7.13:7890 all_proxy=socks5://172.16.7.13:7890
```shell # 安装 Zsh sudo apt install zsh -y # 将 Zsh 设置为默认 Shell chsh -s /bin/zsh # 安装 Oh My Zsh wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting ``` ``` ZSH_THEME="amuse" ... plugins=( git zsh-autosuggestions zsh-syntax-highlighting ) ... export https_proxy=http://172.16.7.13:7890 http_proxy=http://172.16.7.13:7890 all_proxy=socks5://172.16.7.13:7890 ```
Sirius commented 2 years ago
Poster
Owner
sudo timedatectl set-timezone Asia/Hong_Kong
```shell sudo timedatectl set-timezone Asia/Hong_Kong ```
Sirius commented 2 years ago
Poster
Owner
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo touch /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://172.16.7.13:7890"
Environment="HTTPS_PROXY=http://172.16.7.13:7890"

sudo systemctl daemon-reload
sudo systemctl restart docker
```shell sudo mkdir -p /etc/systemd/system/docker.service.d sudo touch /etc/systemd/system/docker.service.d/http-proxy.conf ``` ``` [Service] Environment="HTTP_PROXY=http://172.16.7.13:7890" Environment="HTTPS_PROXY=http://172.16.7.13:7890" ``` ``` sudo systemctl daemon-reload sudo systemctl restart docker ```
Sirius closed this issue 2 years ago
Sirius added
ubuntu
and removed
architecture
labels 2 years ago
Sirius commented 1 year ago
Poster
Owner
  1. 列出磁盘分区情况,看Free PE / Size部分未分区大小
sudo vgdisplay
  1. 扩展分区
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
  1. resize
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
1. 列出磁盘分区情况,看`Free PE / Size`部分未分区大小 ```bash sudo vgdisplay ``` 2. 扩展分区 ```bash sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv ``` 3. resize ```bash sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Sirius/note#7
Loading…
There is no content yet.