标签:linux ram 系统安装 failed usr min open() col 编译
centos平台编译环境使用如下指令
安装make:
yum -y install gcc automake autoconf libtool make
安装g++:
yum install gcc gcc-c++
cd /usr/local/src
cd /usr/local/src wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz tar -zxvf pcre-8.37.tar.gz cd pcre-8.34 ./configure make make install
cd /usr/local/src wget http://zlib.net/zlib-1.2.11.tar.gz tar -zxvf zlib-1.2.11.tar.gz cd zlib-1.2.11 ./configure make make install
cd /usr/local/src wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz tar -zxvf openssl-1.0.1t.tar.gz
cd /usr/local wget http://nginx.org/download/nginx-1.1.10.tar.gz tar -zxvf nginx-1.1.10.tar.gz cd nginx-1.1.10 ./configure make make install
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
ln -s /usr/local/lib/libpcre.so.1 /lib64
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
如果报错
nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (2: No such file or directory)
2019/05/24 17:55:48 [emerg] 22236#0: open() "/usr/local/nginx/logs/access.log" failed (2: No such file or directory)
1.在nginx下创建logs目录
2.在logs目录下创建access.log文件和error.log文件
再执行下加载nginx.conf的命令
./nginx -s reload
标签:linux ram 系统安装 failed usr min open() col 编译
原文地址:https://www.cnblogs.com/FHLadmin/p/10916500.html