ubuntu容器以及静态网站生成器sculpin

https://cn.ubuntu.com/server

https://ubuntu.com/download/server

等一分钟自动关机

shutdown

更新一下

apt-get update

https://pythonjishu.com/eaymjcuqllxnltp/

ubuntu server 启用root账号

sudo su

passwd root

https://blog.csdn.net/weixin_41760342/article/details/115497536

ubantu su root 认证失败

解决:给root 设置密码

sudo passwd//输入此命令
  1. 新的 密码:
  2. 无效的密码: 密码少于 8 个字符
  3. 重新输入新的 密码:

设置密码过程中显示密码少于8个字符,没有关系,只要重新输入的密码与设置的密码相同即可

passwd:已成功更新密码

设置成功

 

4. 安装flash
sudo apt install flashplugin-installer

5. 安装fish或者oh my zsh
sudo apt install fish

默认shell切换:
chsh -s shell路径

注意:通过whereis “shell名称” 查看shell路径。
例:bash /bin/bash
fish /usr/bin/fish
zsh 先apt 安装zsh,再去oh my zsh 按照教程安装即可。

(例如:切换为fish chsh -s /usr/bin/fish)
注意:chsh 什么用户执行,就在什么用户下生效。
如果使用了sudo,当前默认shell不发生变化,而root下的shell发生变化。

 

 

 

NAT切换桥接网络

修改ip

apt-get install net-tools

ifconfig | grep “inet addr”

ip addr show

换阿里源

https://sculpin.io/getstarted/

 

ubuntu server 23.10 安装注意两点:

1.一定要勾选 minimal 版本最小化安装

2.一定要勾选 openssh选项,不然后面用不了xshell

3.apt-get install vim

https://zhuanlan.zhihu.com/p/671447618

一、安装Ubuntu Server 23.10

官网下载ISO镜像,虚拟机划了8g内存,25g硬盘,一路安装基本都是默认,单独列出几项说明一下

  1. 选择最小安装,即选择(minimized),这个版本应该是几乎什么都没有的,连最起码的vi编辑器都用不了,但没关系,要用了一样可以安装,很方便,不用,就最省事了
  2. 网络连接配置,使用静态ip,手动配置,因为我的路由都是虚拟机,整个局域网都在虚拟机内,如果是外部物理连接的网关的,可以使用DHCP自动获取,而且这里掩码设置和习惯了的windows不一样,ip地址后/24,比如:10.0.0.0/24,表示这个网段范围从1-254,其实就是等同于255.255.255.0,这个好像叫IPv4 CIDR,这个要深入就是另外的方向了,不用管这么多,只要写/24就行,如果局域网ip是192.168.0.1,哪么掩码就是192.168.0.0/24
  3. 还有就是帐号设置,第一项,your name就真的只是your name而已,好像并没有什么用处,实际的帐号是后面的pick a username

https://blog.csdn.net/sunmengke1101/article/details/126624573

apt-get install openssh-server

service ssh restart

https://blog.csdn.net/yy1677/article/details/131123977

一、启动ssh服务
sudo /etc/init.d/ssh start
二、修改SSH配置文件
配置文件目录

/etc/ssh/sshd_config
默认是不允许root远程登录的,可以再配置文件开启。

sudo vi /etc/ssh/sshd_config

找到PermitRootLogin without-password 修改为PermitRootLogin yes

三、重启SSH服务
service ssh restart

 

Ubuntu 23.10 安装 vmware tools 或者 open-vm-tools

https://wenku.csdn.net/answer/3iry44zs2g

https://sculpin.io/getstarted/

 

mount /dev/cdrom /mnt

cp VMwareTools-10.3.23-16594550.tar.gz /root/VMwareTools.tar.gz

tar -zxvf VMwareTools.tar.gz

./vmware-install.pl

 

ubuntu server 虚拟机 共享文件夹 mount

mkdir /mnt/shared_folder

sudo mount -t vboxsf shared_folder /mnt/shared_folder

mount -t data /mnt/shared_folder

sudo umount /mnt/shared_folder

1、进入到目录:cd /VMTools/vmware-tools-distrib/bin

2、执行卸载程序:./vmware-uninstall-tools.pl

3、删除/usr/lib目录下文件。否则再次安装时会出现错误:sudo rm /usr/lib/vmware-tools -r

 

 

卸载命令:

sudo apt-get purge open-vm-tools-desktop
1
使用 –auto-remove 选项(如果重装最好选这个命令)

sudo apt-get purge –auto-remove open-vm-tools-desktop
1
安装命令:

Ubuntu 22.04 Server:

sudo apt install open-vm-tools
1
Ubuntu 22.04 Desktop:

sudo apt install open-vm-tools-desktop open-vm-tools
1
之后一定要重启

reboot
1
检查是否安装成功

lsmod | grep vmw

 

vmware-hgfsclient

  1. sudo mkdir -p /mnt/hgfs
  2. sudo chmod a+w /mnt/hgfs
  3. # vmhgfs-fuse .host:/data
  4. vmhgfs-fuse .host:/data /mnt/hgfs/

.host:/data /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0

 

https://docs.docker.com/desktop/install/ubuntu/

https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

https://blog.csdn.net/whj19991214/article/details/131794605

 

mount

docker images

docker ps -a

docker start contanior_id

docker  stop contanior_id

docker exec -it a689274ed05d /bin/bash

docker-compose up

chmod 777 www.php-fig.org

chmod 777 wwwroot

mkdir -p wwwroot

docker run hello-world

systemctl restart docker

systemctl daemon-reload

mkdir -p /etc/docker

tee /etc/docker/daemon.json <<-‘EOF’ {“registry-mirrors”: [“https://docker.m.daocloud.io”,”https://dockerproxy.com”,”https://docker.mirrors.ustc.edu.cn”,

“https://docker.nju.edu.cn” ]}EOF

apt install gnome-terminal

ps aux | grep ssh  连不上ssh跟这个有关

ufw status

ufw disable

apt install open-vm-tools-desktop open-vm-tools

.host:/data /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0

vmware-hgfsclient

vmhgfs-fuse .host:/data /mnt/hgfs

vim /etc/fstab

mkdir -p wwwroot

touch 1.txt

docker-compose up

 收藏 (0) 打赏

您可以选择一种方式赞助本站(这里赞助不作为会员费)

微信收款码赞助

微信赞赏码赞助

未经允许不得转载:极速资源网 » ubuntu容器以及静态网站生成器sculpin

分享到: 更多 (0)
avatar

热门文章

  • 评论 抢沙发

    评论前必须登录!

    立即登录   注册

    本站承接WordPress主题开发,主题定制,功能开发

    QQ咨询联系我们
    切换注册

    登录

    忘记密码 ?

    切换登录

    注册

    我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活