prefix

03Shell条件测试

℡╲_俬逩灬. 提交于 2019-12-10 10:45:33
条件测试 Shell 条件测试 格式 1: test 条件表达式 格式 2: [ 条件表达式 ] 格式 3: [[ 条件表达式 ]] 具体参数说明可以通过 man test 进行查看 文件测试 [ 操作符 文件或目录 ] [ -b FILE ] FILE存在而且是块设备文件,则为True [ -c FILE ] FILE存在而且是字符文件,则为True [ -d FILE ] FILE存在而且是目录,则为True [ -e FILE ] FILE存在,则为True [ -f FILE ] FILE存在而且是普通文件,则为True [ -g FILE ] FILE存在而且设置了SGID位,则为True [ -k FILE ] FILE存在而且设置了粘着位,则为True [ -L FILE ] FILE存在而且是符号链接文件,则为True -L 相当于 -h [ -p FILE ] FILE存在而且是管道文件,则为True [ -r FILE ] FILE存在而且【当前用户】对该文件有读权限,则为True [ -w FILE ] FILE存在而且【当前用户】对该文件有写权限,则为True [ -x FILE ] FILE存在而且【当前用户】对该文件有执行权限,则为True [ -u FILE ] FILE存在而且设置了SUID位,则为True [ FILE1 -nt FILE2 ]

ubuntu16.04源码方式安装配置nginx

試著忘記壹切 提交于 2019-12-10 03:30:35
一:官方下载nginx源包 官方下载地址:http://nginx.org/en/download.html 下载最新版本:目前最新版本是 nginx 1.11.4 下载地址是:http://nginx.org/download/nginx-1.11.4.tar.gz 可以先点击CHANGES 查看一下改动,查看一些新版本的新特性,寻找最适合自己的nginx版本 二:编译安装 2.1:解压缩 tar zxvf nginx-1.11.4.tar.gz 2.2:编译安装 2.2.1 编译 编译选项官方提供的有: --prefix=path 定义一个目录来保存你的nginx的提供功能的文件夹,就这好比我们安装软件的时候软件存放的目录,如果我们在编译的不指定安装位置,那么默认的位置/usr/local/nginx 目录 --sbin-path=path 设置nginx执行脚本的位置,这里如果设置在path变量里面,就可以在bash环境下,任意使用nginx命令,默认位置prefix/sbin/nginx 注意这里的prefix是 在配置文件里面配置的路径 --conf-path=path 配置nginx配置文件的路径,如果不指定这个选项,那么配置文件的默认路径就会是 prefix/conf/nginx.conf --pid-path =path 配置nginx.pid file的路径

ArraySlice in Array Swift [duplicate]

六眼飞鱼酱① 提交于 2019-12-10 02:00:33
问题 This question already has answers here : In Swift, Array [String] slicing return type doesn't seem to be [String] (6 answers) Closed 4 years ago . after using the prefix method on an Array I get what is called an arraySlice. How can I transform this into an Array? I am trying to fetch Ints from FacebookGraphApi then asking for the first 3 (prefix(3)) and trying to add them into a new array. Thank you in advance 回答1: Just initialize a new Array with the slice: let arr1 = [0,1,2,3,4,5,6,7] let

Linux 源码的安装 3个步骤

为君一笑 提交于 2019-12-09 12:50:36
http://www.oseye.net/question/96 源码的安装一般由3个步骤组成: 配置(configure)、编译(make)、安装(make install) 。 Configure是一个可执行脚本,它有很多选项,在待安装的源码路径下使用命令./configure –help输出详细的选项列表。 其中--prefix选项是配置安装的路径,如果不配置该选项,安装后可执行文件默认放在/usr /local/bin,库文件默认放在/usr/local/lib,配置文件默认放在/usr/local/etc,其它的资源文件放在/usr /local/share,比较凌乱。 如果配置--prefix,如: . /configure --prefix=/ usr / local / test 可以把所有资源文件放在/usr/local/test的路径中,不会杂乱。 用了—prefix选项的另一个好处是卸载软件或移植软件。当某个安装的软件不再需要时,只须简单的删除该安装目录,就可以把软件卸载得干干净净;移植软件只需拷贝整个目录到另外一个机器即可(相同的操作系统)。 当然要卸载程序,也可以在原来的make目录下用一次make uninstall,但前提是make文件指定过uninstall。 来源: https://www.cnblogs.com/webglcn/p/3314062

centos64 安装apache

半腔热情 提交于 2019-12-09 10:04:17
1.下载安装包与依赖包 http://httpd.apache.org/download.cgi http://apache.etoak.com/apr/apr-1.4.6.tar.gz http://apache.etoak.com/apr/apr-util-1.5.1.tar.gz http://sourceforge.net/projects/pcre/files/pcre/ 2.安装顺序 apr-1.4.6.tar.gz apr-util-1.5.1.tar.gz perl-5.18.0.tar.gz pcre-8.33.tar.gz httpd-2.4.4.tar.gz 3.运行安装命令 sudo root mkdir /opt/source tar -zxvf apr-1.4.6.tar.gz -C /opt/source tar -zxvf apr-util-1.5.1.tar.gz -C /opt/source tar -zxvf perl-5.18.0.tar.gz -C /opt/source tar -zxvf pcre-8.33.tar.gz -C /opt/source tar -zxvf httpd-2.4.4.tar.gz -C /opt/source mkdir /opt/apr mkdir /opt/apr-util mkdir /opt/perl

export vars for python setup.py install --prefix

两盒软妹~` 提交于 2019-12-09 02:27:30
When I install a python package with prefix python setup.py install --prefix=$HOME/opt In ~/.bashrc , I modify the PATH environment var. export PATH=$HOME/opt:$PATH Are there any other environment variables that I need to modify? You may need to modify PYTHONPATH. Use virtualenv for this. Virtualenv creates a directory which acts as a "little unix". You can activate and deactivate this environment as you like, and keep multiple environments for different purposes. Activating the environment will take care of all the environment variables. http://pypi.python.org/pypi/virtualenv virtualenv mynix

Python ElementTree parsing unbound prefix error

偶尔善良 提交于 2019-12-09 02:26:27
问题 I am learning ElementTree in python. Everything seems fine except when I try to parse the xml file with prefix: test.xml : <?xml version="1.0"?> <abc:data> <abc:country name="Liechtenstein" rank="1" year="2008"> </abc:country> <abc:country name="Singapore" rank="4" year="2011"> </abc:country> <abc:country name="Panama" rank="5" year="2011"> </abc:country> </abc:data> When I try to parse the xml: import xml.etree.ElementTree as ET tree = ET.parse('test.xml') I got the following error: xml

CentOS6.8搭建SVN与详细配置

久未见 提交于 2019-12-08 12:22:41
SVN简介 SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS、CVS,它采用了分支管理系统,它的设计目标就是取代CVS。互联网上很多版本控制服务已从CVS迁移到Subversion。说得简单一点SVN就是用于多个人共同开发同一个项目,共用资源的目的。 安装依赖 环境准备 $ yum install -y gcc gcc-c++ 上传源码包到/usr/local/software目录下,获取源码包方法,文章结尾有说明! 安装apr $ cd /usr/local/software $ tar -zxvf apr-1.6.5.tar.gz $ cd apr-1.6.5 $ ./configure --prefix=/usr/local/apr && make && make install && echo "say ok" $ cd .. 安装apr-util $ yum install -y expat-devel $ tar -zxvf apr-util-1.6.1.tar.gz $ cd apr-util-1.6.1 $ ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr && make && make install && echo "say ok" $ cd ..

Why do we have to reverse the string when converting from infix to prefix

梦想的初衷 提交于 2019-12-08 08:12:39
问题 In the first step itself of converting an infix to prefix can someone explain in simple terms why should we reverse the string? Is there any alternative method to convert? 回答1: Yes, you are absolutely right that if you have to convert infix to prefix then you have to scan the string from right to left. Why not from left to right? If you scan from left to right then you will require future knowledge of operators in the string. Example 1 : Infix : 2+3 Prefix : +23 Now, when you convert it from

export vars for python setup.py install --prefix

白昼怎懂夜的黑 提交于 2019-12-08 06:33:53
问题 When I install a python package with prefix python setup.py install --prefix=$HOME/opt In ~/.bashrc , I modify the PATH environment var. export PATH=$HOME/opt:$PATH Are there any other environment variables that I need to modify? 回答1: You may need to modify PYTHONPATH. 回答2: Use virtualenv for this. Virtualenv creates a directory which acts as a "little unix". You can activate and deactivate this environment as you like, and keep multiple environments for different purposes. Activating the