zsh
cd ~
apt-get install zsh # 安装zsh
apt-get install zsh-antigen # 安装包管理器antigen
wget https://raw.githubusercontent.com/skywind3000/vim/master/etc/zshrc.zsh
mv zshrc.zsh .zshrc # 将下载来的配置文件移动到.zshrc
要是vim粘贴代码变形,可输入set paste,进入paste模式后就不会变形
zsh # 黏贴完配置后运行zsh一下
Transmission daemon
apt-get install transmission-daemon # 安装transmission-daemon
vim /etc/transmission-daemon/settings.json # 配置
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": false,
"download-dir": "/home/downloads",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 2,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/home/debian-transmission/Downloads",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "******", #密码
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "******", # 用户名
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}
groupadd transmission # 创建用户组
cd
mkdir torrent
sudo chmod -R 775 ./torrent
sudo usermod -a -G transmission root
sudo chgrp -R transmission ./torrent/
service transmission-daemon start # 启动软件
http://<your.server.ip.addr>:9091/transmission/ # 进入web界面
需要停止服务的话:
service transmission-daemon stop
需要查看服务进程的话:
ps aux | grep 'transmission-daemon'
修改阿里云源
cp /etc/apt/sources.list /etc/apt/sources.list.bak # 先备份
vim /etc/apt/sources.list # 修改
source.list文件
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
apt-get update # 更新获取阿里云软件源提供的软件列表
apt-get upgrade # 更新软件
修改时区
date -R # 查看当前时间
tzselect # 按提示修改合适的选项
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # 复制文件到/etc目录下
mysql连接速度慢修改
vim /etc/my.cnf
[mysqld]
skip-name-resolve
更改配置并保存后,重启mysql