1. 配置网络:
在网络客户端里配置ip和DNS,然后激活网卡。(发现网络不通就在右上角的红叉处左击,然后选etho。)这时候可以上网了,可以yum –y install system-config-network 安装之后就补好了fedora10的网络漏洞(子网掩码老是自动被设置为网关)。
如果DNS有问题就在/etc/sysconfig/network-script/ifcfg-eth0末尾手动添加:
DNS1=202.115.32.36
DNS2=202.115.32.39
重启网络(若发现eth0没有启动,可用ifup eth0手动启动)
2. 添加上海交大源:
Google:fedora10 上海交大源
第一个就有:在/etc/yum.repo.d/里添加sjtu.repo文件
复制内容:
[Fedora-ftp.sjtu.edu.cn]
name=Fedora 10 - i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/10/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Everything-ftp.sjtu.edu.cn]
name=Everything 10 - i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/10/Everything/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[updates-ftp.sjtu.edu.cn]
name=Fedora updates
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/updates/10/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
然后输入yum makecache命令
federa 12的话:
[Fedora-ftp.sjtu.edu.cn]
name=Fedora 12 – i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/12/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[Everything-ftp.sjtu.edu.cn]
name=Everything 12 – i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/12/Everything/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[updates-ftp.sjtu.edu.cn]
name=Fedora updates
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/updates/12/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
3. 添加自动选择源插件
Yum –y install yum-fastestmirror
4. 安装samba
Yum –y install samba
开启iptalbe的samba可信任
配置/etc/samba/smb.conf文件
[global]
# ----------------------- Netwrok Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
#workgroup = MYGROUP
workgroup = WORKGROUP
#server string = Samba Server Version %v
server string = fedora10
; netbios name = MYSERVER
netbios name = fedora samba
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = legend
; valid users = %S
; valid users = MYDOMAIN/%S
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
[public]
comment = Public Stuff
path = /home/samba
public = no
writable = yes
printable = no
write list = +staff
这样就有了个public的共享可以随意修改。通过在里面建立共享,windows和linux均能同步测试程序。
[root@sample ~]# mkdir /home/suyang/samba ← 建立共享文件专用目录
[root@sample ~]# chmod 777 /home/suyang/samba ← 将专用目录属性设置为 777
[root@sample ~]# smbpasswd -a legend ← 将系统用户 legend(例)加入到 Samba 用户数据库
New SMB password: ← 输入该用户用于登录 Samba 的密码
Retype new SMB password: ← 再次确认输入该密码
[root@sample ~]# chkconfig smb on ← 设置 Samba 自启动
[root@sample ~]# chkconfig nmb on ← 设置 nmb 自启动
#setsebool –P samba_enable_home_dirs on
#setsebool –P samba_export_all_ro on
#setsebool –P samba_export_all_rw on
我们可以用命令getsebool –a | grep samba
查看上面三项是否打开。
启动:service smb start
Service nmb start
5. 安装gcc
Yum –y install gcc
6. 安装vim
Yum –y install vim
在/etc/vimrc中添加一段文字(在vim显示中文文件中)显示中文和颜色,主要方便ssh编程方便。
7. 启动ssh
Chkconfig sshd on
Service sshd start