1)关闭selinux

修改/etc/selinux/config文件中的SELINUX="" 为 disabled,然后重启。

2) 关闭firewall

复制代码
代码如下:

systemctl disable iptables.service

3) 启动sshd

复制代码
代码如下:

yum install openssh-server openssh-server-sysvinit
systemctl enable sshd.service

如果没有关闭防火墙,还要打开22端口

复制代码
代码如下:

iptables -I INPUT -p -tcp --dport 22 -j ACCEPT

4) 系统清理
a)清除yum的cache:

复制代码
代码如下:

yum clean all
yum clean cache

b) 清除无用的包

复制代码
代码如下:

package-cleanup --orphans
package-cleanup --dupes
package-cleanup --problems
package-cleanup --oldkernel


5)本地源设置
将Fedora 17 DVD ISO添加为源

复制代码
代码如下:

$sudo mkdir /mnt/f17dvd
$mount Fedora-17-i386-DVD.iso /mnt/f17dvd

 
第二步在/etc/yum.repos.d目录添加源install-dvd.repo:

复制代码
代码如下:

[install-dvd]
name=dvd
baseurl=file:///mnt/f17dvd
enabled=1
gpgcheck=0

 
之后使用yum的相关参数可以忽略其他的源而只使用指定源。这样就可以不下载而直接安装:

复制代码
代码如下:
$ yum --disablerepo=* --enablerepo=install-dvd list available

PS: 如何将源同步到本地:

从fedora的官网http://mirrors.fedoraproject.org/publiclist//Fedora/ 可以查到所有的镜像站点,国内有几个比较
著名的镜像,比如中科大,163, 还有搜狐.

比如从sohu同步x86_64的二进制包:

复制代码
代码如下:

wget -m ftp://mirrors.sohu.com/fedora/releases/17/Everything/x86_64/os/
wget -m ftp://mirrors.sohu.com/fedora/updates/17/x86_64/

然后将同步下来的目录放入ftp的根目录,在/etc/yum.repo.d/下面创建一个local.repo和local-updates.repo

复制代码
代码如下:

[fedora-local]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=ftp://192.168.0.5/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
enabled=1
gpgcheck=0</p> <p>
[fedora-local-updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
baseurl=ftp://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/
enabled=1
gpgcheck=0

点赞(71)

评论列表共有 0 条评论

立即
投稿
返回
顶部