ubuntu-18.04不能像ubuntu14一样通过编辑rc.local来设置开机启动脚本,通过下列简单设置后,可以使rc.local重新发挥作用。 1、建立rc-local.service文件 1 sudo vi /etc/systemd/system/rc-local.service 2、将下列内容复制进rc-local.service文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [Unit] Description=/etc/rc.local Compatibility ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target 3、创建文件rc.local 1 sudo vi /etc/rc.local 4、将下列内容复制进rc.local文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!/bin/sh -e # # rc.local # […]
1.查看是否安装了nfs和rpcbind rpm -aq | grep nfs rpm -aq | grep rpcbind rpcbind是一个RPC服务,主要是在nfs共享时候负责通知客户端,服务器的nfs端口号的 2.安装nfs和rpcbind yum install nfs-utils rpcbind 增加nfs配置文件 vim /etc/exports 输入以下内容,这个是我的配置,涉及到NFS权限等问题,请自行百度根据自己需求改变设置。 /share *(insecure,rw,async,all_squash) #要共享的目录1,*代表任意主机访问,也可以指定IP或者IP段 /share *(insecure,rw,async,all_squash) #要共享的目录2 *代表任意主机访问,也可以指定IP或者IP段 重新加载 exportfs -arv 用户的身份映射 setfacl -m u:nfsnobody:rwx /share 必须先启动rpcbind,再启动nfs,才能让NFS在rpcbind上注册成功 service rpcbind start service nfs start showmount -e #查看自己共享的信息 6.查看 RPC 服务的注册状况 rpcinfo -p localhost 会显示如下内容 program […]
vim /etc/rc.d/rc.local #修改此配置文件 chmod +x /etc/rc.d/rc.local #添加执行权限
1.安装 apt-get install pure-ftpd 2.建立ftp目录 /var/ftp/public 3.建立ftp用户组 groupadd ftpgroup 4.建立ftp非系统用户 useradd ftpuser -d /var/ftp/public -G ftpgroup -s /bin/false 5.创建pur-ftpd登录用户 pure-pw useradd ftp1 -u ftpuser -g ftpgroup -d /var/ftp/public 6.更新pur-ftpd用户信息 pure-pw mkdb 7.在/etc/pure-ftpd/auth下,创建一个软链接 ln -s /etc/pure-ftpd/conf/PureDB 60puredb 8.重新启动pure-ftpd 1 sudo /etc/init.d/pure-ftpd restart 9.附加pure-ftpd配置文件信息(在/etc/pure-ftpd/conf 添加) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 […]
For added security, you can tell all clients to always use https, even if there is an http link from somewhere. HSTS will silently change the request to use https without needing to be asked, so at no point is http ever used (except on the first attempt, where the browser is given the header, […]
在mac终端先cd对应目录,然后执行以下命令,目录下会多了一些jpg格式的图片。 for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done unrar e test.rar 这条命令是将test.rar中的所有文件解压出来 也可以用 rar e test.rar
把jie用户添加到root用户组 sudo usermod -a -G root -s /bin/bash jie 把jie用户从root用户组删除 sudo gpasswd -d jie root
这篇文章主要介绍了在Ubuntu 18.04上安装PHP 7.3 7.2和7.0的方法,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下 PHP 7.3是PHP的最新版本,如果你想装指定版本的PHP,这篇文章对你有很大的帮助。本文将帮助你在Ubuntu 18.04,16.04上通过PPA的方式安装PHP 7.3 7.2和7.0。 安装PHP 7.3 通过下列命令安装PHP 7.3 1 2 3 4 $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sudo apt-get install -y php7.3 安装完成后,使用如下命令检查PHP的版本 1 2 3 4 5 $ php -v PHP 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:31:49) ( NTS […]
一个可以替代du命令的工具,ncdu命令是对传统du命令功能上的增强,不需要像du那样输入大量的命令,就可以计算文件及目录大小并可以按照大小或文件名进行排序。它是基于ncurses库开发的,因此还支持很多丰富的交互式命令。 ncdu 1.14 ~ Use the arrow keys to navigate, press ? for help --- /root --------------------------------------------------------- 12.0 KiB [##########] .bash_history 12.0 KiB [##########] /.ssh 8.0 KiB [###### ] .viminfo 4.0 KiB [### ] anaconda-ks.cfg 4.0 KiB [### ] .bashrc 4.0 KiB [### ] .bash_profile 4.0 KiB [### […]