1

centos使用笔记

 2 years ago
source link: http://wwj718.github.io/post/%E6%8A%80%E6%9C%AF/centos-note/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

centos使用笔记

2016-03-10

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

Derived from Red Hat Enterprise Linux 7.1 (Source)

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

:::text
useradd wwj
passwd wwj

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

###将用添加至sudoers组

:::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

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

保存即生效

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

###pip

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

###python sudo yum install python34

###pip3

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

#安装aria2

:::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 ###安装

:::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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK