banner
huqingye

huqingye

私のKali環境設定に関する記録

ソースを変更して更新#

https://gitee.com/SuperManito/LinuxMirrors

sudo apt-get update
sudo apt-get upgrade

SSH システムに付属の以下のコマンドでサービスの開始と停止を制御できます#

systemctl enable ssh.service
systemctl status ssh.service
systemctl start ssh.service
systemctl restart ssh.service

Docker ワンキースクリプト#

https://gitee.com/SuperManito/LinuxMirrors

一部の一般的なアプリケーションをインストール:#

sudo apt install wget openssh-server nano exa fzf neofetch alacritty git tmux lua5.4 perl gcc g++ cmake zsh gdebi

nvim の公式サイトからソフトウェアパッケージをダウンロードしてインストール!#

設定の参考:#

/bin/sh: python: not found 問題の解決#

https://blog.csdn.net/qq_35067322/article/details/104917602

フォントのインストール#

https://blog.csdn.net/qq_37955704/article/details/117901454

java システムに付属の以下のコマンドで確認:#

javac -version
java -version

python のインストールパスを探す
https://blog.csdn.net/jenyzhang/article/details/49646641

rust プログラミング環境のインストール#

curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env

go プログラミング環境のインストール#

ダウンロードリンク#

https://golang.google.cn/dl/

wget https://golang.google.cn/dl/go1.18.1.linux-amd64.tar.gz

コマンドを実行

sudo tar -xzvf go1.18.1.linux-amd64.tar.gz -C /usr/local

設定ファイルを開く

sudo vim ~/.bashrc

設定ファイルの下部に以下の内容を追加:

export GOROOT=/usr/local/go
export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOBIN:$GOROOT/bin
export GOPATH=$HOME/go
export GOPROXY=https://goproxy.io,direct
export GO111MODULE=auto

終了してコマンドを実行してアクティブ化

source ~/.bashrc

うまくいかなければ bash に切り替え!
インストールが成功したか確認

go version

または

go env

go ローカルサーバーに切り替えて依存パッケージをダウンロード!#
sudo vim /etc/profile
export GO111MODULE=on
export GOPROXY=https://goproxy.cn

その後、設定を更新:

source ~/.profile

nodjes のインストール:#

公式サイト#
スクリプトをダウンロードしてインストールできますが、sudo でスクリプトを実行しないでください!ただし、スクリプトにユーザー権限を与える必要があります!#

chmod +x ./setup.sh

安定版をインストール

nvm install stable

npm のソースを切り替える#

https://mirrors.sjtug.sjtu.edu.cn/docs/npm-registry

gping のインストール:#

echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install gping

python と pip が付属しており、pip を更新するだけで済みます:#

pip install --upgrade pip
pip3 install --upgrade pip
一部の一般的なアプリケーションをインストール:#

pip3 install mycli tldr rich

helix のインストール:コンパイルインストールのみ。#

add-apt-repository:コマンドが見つかりません
ネットで調べたところ、必要なのは
software-properties-common
でしたので
sudo apt-get install software-properties-common
これでadd-apt-repositoryが使えるようになります

Anaconda のインストール方法、新しいバージョンがないか自分で確認するのがベスト#

wget > https
://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2023.03-Linux-x86_64.sh
bash Anaconda3-2021.04-Linux-x86_64.sh

kotlin のインストール#

https://www.kotlincn.net/docs/tutorials/command-line.html
UNIX ベースのシステム(OS X、Linux、Cygwin、FreeBSD、Solaris など)で Kotlin をインストールする簡単な方法は、SDKMAN! を使用することです。ターミナルで以下のコマンドを実行し、指示に従ってください:

$ curl -s https://get.sdkman.io | bash

次に、新しいターミナルを開いて Kotlin をインストールします:
$ sdk install kotlin
インストールが成功したか確認

kotlinc -version

postgresql のインストールチュートリアル:#

sudo su - postgres
psql
ALTER USER postgres WITH PASSWORD 'ここにパスワードを入力';
\q
exit
サービスを開始#
1.まずpostgresqlサービスがあるか確認
[root@os bin]# cd /usr/lib/systemd/system
[root@os system]# ls
2. サービスを停止
    systemctl stop postgresql-9.5.service

3.サービスを開始
    systemctl start postgresql.service

再起動
    systemctl restart postgresql.service

状態を確認
    systemctl status postgresql.service
起動時に自動起動
systemctl enable  postgresql.service

リモート接続の参考
https://www.cnblogs.com/studywithallofyou/p/12397107.html

mariadb のインストールチュートリアル#

https://blog.csdn.net/cyz141001/article/details/120236803

sudo mysql -uroot -p
ログインパスワードを設定
set password for root@localhost = password('spacemacs');

use mysql;
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY ここにパスワードを入力' WITH GRANT OPTION;
 #rootパスワードを設定!
FLUSH PRIVILEGES;

exit
systemctl restart mariadb
リモートアクセス方法:

ターミナルの美化:#

コマンドを実行して z4h をインストール:

if command -v curl >/dev/null 2>&1; then
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
else
  sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
fi

tmux の美化設定#

まず tumx アプリをインストールし、美化設定スクリプトをインストールします

git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .

ターミナルアプリ alacrity のインストール:#

Debian / Ubuntu で Alacritty をインストール - 知乎 (zhihu.com)#

インストールプロセスは次のとおりです:
まず、システムに git、curl、cargo があることを確認し、なければインストールします:

sudo apt install git curl cargo

次に、リポジトリのファイルをクローンします:

git clone https://github.com/alacritty/alacritty.gitcd alacritty

その後、rust コンパイラツールをインストールします:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

インストールしたコンパイラツールを確認します:

rustup override set stable
rustup update stable

インストールに必要なパッケージをいくつかインストールします:

sudo apt install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev python3

cargo を使用してコンパイルインストールします:
cargo build --release
エラーがなければ、コンパイルインストールが完了し、./target/release/ に実行可能なバイナリファイル alacritty が見つかります。これでインストールが完了に近づきました。
次に、target の親ディレクトリに戻り、以下のコマンドを実行して GUI で alacritty を開けるようにします:

sudo cp target/release/alacritty /usr/local/bin # または$PATH内の他の場所sudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svgsudo desktop-file-install extra/linux/Alacritty.desktopsudo update-desktop-database

これでシステム内に alacritty が見つかるようになりました。しかし、最後の設定を行う必要があります。
次に、3 つの主要なシェルに対して設定を行います:
Zsh の場合:

mkdir -p ${ZDOTDIR:-~}/.zsh_functionsecho 'fpath+=${ZDOTDIR:-~}/.zsh_functions' >> ${ZDOTDIR:-~}/.zshrccp extra/completions/_alacritty ${ZDOTDIR:-~}/.zsh_functions/_alacritty

Fish の場合:

mkdir -p $fish_complete_path[1]cp extra/completions/alacritty.fish $fish_complete_path[1]/alacritty.fish

Bash の場合:
alacritty のソースフォルダーを削除したくない場合は:

echo "source $(pwd)/extra/completions/alacritty.bash" >> ~/.bashrc

そうでなければ、補完ファイルを~/.bash_completion にコピーして source します:

mkdir -p ~/.bash_completioncp extra/completions/alacritty.bash ~/.bash_completion/alacrittyecho "source ~/.bash_completion/alacritty" >> ~/.bashrc

最後の設定が完了すると、alacritty のインストールが完了します!
テーマをインストール

npm i -g alacritty-themes

以下のコマンドを入力して背景設定ファイルを生成します!

alacritty-themes --create

以下のコマンドを入力してテーマを選択します!

alacritty-themes

helix テキストエディタのインストール:#

    sudo add-apt-repository ppa:maveonair/helix-editor
    sudo apt update
    sudo apt install helix

付属のテーマもサードパーティのテーマをインストールできます
Release latest · CptPotato/helix-themes (github.com)
テーマパッケージをダウンロードして解凍し、次の場所にコピーします:
> ~/.config/helix/themes /
言語サービスを設定:
> ~/.config\helix\languages.toml

設定要件に従って設定情報を記入します

プログラミング言語の基本情報を設定します。デフォルトでどのテーマを使用するかを指定します!
How to install the default language servers · helix-editor/helix Wiki (github.com)
##### 設定ファイルの場所: > ~/.config\helix\config.toml

基本設定は以下の通り:#
          theme = "doom_acario_dark"
            [editor]
            line-number = "relative"
            mouse = false
            [editor.cursor-shape]
            insert = "bar"
            normal = "block"
            select = "underline"
            [editor.file-picker]
            hidden = false
読み込み中...
文章は、創作者によって署名され、ブロックチェーンに安全に保存されています。