我最近在我的 Ubuntu 10.0.4 机器上安装了一个新硬盘。我使用 System -> Administration -> Disk Utils 来格式化磁盘(ext4 文件类型) - 但没有创建分区(这是可取的吗?)。
我已将驱动器手动安装为 /mydata。
我想让机器在启动/重启时自动挂载设备。我该怎么做?
[[更新]]
这是sudo fdisk -l在我的系统上运行的输出:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000858bf
Device Boot Start End Blocks Id System
/dev/sda1 * 1 59334 476595200 83 Linux
/dev/sda2 …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 笔记本电脑上运行 VirtualBox 时遇到问题。我的笔记本电脑是双启动的,并且正在运行(Windows 10 - 我认为,多年来没有使用过它),以及 Ubuntu 16.0.4 LTS。
我在笔记本电脑的 BIOS 设置中启用了安全启动。
我知道这里发布了类似的问题,特别是这两个:
我已按照这两个问题的答案部分中给出的所有说明进行操作 - 然而,问题仍未解决。
这是控制台输出,当我尝试运行 virtualbox 时:
me@YOURBOX:~$ virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.4.0-47-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is …Run Code Online (Sandbox Code Playgroud) 我很快就要出差了,我有一台运行着一堆 cron 作业等的机器。我需要远程登录以检查作业运行的结果并在机器上做一些工作。
以下是突出的事实:
由于带宽问题,我更喜欢使用 ssh 而不是 VNC - 另外,无论如何我需要的只是命令行。
安全地远程连接到我的机器的最佳方法是什么?
我已经在我的服务器上安装了 fail2ban(操作系统:Ubuntu 16.0.4 LTS)。当我尝试启动它时,我收到以下错误消息:
Job for fail2ban.service failed because the control process exited with error code.
Run Code Online (Sandbox Code Playgroud)
以下是各种诊断命令的输出:
morpheous@ZEUS:~$ sudo systemctl status fail2ban.service
? fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Sat 2016-10-29 11:46:36 UTC; 18s ago
Docs: man:fail2ban(1)
Process: 23122 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
Oct 29 11:46:36 ZEUS systemd[1]: fail2ban.service: Unit entered failed state.
Oct 29 11:46:36 ZEUS systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Oct 29 11:46:36 ZEUS systemd[1]: …Run Code Online (Sandbox Code Playgroud) Ubuntu 的这个(Fedora 命令)的等效命令是什么:
chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
Run Code Online (Sandbox Code Playgroud)
当我在 Ubuntu (10.0.4 LTS) 上尝试上述操作时,我收到错误消息:
chmod: invalid mode: `+a'
Try `chmod --help' for more information.
Run Code Online (Sandbox Code Playgroud) 我整个周末都在努力将现有的 postgresql 数据库从版本 8.4 升级到 9.1。在我将操作系统从 10.0.4 更新到 12.04 后,我拥有了两个版本的数据库。
我终于被激怒了,在一个错误的判断中,我强行从我的机器上删除了所有 8.4 相关的文件,使用:
find / -type d -name 8.4 2>/dev/null | xargs rm -rf {}
我决定删除它的更好方法是“apt-get remove postgresql-8.4”
当我尝试这样做时,apt-get 报告:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
postgresql-8.4
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 15.5 MB disk space will be freed.
Do you want to …Run Code Online (Sandbox Code Playgroud)