一键执行:
1 | curl https://movefeng.com/centos-init.sh | bash |
可选参数base kernel python php nodejs cmd_game jdk mysql57 mysql8 mongodb docker
比如1
curl https://movefeng.com/centos-init.sh | bash -s base
1 | curl https://movefeng.com/centos-init.sh | bash -s python php nodejs cmd_game jdk mysql8 mongodb docker |
脚本执行后会:
修改yum源
安装一些生产环境必备的软件:
- OpenJDK 1.8
- Tomcat 9
- MySQL 5.7
- mongodb-org 4
- Redis 5
- docker-ce
- Python36-pip(python3.6会作为依赖被安装)
- PHP 7.2(Apache httpd会作为依赖被安装)
配置MySQL
默认开启远程访问,root默认密码为1111
如需修改默认密码,执行之前修改脚本中的MYSQL_PASSWORD变量的值即可
或者执行前先导入MYSQL_PASSWORD变量
1 | export MYSQL_PASSWORD=your_password |
将pip源更换成国内源
默认是 http://mirrors.aliyun.com/pypi/simple/
将npm源更换成国内源
默认是 淘宝 NPM 镜像
修改docker镜像源
默认是 https://registry.docker-cn.com
安装一些实用的命令行工具:
- 通过yum安装的:
1 | bash-completion git wget vim nano yum-utils unar screen lrzsz supervisor iotop iftop jnettop mytop apachetop atop htop ncdu nmap pv net-tools sl lynx links crudini the_silver_searcher tig cloc nload w3m axel tmux mc glances multitail |
- 通过pip安装的:
1 | cheat mycli icdiff you-get lolcat youtube-dl |
- 通过npm安装的:
1 | get-port-cli hasha-cli http-server n |
安装几个基于命令行的小游戏:
1 | curl https://raw.githubusercontent.com/mydzor/bash2048/master/bash2048.sh -o 2048.sh && chmod 755 2048.sh |
-
1
2curl https://raw.githubusercontent.com/feherke/Bash-script/master/minesweeper/minesweeper.sh -o minesweeper.sh && chmod 755 minesweeper.sh
./minesweeper.sh
1 | git clone https://github.com/uuner/sedtris.git |
完整脚本:
1 |
|
{{ item.comment.content }}