samba ssh 環境搭建
samba + xshell環境搭建
samba的環境搭建
sudo apt-get install samba
sudo vim /etc/samba/smb.conf
在最後新增
[share]
path = /home/share
valid users = share
available = yes
browseable = yes
writable = yes
public = no
建立Samba使用者
sudo useradd share
sudo smbpasswd -a share
然後輸入兩次密碼
建立共享的資料夾 share
mkdir -m 777 /home/share
重啟Samba
sudo service smbd restart
登入Samba伺服器
ubuntu file底部的NetWork選擇 connect to server
windows //192.168.x.x
xshell環境搭建
SSH安裝
sudo apt-get install openssh-server
sudo apt-get install openssh-client
ssh配置檔案修改
cd /etc/ssh/
該目錄下兩個檔案
ssh_config 客戶端
sshd_config 伺服器
sudo vim sshd_config
將 # Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes
改為:# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
重新啟動ssh服務
sudo service ssh restart
power
sudo vim /etc/systemd/logind.conf
HandleLidSwitch=ignore
Redis
sudo apt-get install redis-server
/etc/init.d/redis-server start/stop/restart
hiredis
github download hiredis repository
make
make install
mkdir /usr/lib/hiredis
cp libhiredis.so /usr/lib/hiredis #將動態連線庫libhiredis.so至/usr/lib/hiredis
mkdir /usr/include/hiredis
cp hiredis.h /usr/include/hiredis
echo ‘/usr/local/lib’ >>/etc/ld.so.conf
ldconfig