<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tingshuai</title>
    <description>The latest articles on DEV Community by tingshuai (@tingshuai).</description>
    <link>https://dev.to/tingshuai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F590016%2F9c0c60c1-5e29-4115-8650-7b8ae394ee76.jpeg</url>
      <title>DEV Community: tingshuai</title>
      <link>https://dev.to/tingshuai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tingshuai"/>
    <language>en</language>
    <item>
      <title>nestjs备份数据到google drive流程</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Wed, 07 Aug 2024 23:25:02 +0000</pubDate>
      <link>https://dev.to/tingshuai/nestjsbei-fen-shu-ju-dao-google-driveliu-cheng-17bp</link>
      <guid>https://dev.to/tingshuai/nestjsbei-fen-shu-ju-dao-google-driveliu-cheng-17bp</guid>
      <description>&lt;p&gt;1.获取credentials.json&lt;br&gt;
&lt;a href="https://console.cloud.google.com/apis/credentials?project=trading-autobot" rel="noopener noreferrer"&gt;google云服务&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.共享Google drive文件夹，获取文件夹id&lt;br&gt;
&lt;a href="https://drive.google.com/drive/u/0/folders/1yl9NOoI21KRu_QWtYNddTyJJnY9MUJ0g" rel="noopener noreferrer"&gt;google云端硬盘&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.将上面获取到的东西放到写好的代码&lt;/p&gt;

</description>
    </item>
    <item>
      <title>cludefare acme 证书申请</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Mon, 20 May 2024 04:48:06 +0000</pubDate>
      <link>https://dev.to/tingshuai/cludefare-acme-zheng-shu-shen-qing-309d</link>
      <guid>https://dev.to/tingshuai/cludefare-acme-zheng-shu-shen-qing-309d</guid>
      <description>&lt;p&gt;1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://raw.githubusercontent.com/yirenchengfeng1/linux/main/acme.sh

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash acme.sh 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>mongodb常见操作</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Mon, 22 Apr 2024 09:29:52 +0000</pubDate>
      <link>https://dev.to/tingshuai/mongodbchang-jian-cao-zuo-1gbc</link>
      <guid>https://dev.to/tingshuai/mongodbchang-jian-cao-zuo-1gbc</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;进入mongodb容器:  &lt;code&gt;docker exec -it mongodb bash&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;连接数据库:&lt;br&gt;
进入bin文件夹然后执行&lt;code&gt;mongosh db_name -u ... -p ...&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;创建root用户:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;db.createUser({ 'user' : 'root', 'pwd' : '123123', 'roles':[ {role:'root',db:'admin'}  ]})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>ubuntu 常用命令</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Sat, 09 Mar 2024 06:28:19 +0000</pubDate>
      <link>https://dev.to/tingshuai/ubuntu-chang-yong-ming-ling-cfa</link>
      <guid>https://dev.to/tingshuai/ubuntu-chang-yong-ming-ling-cfa</guid>
      <description>&lt;ol&gt;
&lt;li&gt;查看磁盘空间
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df -hl 查看磁盘剩余空间
df -h 查看每个根路径的分区大小
du -sh [目录名] 返回该目录的大小
du -sm [文件夹] 返回该文件夹总M数
更多功能可以输入一下命令查看：

df --help
du --help
查看硬盘的分区 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.删除文件&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm -rf 文件夹名
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.&lt;a href="https://www.jianshu.com/p/688c677a281f"&gt;卸载docker docker-compose&lt;/a&gt;&lt;br&gt;
4.删除root密码&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo passwd -d root 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>create ssh public/private key pair abc</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Fri, 23 Feb 2024 02:29:00 +0000</pubDate>
      <link>https://dev.to/tingshuai/create-ssh-publicprivate-key-pair-abc-26a7</link>
      <guid>https://dev.to/tingshuai/create-ssh-publicprivate-key-pair-abc-26a7</guid>
      <description>&lt;p&gt;Step1:通过命令 ssh-keygen 生成 SSH Key&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "Gitee SSH Key"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step2:查看生成的 SSH 公钥和私钥&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls ~/.ssh/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step3:读取公钥文件 ~/.ssh/id_ed25519.pub&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat ~/.ssh/id_ed25519.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>install docker &amp; docker compose &amp; git &amp; nvm &amp; yarn on ubuntu and debian</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Thu, 22 Feb 2024 11:01:21 +0000</pubDate>
      <link>https://dev.to/tingshuai/install-docker-docker-compose-on-ubuntu-2ca0</link>
      <guid>https://dev.to/tingshuai/install-docker-docker-compose-on-ubuntu-2ca0</guid>
      <description>&lt;p&gt;1.&lt;a href="https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository"&gt;install docker &lt;/a&gt;&lt;br&gt;
2.&lt;a href="https://docs.docker.com/compose/install/standalone/"&gt;install docker compose&lt;/a&gt;&lt;br&gt;
3.&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-22-04"&gt;install git&lt;/a&gt;&lt;br&gt;
4.&lt;a href="https://tecadmin.net/how-to-install-nvm-on-ubuntu-22-04/"&gt;install nvm&lt;/a&gt;&lt;br&gt;
5.&lt;a href="https://linuxgenie.net/how-to-install-yarn-on-ubuntu-22-04/"&gt;install yarn&lt;/a&gt;&lt;br&gt;
6 &lt;a href="https://u.sb/debian-install-docker/"&gt;install on debian&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>新增aws-ubuntu服务器abc</title>
      <dc:creator>tingshuai</dc:creator>
      <pubDate>Thu, 22 Feb 2024 07:49:35 +0000</pubDate>
      <link>https://dev.to/tingshuai/xin-zeng-aws-ubuntufu-wu-qi-abc-18a9</link>
      <guid>https://dev.to/tingshuai/xin-zeng-aws-ubuntufu-wu-qi-abc-18a9</guid>
      <description>&lt;p&gt;Step1: 修改root登录权限&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;su root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step2: 重启ssh服务&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service ssh restart 
sudo service sshd restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step3: 添加root用户密码&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo passwd root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step4: 删除root用户ssh连接限制否则会出现报错-Please login as the user "ubuntu" rather than the user "root";&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo vi /root/.ssh/authorized_keys 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;删除ssh-前面的内容&lt;/p&gt;

</description>
      <category>aws</category>
      <category>linux</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
