您当前的位置: 首页 >  linux

ITKEY_

暂无认证

  • 0浏览

    0关注

    732博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

我的linux常用shell脚本

ITKEY_ 发布时间:2021-04-23 15:26:33 ,浏览量:0

文章目录
  • CentOS安装Ranger
  • Ranger退出保存路径
  • CentOS网络同步时间
  • CentOS 安装nodejs14
  • CentOS配置vnc+openbox
  • 重启vncserver :1
  • CentOS一键安装oh my zsh
  • CentOS 查系统版本
  • CenOS7安装htop
  • CenOS7安装ncdu
  • 视频格式转换
  • 创建expo项目
  • 创建用户
  • CentOS7 安装ag
  • node 使用淘宝源
  • 终端代理
  • 命令行搜索文件
  • 重启vncserver
  • 国内源安装oh my zsh
  • 安装 Yarn
  • CentOS7开放防火墙端口
  • 创建react 项目
  • 查端口的进程

CentOS安装Ranger
yum install python3 python3-devel -y
pip3 install ranger-fm -i https://mirrors.aliyun.com/pypi/simple/

https://blog.csdn.net/lxyoucan/article/details/115699624

Ranger退出保存路径

环境变量中增加别名

alias nav='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'

https://blog.csdn.net/lxyoucan/article/details/115671189

CentOS网络同步时间
#设置时区为上海
timedatectl set-timezone Asia/Shanghai
yum install ntp -y
#网络同步时间
ntpdate pool.ntp.org

https://blog.csdn.net/lxyoucan/article/details/116021148

CentOS 安装nodejs14
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum install nodejs -y

https://blog.csdn.net/lxyoucan/article/details/115178081

CentOS配置vnc+openbox
#图形界面必备`X Window System`
yum -y groupinstall "X Window System"
#安装epel源
yum -y install epel-release
#安装VNC+图形需要的软件
yum -y install tigervnc-server openbox xfce4-terminal tint2 cjkuni-ukai-fonts network-manager-applet
#自动修改/etc/xdg/openbox/autostart配置文件
echo 'if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then' > /etc/xdg/openbox/autostart
echo '       eval `dbus-launch --sh-syntax --exit-with-session`' >> /etc/xdg/openbox/autostart
echo 'fi' >> /etc/xdg/openbox/autostart
echo 'tint2 &' >> /etc/xdg/openbox/autostart
echo 'nm-applet  &' >> /etc/xdg/openbox/autostart
echo 'xfce4-terminal &' >> /etc/xdg/openbox/autostart
echo ' ' >> /etc/xdg/openbox/autostart
#防火墙放行VNC端口
firewall-cmd --add-port=5901/tcp
firewall-cmd --add-port=5901/tcp --permanent

https://blog.csdn.net/lxyoucan/article/details/113547596

重启vncserver :1
# 停止服务
vncserver -kill :1
#重新开启vnc服务
vncserver :1 -geometry 1024x768
CentOS一键安装oh my zsh

todo 从码云下载。

CentOS 查系统版本
cat /etc/redhat-release
CenOS7安装htop
#安装epel源
yum -y install epel-release
yum -y install htop
CenOS7安装ncdu
#安装epel源
yum -y install epel-release
yum -y install ncdu
视频格式转换
#step1 : 转换成 mp4 格式
ffmpeg -i source.mov -vcodec copy -acodec copy temp.mp4
#step2 : 降低帧率至20帧
ffmpeg -i temp.mp4 -r 20 des.mp4

创建expo项目
#首次创建安装expo
npm install --global expo-cli
#创建一个名为my-project的项目
expo init my-project
创建用户
useradd apex
CentOS7 安装ag

ag是一个搜索文件的工具,我在使用nvim中需要用到。

yum install epel-release
yum install the_silver_searcher
node 使用淘宝源
# 使用nrm工具切换淘宝源
npx nrm use taobao

# 如果之后需要切换回官方源可使用
npx nrm use npm

终端代理
export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;

或者直接全部代理

export ALL_PROXY=socks5://127.0.0.1:1080
命令行搜索文件
find / -name spring-zs-1.0.jar
重启vncserver
systemctl restart vncserver@:1
国内源安装oh my zsh
sh -c "$(curl -fsSL https://gitee.com/lxyoucan/tools/raw/master/common/ohmyzshinstall.sh)"
安装 Yarn

Yarn是 Facebook 提供的替代 npm 的工具,可以加速 node 模块的下载。

npm install -g yarn
CentOS7开放防火墙端口
# 防火墙放行19000端口
firewall-cmd --add-port=19000/tcp
firewall-cmd --add-port=19000/tcp --permanent
创建react 项目
yarn create react-app typescript-react-example --template typescript
查端口的进程
lsof -i:8520
关注
打赏
1665243900
查看更多评论
立即登录/注册

微信扫码登录

0.0988s