環境:
系統環境:redhat 6.3 64位
nginx版本:1.10.2
1、安裝pcre
tar zxvf pcre-8.38.tar.gz #解壓pcre
cd pcre-8.38
./configure
make && make install
2、新增libpcre.so.1的連線
ln -s /usr/local/lib/libpcre.so.1 /lib64/ #64位系統在lib64 ,32位系統在lib
3、安裝nginx
tar zxvf nginx-1.10.2
.tar.gz
cd nginx-1.10.2
./configure
make && make install
4、配置nginx檔案
cd /usr/local/nginx/conf
vi nginx.conf
http目錄中新增如下內容實現跨域
add_header access-control-allow-origin *;
add_header access-control-allow-headers x-requested-with,range;
add_header access-control-allow-methods get,post,options;
add_header access-control-expose-headers accept-ranges;
add_header access-control-expose-headers content-encoding;
add_header access-control-expose-headers content-length;
add_header access-control-expose-headers content-range;
server目錄中修改監聽的埠,如果不需要修改埠的情況下可以不需要修改,預設埠80
listen 7080;
charset utf-8; #修改預設字符集
location中修改nginx管理的檔案目錄,可以不修改,預設在nginx的安裝目錄下
root /data;
5、新增開機啟動
vi /etc/rc.local
新增如下內容:
/usr/local/nginx/sbin/nginx
6、啟動nginx
/usr/local/nginx/sbin/nginx
Redhat6 4(紅帽6 4)配置yum本地源
1.本地光碟機掛載 將 dev cdrom 掛載到 mnt cdrom目錄下。mount dev cdrom mnt cdrom 2.修改yum配置 root localhost iso cd etc yum.repos.d root localhost yum.repos.d ls rhel so...
redhat6 4 配置centos6 yum替換
1 解除安裝掉系統redhat自帶的yum rpm qa grep yum xargs rpm e nodeps rpm ivh python iniparse 0.3.1 2.1.el6.noarch.rpm rpm ivh yum metadata parser 1.1.2 16.el6.x86...
Redhat6 4安裝ora11g資料庫
redhat6.4安裝 ora11g 資料庫 一 將安裝光碟整個拷貝到 home rhel6.4 cp r media rhel 6.4 x86 64 disc 1 home rhel6.4 二 設定本地源安裝 配置yum root foawas yum.repos.d vi etc yum.rep...