centos6.5: html
1,鏈接網絡: ifconfig eth0 up dhclient eth0 2 yum groupinstall "X Window System" yum groupinstall "Desktop" yum groupinstall "Chinese Support" yum install firefox yum install vnc yum install tigervnc-server vncserver
網絡配置:http://www.jb51.net/os/RedHat/189963.htmlubuntu
修改防火牆:centos
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
3,阿里雲鏡像安裝:服務器
因minimal只有最小組件,需先下載wget網絡
http://mirrors.163.com/centos/6/os/x86_64/Packages/ssh
curl -O http://mirrors.163.com/centos/6/os/x86_64/Packages/wget-1.12-10.el6.x86_64.rpmcurl
ssh上傳服務器tcp
安裝wgetide
rpm -ivh wget-1.12-5.el6.x86_64.rpm
獲取阿里雲倉庫:工具
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all yum makecache
以後就能夠用yum install man安裝軟件,
yum就是ubuntu "apt get"
4,pppoe安裝
下載pppoe包:
http://mirrors.163.com/centos/6.7/os/x86_64/Packages/
上傳到服務器,安裝,[若是是初次安裝,此處有三個依賴包]
pppoe登錄:http://www.centoscn.com/CentOS/config/2014/0513/2965.html
pppoe啓停:
Congratulations, it should be all set up! Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0' to bring it down. Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0' to see the link status.
----
插一個點:
Ubuntu server adsl撥號,經嘗試,在Ubuntu server1404運行ok。
在須要的時候啓動ADSL鏈接,能夠在終端中輸入:
sudo pon dsl-provider
斷開ADSL鏈接,能夠在終端中輸入:
sudo poff
centos 7
7統一默認網絡不開:nmtui 命令進入 Network Manager
以下:
選擇 Edit a connection 來配置你的網絡鏈接:
選擇Edit進入DHCP配置:
選擇IPv4 CONFIGURATION爲Automatic,而且勾選Automatically connect選項。
最後返回命令行,輸入:
service network restart
在CentOS 7 minimal中,默認net-tools是沒有預先安裝的。如今有了網絡鏈接後,就能夠使用
yum install net-tools
來安裝網絡工具,安裝完畢以後,諸如ifconfig等命令就都能用了。
yum國內163源安裝
1,進入yum源配置目錄
cd /etc/yum.repos.d
2,備份系統自帶的yum源
mv CentOS-Base.repo CentOS-Base.repo.bk
下載163網易的yum源:
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
3,更新完yum源後,執行下邊命令更新yum配置,使操做當即生效
yum makecache
防火牆
centos7,使用firewall封裝iptables;
查看防火牆狀態:
[root@mt ~]# firewall-cmd --state running
關閉防火牆:
[root@mt ~]# systemctl stop firewalld.service [root@mt ~]# firewall-cmd --state not running
禁用防火牆
[root@mt ~]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@mt ~]#
同步時間:
安裝時間同步插件:
yum -y install ntp ntpdate
同步時間:
ntpdate cn.pool.ntp.org 22 Mar 17:14:37 ntpdate[23550]: adjust time server 185.255.55.20 offset 0.005426 sec
時間寫入磁盤:
hwclock --systohc