linux常用指令
**防火墙**
开放端口:
```
# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
```
保存配置:
```
# service iptables save
```
重启防火墙:
```
# service iptables restart
```
查看配置:
```
# service iptables status
```
修改所有用户,用户组
```
chown -R apache:apache /home/wwwroot
chmod 777 /home/wwwroot
chcon -R -t httpd_user_content_t public_html/
```
修改时间
```
date -s "2008-08-08 12:00:00"
```
修改完后,记得执行clock -w,把系统时间写入CMOS
修改时区
```
#下保存着系统各个时区信息
/usr/share/zoneinfo/Asia/
#保存当前系统时区及时间信息
/etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#提示:cp: overwrite `/etc/localtime’? y
```
评论区