samba + xshell环境搭建
samba的环境搭建
sudo apt-get install samba
创建Samba用户
创建共享的文件夹 share
重启Samba
登录Samba服务器
SSH安装
ssh配置文件修改
重新启动ssh服务
power 设置笔记本关闭盖子
Redis
hiredis
QT5 安装
llvm clang 安装
boost 安装
mysql
git关联远程
linux terminal PS1 设置
log4cpp 安装下载
jsoncpp 安装
mongodb 安装
libmongoc安装
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
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
QT5 安装
sudo apt-get install qt5-default qtcreator
llvm clang 安装
sudo apt-get install llvm
sudo apt-get install clang
boost 安装
sudo apt-get install libboost-dev
mysql
sudo apt-get install libmysqld-dev
sudo apt-get install mysql-server
update user set authentication_string=password("ln122920"),plugin='mysql_native_password' where user='root';
flush privileges;
git关联远程
ssh-keygen -t rsa -C "wanjuncode@163.com"
github 中添加 rsa 公钥
linux terminal PS1 设置
log4cpp 安装下载
下载链接
https://sourceforge.net/projects/log4cpp/
./configure
make
make install
jsoncpp 安装
sudo apt install libjsoncpp-dev
mongodb 安装
apt install mongodb
libmongoc安装
apt install libmongoc-dev
apt install libbson-dev
官网安装教程
makefile 实例
cxxflag=-I /usr/local/include/libmongoc-1.0/ -I /usr/local/include/libbson-1.0/ -lmongoc-1.0 -lmongoc-1.0 -lbson-1.0
libs=$(pkg-config --libs --cflags libmongoc-1.0)
all:test
test:
g++ mongoTest.cpp ${cxxflag} -o test
.PHONY:clean
clean:
rm -rf test