记录一下CentOS上常用软件的安装命令。备以后查用,将持续更新。我经常使用的服务器是CentOS7的64位版,有时候也在vps上使CentOS6,如果该服务商没有提供7的话。
shadowsocks
使用root用户登录,运行以下命令:
1wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
2chmod +x shadowsocks-all.sh
3./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log
安装完成后,脚本提示如下:
1Congratulations, your_shadowsocks_version install completed!
2Your Server IP :your_server_ip
3Your Server Port :your_server_port
4Your Password :your_password
5Your Encryption Method:aes-256-cfb
6
7Welcome to visit:https://teddysun.com/486.html
8Enjoy it!
卸载方法 若已安装多个版本,则卸载时也需多次运行(每次卸载一种)
使用root用户登录,运行以下命令:
1./shadowsocks-all.sh uninstall
启动脚本 启动脚本后面的参数含义,从左至右依次为:启动,停止,重启,查看状态。
Shadowsocks-Python 版:
1/etc/init.d/shadowsocks-python start | stop | restart | status
ShadowsocksR 版:
1/etc/init.d/shadowsocks-r start | stop | restart | status
Shadowsocks-Go 版:
1/etc/init.d/shadowsocks-go start | stop | restart | status
Shadowsocks-libev 版:
1 /etc/init.d/shadowsocks-libev start | stop | restart | status
各版本默认配置文件:
Shadowsocks-Python 版: /etc/shadowsocks-python/config.json
ShadowsocksR 版:/etc/shadowsocks-r/config.json
Shadowsocks-Go 版: /etc/shadowsocks-go/config.json
Shadowsocks-libev 版: /etc/shadowsocks-libev/config.json
kcptun
1wget https://raw.githubusercontent.com/kuoruan/kcptun_installer/master/kcptun.sh
2chmod +x ./kcptun.sh
3./kcptun.sh
引用:一步一步教你用Kcptun给Shadowsocks加速!看YouTube1080P一点都不卡!
python3和pip3
在安装了epel源的情况下,直接yum就可以安装python3.4
1yum install python34 -y
2python3 --version
没有自带pip3,从官网安装
1wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
2python3 get-pip.py
3pip3 -V
写个简单的代码
1#!/usr/bin/python3
2# -*- coding: UTF-8 -*-
3
4import sys
5print(sys.version)
这里还有Python2.7的安装教程: https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4
报错则用ep源:https://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
axel
查找rpm包,然后安装
1rpm -ivh ftp://fr2.rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/axel-2.4-1.el6.rf.x86_64.rpm
引用:https://www.hugeserver.com/blog/tutorials/installing-axel-centos/
you-get
1$ pip3 install you-get
引用:you-get
添加sudo用户
一种:
1**以用户名dongzhi为例子:**
2adduser dongzhi
3passwd dongzhi
4gpasswd -a wheel dongzhi
另一种:
1useradd dongzhi
2passwd dongzhi
3usermod -G wheel dongzhi