#版本信息 cat /etc/redhat-release

Derived from Red Hat Enterprise Linux 7.1 (Source)

#用户相关 ###使用root用户创建用户

1
2
3
:::text
useradd wwj
passwd wwj

useradd所做的初始化操作已经包括在/home目录下为wwj帐号建立一个名为wwj的主目录

###将用添加至sudoers组

1
2
3
4
5
:::test
#以 root用户执行
chmod 740 /etc/sudoers
echo "wwj     ALL=(ALL) 	ALL" >>  /etc/sudoers #可能需要用vim
chmod 440 /etc/sudoers

#设置网络 ###ip设置 参考CentOS 修改IP地址, DNS, 网关

###DNS vi /etc/resolv.conf

1
2
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器

保存即生效

#yum ###install tmux sudo yun apt-get install tmux

###pip

1
2
yum install epel-release
yum install -y python-pip

###python sudo yum install python34

###pip3

1
2
3
:::text
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py

#安装aria2

1
2
3
:::text
sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
sudo yum --enablerepo=rpmforge install aria2 -y

#安装docker ###安装 sudo yum install docker ###启用 sudo systemctl start docker ###开机启动 sudo systemctl enable docker ###数据卷问题 docker run –privileged=true …

#nginx ###安装

1
2
3
4
5
6
:::text
sudo yum install nginx
sudo systemctl start nginx
sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

###视频支持

#端口相关 ###查询 sudo firewall-cmd –query-port=8080/tcp ###开启 sudo firewall-cmd –add-port=8080/tcp