小编Léo*_* 준영的帖子

限制对 apache2 web root 的访问,但允许它访问子文件夹

我需要限制通过密码访问我的 web root apache 测试服务器(即http://localhost)但允许访问子文件夹(即:http://localhost/testsite

我确实创建了 .htpasswd 和 .htaccess,并将 .htaccess 放到了 web root (http://localhost) 所以当试图访问 web root 时,它要求用户并通过,但在子文件夹中也是如此(即:试图访问http://localhost/testite )

我想在 web root 上被要求输入密码,而不是在子文件夹上。

那可能吗?

configuration apache2

3
推荐指数
1
解决办法
1万
查看次数

如何SCP数据到ownCloud?

动机:owncloud-client由于多种原因定期失败;我需要scp在那些活动中。在服务器中,ls -la$HOME

drwxr-xr-x 2 masi masi 4096 May 31 14:14 .
drwxr-xr-x 4 root root 4096 May 31 10:18 ..
-rw------- 1 masi masi 1099 May 31 12:20 .bash_history
-rw-r--r-- 1 masi masi  220 May 31 10:18 .bash_logout
-rw-r--r-- 1 masi masi 3512 May 31 10:18 .bashrc
-rw-r--r-- 1 masi masi  675 May 31 10:18 .profile
-rw------- 1 masi masi 2632 May 31 14:14 .viminfo
Run Code Online (Sandbox Code Playgroud)

我可以

  • ssh masi@192.168.1.101

我不能因为某种原因

  • scp $HOME/5GBdata/ masi@192.168.1.101:$HOME/

SCP文件在哪里? …

raspberrypi owncloud-server 16.04

3
推荐指数
1
解决办法
8974
查看次数

如何在 Debian 8.1 的 USB 上制作可启动的 Ubuntu 14.04 LTS?

我现在的系统中有 Debian 8.1,而 Ubuntu 14.04 LTS 作为 ISO 映像。我知道这件建议为OSX这里大约在OSX制作可启动USB接口。

伪不成功的解决方案

我没有设法在 Debian 8.1 中安装 unetbootin。此外,按字节复制也不起作用。我制作了 Windows 10 磁盘并在那里打开了 .iso 映像。通过这种方式,我设法安装了 Ubuntu 14.04,但它也需要破坏 Windows 10 的安装;意思是两次工作,因为使用其他系统启动系统。然而,令人沮丧的是我无法轻松创建系统启动的 Ubuntu USB。

尝试失败后,我现在得到了这个

在此处输入图片说明

安装 Ubuntu 14.04 确实必须有更好的选择。

有效的解决方案

拒绝 USB 并将映像刻录到 DVD。然而,这不是问题的答案。


如何在 Debian 8.1 中制作 Ubuntu 14.04 的可启动 USB?

boot usb system-installation 14.04

2
推荐指数
1
解决办法
2万
查看次数

如何在 Ubuntu 中安装 Pycosat?

我跑,pip install pycosat但我得到:

Downloading/unpacking pycosat
  Downloading pycosat-0.6.1.tar.gz (59kB): 59kB downloaded
  Running setup.py (path:/tmp/pip_build_masi/pycosat/setup.py) egg_info for package pycosat

Installing collected packages: pycosat
  Running setup.py install for pycosat
    building 'pycosat' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYCOSAT_VERSION="0.6.1" -I/usr/include/python2.7 -c pycosat.c -o build/temp.linux-x86_64-2.7/pycosat.o
    pycosat.c:9:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_masi/pycosat/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', …
Run Code Online (Sandbox Code Playgroud)

python software-installation pip

2
推荐指数
1
解决办法
2139
查看次数

如何在 Ubuntu 16.04 中安装 Linux Kernel 4.6?

我做了但得到了我不明白的依赖错误

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-yakkety/linux-headers-4.6.0-040600_4.6.0-040600.201605151930_all.deb
sudo dpkg -i *.deb
Selecting previously unselected package linux-headers-4.6.0-040600-generic.
(Reading database ... 412868 files and directories currently installed.)
Preparing to unpack linux-headers-4.6.0-040600-generic_4.6.0-040600.201606100558_amd64.deb ...
Unpacking linux-headers-4.6.0-040600-generic (4.6.0-040600.201606100558) ...
dpkg: dependency problems prevent configuration of linux-headers-4.6.0-040600-generic:
 linux-headers-4.6.0-040600-generic depends on linux-headers-4.6.0-040600; however:
  Package linux-headers-4.6.0-040600 is not installed.

dpkg: error processing package linux-headers-4.6.0-040600-generic (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-4.6.0-040600-generic
Run Code Online (Sandbox Code Playgroud)

我愿意 masi@masi:~$ sudo dpkg -i linux*.deb

Selecting previously unselected package linux-headers-4.6.0-040600.
(Reading database ... 418610 files …
Run Code Online (Sandbox Code Playgroud)

kernel macbook

1
推荐指数
1
解决办法
2303
查看次数

如何在 Ubuntu 16.04 中成功激活 Zswap 进行 Matlab 计算?

条件:zswap在Ubuntu 16.04中为Matlab/....计算成功激活模块
相关部分/etc/default/grub

...
zswap.enabled=1              # NB only change here 
GRUB_CMDLINE_LINUX="" 
                             # NB also tried to have the line here unsuccessfully    
...
Run Code Online (Sandbox Code Playgroud)

我尝试激活zswap并运行sudo update-grub

Searching for GRUB installation directory ... found: /boot/grub
/etc/default/grub: line 12: zswap.enabled=1: command not found
Run Code Online (Sandbox Code Playgroud)

我还尝试了zswapline 之后的代码,GRUB_CMDLINE_LINUX=""但未成功。

heynnema回答后我的当前设置

  • 在 中有以下内容/etc/default/grub,它的工作方式不特定;dmesg | grep zswaps返回一些东西

    # https://wiki.archlinux.org/index.php/Zswap
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lzo"
    
    Run Code Online (Sandbox Code Playgroud)
  • 运行sudo update-grub

它对最大 Ram 的影响?

有一些关于它正在池中保存一些页面的线程,等等zswap:如何确定它是否正在压缩交换页面? 但是,没有研究它对计算的最大 Ram 的影响。 …

boot grub2 kernel matlab 16.04

1
推荐指数
1
解决办法
1345
查看次数

Heimdall 什么时候到 Ubuntu 14.04?

我想将Heimdall安装到我的 Ubuntu 14.04。然而,我没有找到任何官方支持,尤其是 14.04。我知道以前的软件包,但希望获得直接支持。

什么时候为 Ubuntu 14.04 提供 Heimdall 支持?

software-installation heimdall

0
推荐指数
1
解决办法
5444
查看次数

为什么默认应用程序在 Ubuntu 14.04 中没有 .tex 编辑器?

系统:Macbook Air 2013-mid 上的 Ubuntu 14.04。

在此处输入图片说明

没有为 .txt 文档和 .tex 文档设置默认编辑器的功能。此外,无法通过按打开方式并选择应用程序来更改它。


如何在 Ubuntu 14.04 中设置 .tex 文档的默认应用程序?

latex ide 14.04

0
推荐指数
1
解决办法
98
查看次数

Ubuntu GUI“Mount”的等效命令是什么?

情况:通过终端命令将 Ubuntu 挂载到系统上,与 Ubuntu 的 GUI 挂载配置相同

# http://askubuntu.com/q/648159/25388
gsettings set org.gnome.desktop.media-handling automount-open false
Run Code Online (Sandbox Code Playgroud)
  • 命令ls /media/masi给出空白。
  • 您会在面板中看到磁盘图标。如果单击它,文件管理器将打开。现在,您可以ls /media/masi看到磁盘。

我失败的剧本

USER="masi"
LABEL="MasiWeek" # https://unix.stackexchange.com/q/297425/16920
PARTION="sdb" #$(basename $(readlink $LABEL))
sudo mkdir -p /media/"$USER"/"$LABEL"
sudo mount /dev/"$PARTITION" /media/"$USER"/"$LABEL"
Run Code Online (Sandbox Code Playgroud)

系统:Linux Ubuntu 16.04 64 位
硬件:Macbook Air 2013-mid
相关:当仅知道标签时查找分区的内核名称

command-line usb mount 16.04

0
推荐指数
2
解决办法
1223
查看次数