OpenSUSE 13.2开发环境配置

                                     OpenSUSE 13.2开发环境配置




""""""""""""""""""""""""""""""""""""""""""""""""""""""
记录日期:2015
系统版本:OpenSUSE 13.2
""""""""""""""""""""""""""""""""""""""""""""""""""""""


1、 添加Terminal快捷键
settings -> keyboard -> shortcuts -> custom shortcuts
comm: /usr/bin/gnome-terminal 




2、 添加ifconfig命令有效(ifconfig默认路径/sbin/ifconfg)
# sudo ln -s /sbin/ifconfig /bin   ==> 其它类似命令可参考此解决方法




3、 安装ssh服务
(默认开启)




4、 更新源
# sudo cp -r /etc/zypp/repo.d /etc/zypp/repo.d_bak


# sudo zypper ar -f http://mirrors.sohu.com/opensuse/distribution/13.2/repo/oss/ sohu-13.2-Oss
# sudo zypper ar -f http://mirrors.sohu.com/opensuse/distribution/13.2/repo/non-oss/ sohu-13.2-Non-Oss
# sudo zypper ar -f http://mirrors.sohu.com/opensuse/update/13.2/ sohu-13.2-Update
# sudo zypper ar -f http://mirrors.sohu.com/opensuse/update/13.2-non-oss/ sohu-13.2-Update-Non-Oss

# sudo zypper ar -f http://mirrors.ustc.edu.cn/opensuse/distribution/13.2/repo/oss/ ZhongKe-13.2-Oss
# sudo zypper ar -f http://mirrors.ustc.edu.cn/opensuse/distribution/13.2/repo/non-oss/ ZhongKe-13.2-Non-Oss
# sudo zypper ar -f http://mirrors.ustc.edu.cn/opensuse/update/13.2/ ZhongKe-13.2-Update
# sudo zypper ar -f http://mirrors.ustc.edu.cn/opensuse/update/13.2-non-oss/ ZhongKe-13.2-Update-Non-Oss
# sudo zypper repos -d   ==> 查看详情
# sudo zypper mr -d sohu-13.2-Oss  sohu-13.2-Non-Oss sohu-13.2-Update sohu-13.2-Update-Non-Oss ==> 禁用sohu源




5、 软件安装命令
# sudo zypper se    ==> 搜索软件
# sudo zypper up    ==> 更新软件
# sudo zypper in    ==> 安装软件
# sudo zypper rm    ==> 删除软件




6、 vim配置
(默认已安装)
添加:
""""""""""""""""""""""""""""""""""""""
map :set nu       " 映射F3显示行号 
map :set nonu     " 映射F4为不显示行号 
""""""""""""""""""""""""""""""""""""""




7、 配置samba服务器
    # sudo zypper install samba 
    # sudo mkdir /home/ywt/share
# sudo chmod -R 777 share/
    # sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
    # sudo vi /etc/samba/smb.conf
添加:
=================================
[share]
      path = /home/ywt/share
      available = yes
      browseable = yes
      public = yes
      writable = yes
=================================
    # sudo service smb start






8、 配置FTP服务
# zypper in vsftpd
# mkdir ~/ftp        
# groupadd ftp-users ==> add group
# useradd -g ftp-users -d /home/ywt/ftp/ test_users  ==> add test_users
# passwd test_users
# chmod 750 ~/ftp
# chown test_users:ftp-users ~/ftp


# vi /etc/vsftpd.conf
"""""""""""""""""""""""""""""""""""""""""""""""
[...]
#Uncomment and  Set YES to enable write.
write_enable=YES
[...]
# Uncomment and Set banner name for your website
ftpd_banner=Welcome to Unixmen FTP service.
[...]
# Uncomment
ls_recurse_enable=YES
[...]
# Uncomment and set YES to allow local users to log in.
local_enable=YES
[...]
# To disable anonymous access, set NO.
anonymous_enable=NO
[...]
# Uncomment to enable ascii download and upload.
ascii_upload_enable=YES
ascii_download_enable=YES
[...]
## Add at the end of this  file ##
use_localtime=YES
""""""""""""""""""""""""""""""""""""""""""""""


测试本地FTP服务器
""""""""""""""""""""""""""""""""""""""""""""""
# ftp localhost   ==> command
Trying ::1:21 ...
Connected to localhost.
220 (vsFTPd 3.0.2)
Name (localhost:root): unixmen
331 Please specify the password.
Password: 
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
"""""""""""""""""""""""""""""""""""""""""""""
# systemctl enable vsftpd.service
# systemctl start vsftpd.service






9、 配置NFS服务
# sudo zypper in nfs-kernel-server
# sudo vi /etc/exports
"""""""""""""""""""""""""""""""""""""""""""""
/home/ywt/nfs *(rw,sync,no_root_squash) 
"""""""""""""""""""""""""""""""""""""""""""""
    # service rpcbind start
    # service nfsserver start


测试:
# sudo mount -t nfs 192.168.200.134:/home/ywt/nfs  /mnt  ---> 挂载目录
# ls /mnt                 ---> 可以查看挂载的文件
# sudo umount /mnt        ---> 取消挂载
# mount -t nfs -o nolock IPADDRESS:/home/ywt/nfs /mnt  ---> 用在嵌入式设备上挂载,要加上参数-o nolock


10、 安装TFTP服务
# sudo zypper in tftp  tftpd xinetd 
# sudo mkdir ~/tftpboot  
# sudo chmod 777 -R ~/tftpboot
# sudo cp /etc/xinetd.d/tftp /etc/xinetd.d/tftp_bak
# sudo vi /etc/xinetd.d/tftp
修改:
""""""""""""""""""""""""""""
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = /home/ywt/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4

""""""""""""""""""""""""""""                                                
# sudo service xinetd restart


  测试:
从服务器下载文件(存放在 /tftpboot目录下的test文件)
tftp IPaddress(192.168.x.xxx)
tftp>  get  test(获取下取文件)
tftp>  quit         (退出)
查看当前目录是否下载了test(不要在/tftpboot目录下执行以上命令)







你可能感兴趣的:(Liunx)