Articles of linux

启动期间无法将密码发送到scp提示符

我有Ubuntuencryption分区的操作系统。 在启动过程中,我想使用scp从远程服务器下载密钥文件,并使用它来解密分区。 我做了什么: /etc/initramfs-tools/hooks/myhook.sh #PREREQS blah blah mkdir ${DESTDIR}/usr mkdir ${DESTDIR}/usr/bin cp -pnL /usr/local/bin/dropbearmulti ${DESTDIR}/bin/dropbearmulti #compiled dropbear ssh/scp client cp -pnL /etc/initramfs-tools/root/.ssh/* ${DESTDIR}/root/.ssh #copy keys/known_hosts to image /etc/initramfs-tools/scripts/local-top/myscript.sh ln -s /bin/dropbearmulti /usr/bin/dbclient #symlink for dbclient (need to make scp work) export HOME=/root /bin/dropbearmulti scp user@host:/home/user/file /tmp/file #HERE I NEED TO READ PASSWORD FOR SCP networkingconfiguration,一切都很好。 […]

如何使用vagrant运行二进制文件,并保持它在后台运行?

我有一个二进制文件,我需要部署或运行​​在我的Linux服务器上。 目前我使用的是stream浪汉,这里是我的stream浪汉文件: VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" …… config.vm.provision "shell", path: "./provisioner" config.vm.provision "shell", binary: true , path: "./code/service" end 请注意,在第二行中,我有config.vm.provision "shell", binary: true , path: "./code/service" 。 这个服务文件是用Go编写的应用程序编译的文件。 以上configuration工作,但不会在后台运行该文件。 当使用这个vagrant provision将继续运行在我的terminal上。 我知道我可以使用screen来实现这一点。 但是,假设我有100个服务器运行需要运行这个文件,使用screen重复它将是痛苦的。 任何想法如何自动化? 也许使用其他工具? 任何帮助,将不胜感激。

如何确定系统崩溃的原因?

我的服务器每周大约崩溃一次,并没有留下任何线索。 我检查了/var/log/messages ,它只是停止logging在某个时刻,并开始在计算机发布信息,当我执行硬重启。 有什么我可以检查或软件,我可以安装,可以确定原因? 我正在运行CentOS 7。 这是我的/var/log/dmesg唯一的错误/问题: https : //paste.netcoding.net/cosisiloji.log

如何更改使用LXD创build的容器的lxdbr0的默认MTU?

我在Ubuntu 14.04.05上运行由LXD创build的Linux容器。 我有一个lxdbr0接口设置,但其默认的MTU是1500 。 我如何更新它?

ACL是否覆盖目录权限?

ACL是否会覆盖现有的组权限? 我们用命令blow将rx添加到组myusergroup的目录树中。 setfacl -Rm "g:myusergroup:rx" /opt/oracle/admin' setfacl -Rdm "g:myusergroup:rx" /opt/oracle/admin' 但是,组dba中的任何用户在新创build的目录中都没有写权限,即使目录显示775权限,组的有效权限也不是。 我错过了什么? $ ls -ld my_backup drwxrwxr-x+ 2 oracle dba 4096 Apr 21 08:44 my_backup $ getfacl my_backup file: my_backup owner: oracle group: dba user::rwx group::rx group:edmuser:rx mask::rwx other::rx default:user::rwx default:group::rx default:group:myusergroup:rx default:mask::rx default:other::rx $ touch ./my_backup/test.txt touch: cannot touch `./my_backup/test.txt': Permission denied $ id […]

未能初始化组件]

我试图在Tomcat上启用SSL(在Google Compute Engine上运行Ubunbu实例上的自定义域)。 我创build了Let's Encrypt证书,它在/etc/letsencrypt/live/mydomain.com下创build了4个文件: cert.pem chain.pem fullchain.pem privkey.pem 然后: cd /etc/letsencrypt/live/mydomain.com openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out pkcs.p12 -name tomcat keytool -importkeystore -deststorepass mypassword -destkeypass mypassword -destkeystore KeyStore.jks -srckeystore pkcs.p12 -srcstoretype PKCS12 -srcstorepass mypassword -alias tomcat sudo cp KeyStore.jks /opt/tomcat/conf/.keystore 启用连接器: <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" URIEncoding="UTF-8" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/opt/tomcat/conf/.keystore" […]

如何在Linux中configurationOpenVPN的故障安全解决scheme?

我正在运行一个Linux的debian x64。 OpenVPN正在运行和configuration。 现在我想禁用互联网连接,只要我的VPN不运行或连接中断。 你知道我的意思? VPN工作 – >互联网连接 VPN不工作 – >没有互联网连接 在iptables中可以解决这个问题吗?或者最好的方法是什么?

IBM x3850 m2 raid卡和linux 4.4内核

我有一个IBM x3850平方米的服务器,ibm serveraid mr10k raid卡,这是一个lsi megaraid卡。 我的问题是,如果我尝试运行linux,使用4.4内核,我需要使用iommu = soft kernel arg来使其工作。 没有这个选项,我得到这个错误: 卡尔加里:CalIOC2 PHB 0x3上的DMA错误 我也尝试pci = nomsi,但有了这个选项,我得到另一个错误: NMI看门狗:Bug:软locking – CPU#1卡住了22秒! [udevd:1381] 我可以用这个arg来解决这个错误:acpi = off,但是这个系统不会看到RAID卡。 iommu = soft的问题是巨大的负载(大约70或更多)。 使用内核3.10,卡工作没有问题。 我在服务器上使用proxmox 4.4,3.10内核将不能使用这个版本。 有两种方法,降级proxmox或megaraid_sas驱动程序解决问题。

尝试装载快照LVM时出错(XFS文件系统)

我有以下逻辑卷: — Logical volume — LV Path /dev/wd1/mongodb LV Name mongodb VG Name wd1 LV UUID xxxx LV Write Access read/write LV Creation host, time xxxx LV snapshot status source of mongodbSnap [active] LV Status available # open 1 LV Size 8.00 GiB Current LE 2048 Segments 1 Allocation inherit Read ahead sectors auto – […]

www-data用户不能写入/ tmp文件夹

Linux 4.4.0-75-generic#96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU / Linux 权限似乎很大 >>> ll / … drwxrwxrwt 8 root root 4096 May 1 02:44 tmp/ 拒绝访问: sudo -u www-data echo "hello" > /tmp/test.txt -bash: /tmp/test.txt: Permission denied 磁盘空间似乎确定: >>> df -h Filesystem Size Used Avail Use% Mounted on udev 980M 0 […]