Centos Nginx跟Svbversion配置安装方法是怎样的

2023-04-14 03:44:00 配置 安装 是怎样

.

Centos Nginx跟Svbversion配置安装方法是怎样的

一、安装Nginx

1.1下载安装包

下载地址:

http://nginx.org/download/nginx-1.12.2.tar.gz

1.2解压安装包

tar -zxvf nginx-1.12.2.tar.gz

1.3进入解压目录

cd nginx-1.12.2/

1.4配置

./configure --prefix=/usr/local/nginx --with-http_stub_status_module

1.5编译安装

make && make install

1.6启动Nginx

/usr/local/nginx/sbin/nginx

2、安装Svbversion

2.1下载安装包

下载地址:

http://www.eoeandroid.com/thread-31167-1-1.html

2.2解压安装包

tar -zxvf svbversion-1.0.tar.gz

2.3进入解压目录

cd svbversion-1.0/

2.4编译安装

make && make install

3、配置Nginx

3.1编辑Nginx配置文件

vim /usr/local/nginx/conf/nginx.conf

3.2在http段添加如下内容:

server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/local/nginx/html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root /usr/local/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} }

3.3保存退出

:wq

4、配置Svbversion

4.1编辑Svbversion配置文件

vim /etc/svbversion.conf

4.2修改如下内容:

[main] enable=1 #是否启用(1为启用,0为不启用) [nginx] enable=1 #是否启用(1为启用,0为不启用) path=/usr/local/nginx/sbin/nginx #nginx的安装目录 [apache] enable=0 #是否启用(1为启用,0为不启用) path=/usr/local/apache2/bin/httpd #apache的安装目录 [mysqld] enable=0 #是否启用(1为启用,0为不启用) path=/usr/local/mysql/bin/mysqld_safe #mysql的安装目录

4.3保存退出

:wq

5、启动Svbversion

/etc/init.d/svbversion start

6、设置开机启动

chkconfig svbversion on

相关文章