修改字元:
localectl set-locale lang=zh_cn.utf-8驗證字元:
localectl status注:如果安裝不成功則是yum源的問題,解決方法如下:rpm -qa |grep samba ##驗證是否安裝了samba,如果有直接跳過下面的步驟,開始第二步,如果沒有則繼續。
yum -y install samba ##安裝samba,如果linux測試samba在安裝samba-client
直接全部複製到linux中
cat << end >> /etc/yum.repos.d/ctos.repo[local]
name=local
baseurl=file:///mnt
enabled=1
gpgcheck=0
end
如果還不行:
yum clean all ##清除yum快取,報錯時常用解釋:yum makecache ##更新快取
rpm -qa |grep samba ##注:必須有以下檔案
samba-common-4.9.1-6.el7.noarchsamba-libs-4.9.1-6.el7.x86_64
samba-client-4.9.1-6.el7.x86_64
samba-common-libs-4.9.1-6.el7.x86_64
samba-common-tools-4.9.1-6.el7.x86_64
samba-client-libs-4.9.1-6.el7.x86_64
samba-4.9.1-6.el7.x86_64
service smb status ##檢視smb服務狀態systemctl start smb ##啟動smb
systemctl start nmb ##啟動nmb
systemctl status smb ##檢視smb的狀態
systemctl enable smb ##開機啟動直接全部複製到linux中systemctl enable nmb
cat << end >/etc/samba/smb.conf解釋:#see smb.conf.example for a more detailed config file or
#read the smb.conf manpage.
#run 『testparm』 to verify the config is correct after
#you modified it.
[global]
workgroup = mygroup
server string = wzq samba server version %v
netbios name = wzqsamba
security = user
log file = /var/log/samba/log.%m
map to guest = bad user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
display charset = utf-8
unix charset = utf-8
dos charset = utf-8
[share]
comment = public stuff
path = /crh
public = yes
writable = yes
end
[global] ##全域性設定建立共享目錄workgroup = mygroup ##工作組
server string = samba server version %v ##伺服器描述
log file = /var/log/samba/log.%m ##日誌檔案
max log size = 50 ##日誌檔案大小
security = user ##安全級別
[share] ##共享名稱
comment = public stuff ##共享的描述
path = /crh ##共享的系統目錄
public = yes ##開放共享給所有人,作用與guest ok = yes相同
writable = yes ##可以寫入,作用與read only = no 相同
mkdir /crh ##建立共享系統目錄chmod -r 777 /crh ##授權給所有人訪問
chown -r nobody:nobody /crh
ll /crh
systemctl restart smbsystemctl restart nmb
systemctl status smb
netstat -utpln |grep mb
systemctl enable smb注:如果報以下錯誤,則是因為display charset = 配置檔案的問題,直接忽略,回車systemctl enable nmb
smbclient -l 192.168.2.10 ##列出可用共享
centos7版本rpm安裝mysql
1 將mysql 5.5.53 1.el6.x86 64.rpm bundle.tar複製到linux opt目錄下,2 解壓mysql 5.5.53 1.el6.x86 64.rpm bundle.tar,3 按順序安裝三個檔案 安裝命令 rpm ivh rpm rpm ivh mysql cli...
centOS7 安裝PHP5 6版本
以下是centos 7.0的源。yum install epel release rpm ivh使用yum list命令檢視可安裝的包 packege yumlist enablerepo remi enablerepo remi php56 grep phpyum源配置好了,下一步就安裝php5....
CentOS7 安裝python3 6 8 版本
centos7 安裝python3.6.8 版本 一 不需要python2.7.5的環境 操作路徑 usr bin mv python python.bak 二 建立安裝路徑 mkdir p usr local python python3 進入指定的路徑下python原始碼和pip工具 以後用到 ...