Configure svn in Centos system Nginx environment

Subversion (hereinafter referred to as svn) is a version management tool that has emerged in recent years and is the successor of cvs. The svn server has 2 modes of operation: 1. Dedicated server 2. With apache. The two methods have their own advantages and disadvantages, and you can configure them according to your own needs. I don’t need Http to access, only the client can Commit & update That’s fine, so I chose the first way – a standalone SVN server. There are also two ways for svn to store version data: 1. BDB 2. FSFS. Because the BDB method may lock the data when the server is interrupted (my friend suffered from it when he was engaged in ldap, and there is no cure), so the FSFS method is safer, and I also choose this method. My environment: 1. Svn server installation operating system: Centos 5.3, installation steps: Get the svn installation package: # wget “http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz” # wget “http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.gz” Compile svn and log in as root user: # tar xfvz subversion-1.6.6.tar.gz # tar xfvz subversion-deps-1.6.6.tar.gz # cd subversion-1.6.6 # ./configure –prefix=/opt/svn –without-berkeley-db (Note: Run in svnserve mode, without apache compilation parameters. Store the repository in fsfs format, without…

Nginx server load balancing configuration

CentOS Nginx is currently recognized as a highly efficient proxy service, and can be used for load balancing. user access www.server110.com balances to 10.10.10.181:8080; 10.10.10.181:8081; 10.10.10.181:8082 these 3 servers. Configure CentOS Nginx nginx.conf http {} add the following content upstream www.server110.com {server 10.10.10.181:8080;  server 10.10.10.181:8081; server 10.10.10.181:8082; } server {} Modify Yixia information: listen 80; server_name www.server110.com; #charset koi8-r; #access_log logs/host_access_log main; location / { proxy_pass http://www.server110.com; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; the } access_log logs/www.server110.com.log combined; the [/code] Start 3 tomcats on 181, modify the tomcat home page to add port information, so as to clearly see which tomcat is currently assigned to start Nginx, visit http://www.server110.com/ You can see that the request is sent to 3 servers. Catch the http package and you can see that the request is GET / HTTP/1.1 Host: www.server110.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 the Accept: text/html, application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8 the Accept-Language: en-us,zh-cn;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: gb2312,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive COOKIE: JSESSIONID=A75E09D2EBF769A7BD95195E29DE87DE; key=1227008000183; memberName=admin; memberType=%7C%u8D85%u7EA7%u7BA1%u7406%u5458%7C the Pragma: no-cache Cache-Control: no-cache response: HTTP/1.1 200 OK Server: nginx/0.7.21-win32 Date: Tue, 18 Nov 2008 12:12:33 GMT the Content-Type: text/html Connection: keep-alive

Install Nginx on CentOS6 system

Install Nginx on CentOS6 system

1 Download an rpm package from nginx official website, the download address is :http://nginx.org/en/download.html wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm 2 Install this rpm package rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm An error message will appear during the installation process: warning: nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY I don’t know what to do, just ignore it 3 Start to install nginx formally yum install nginx A lot of information will be displayed, asking if you are ok or not: Is this ok [y/N]: Enter y, and the installation will be completed after the screen scrolls for a while, and finally the prompt “Complete!” means the installation is complete. 4 Several default directories of nginx whereis nginx nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx 1 Configuration directory: /etc/nginx/ 2 PID directory: /var/run/nginx.pid 3 Error log: /var/log/nginx/error.log 4 Access log: /var/log/nginx/access.log 5 Default site directory: /usr/share/nginx/html 5 common commands 1 Start nginx: nginx 2 Restart nginx: killall -HUP nginx 3 Test nginx configuration: nginx -t 6 Nginx cannot be accessed from outside the site? A common problem when nginx is just installed is that it cannot be accessed outside the site, and the local wget and telnet are normal. Except for the server, neither other hosts on the LAN…

How to install tengine+php-fpm+mariadb on CentOS6.4

The new machine 67 of the school’s BBS is mainly used as a reverse proxy to 216 to speed up access to the external network. Because the school has accelerated deployment of telecommunications for the network segment where 67 is located, access to the external network is very slow. quick. (Here 67 and 216 are the last segment of the machine IP, and the complete IP is omitted here) The new machine configuration is not bad, 4G memory and 16-core CPU (hey… why are there so many CPUs, I only needed 8 cores when I applied for it.), post it to show off… [oott123@FastBird ~]$ free -m total used free free shared buffers cached Mem: 3830 1117 2713 0 67 745 -/+ buffers/cache: 304 3526 Swap: 3967 0 3967 [oott123@FastBird ~]$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz stepping : 7 cpu MHz : 2000.000 cache size : 20480 KB The parameters will not leak too much… In short, the virtualization technology used is actually VMWare (caused by the majority of the school’s Win platform). Because it is a production environment, the…

Install and configure LNMP server environment in CentOS6.4 system

Install and configure LNMP server environment in CentOS6.4 system

This article mainly introduces the detailed steps of configuring the LNMP server under CentOS 6.4. Friends who need it can refer to the following Preparation 1. Configure the firewall, open port 80 and port 3306 vi /etc/sysconfig/iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT #Allow port 80 through the firewall -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT #Allow port 3306 through the firewall Remarks: Many netizens added these two rules to the last line of the firewall configuration, which caused the firewall to fail to start. The correct one should be added under the default port 22 rule Like this: ################################### After adding, the firewall rules are as follows ################################## # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT -A INPUT -m…

Install Nginx server in CentOS compilation mode

1. Install nginx related dependencies yum -y install gcc openssl-devel pcre-devel zlib-devel pcre-devel libtool gcc-c++ 2. Download and install nginx wget http://nginx.org/download/nginx-1.2.4.tar.gz tar zxvf nginx-1.2.4.tar.gz cd nginx-1.2.4 ./configure –help |more #View compiled parameter options user add www ./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_stub_status_module –with-http_ssl_module make && make install 3. Set nginx configuration file vi /usr/local/nginx/conf/nginx.conf user www www; worker_processes 8; worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000; pid /var/run/nginx.pid; error_log /usr/local/nginx/logs/error.log crit; worker_rlimit_nofile 65535; events { use epoll; worker_connections 65535; } http {     include   mime.types;   default_type application/octet-stream; server_names_hash_bucket_size 128;   keepalive_timeout 0;   client_header_buffer_size 16k;   client_max_body_size   32m; large_client_header_buffers 8 1024k; client_header_timeout 3m; client_body_timeout 3m;   send_timeout   3m; connection_pool_size 256;   request_pool_size   4k; output_buffers 16 128k; postpone_output 1460; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300;   fastcgi_buffer_size 128k;   fastcgi_buffers 16 256k; fastcgi_busy_buffers_size 512k; fastcgi_temp_file_write_size 512k;   fastcgi_temp_path /dev/shm;   open_file_cache max=65536 inactive=20s; open_file_cache_min_uses 1; open_file_cache_valid 30s; tcp_nodelay on; gzip on; gzip_min_length 1k; gzip_buffers 16 1024k; gzip_http_version 1.1;   gzip_types   text/plain application/x-Javascript text/css application/xml;   log_format access   ‘$remote_addr – $remote_user [$time_local] “GET http://$host$request_uri $server_protocol”‘   ‘$status $body_bytes_sent “$http_referer”‘ ‘”$http_user_agent” $http_x_forwarded_for’; server { listen 80; server_name_; location ~ / {    …

AMHLNMP panel enhanced version one-key package

AMH – 3.1.2 Rice Enhancer Pack Amysql – Introduction to AMH 01) Simple: Simple and exquisite, supports ssh, web online easy management and maintenance of virtual host, MySQL, FTP. 02) Efficient: Using high-performance Tengine server software support, the same environment is 10 times better than Apache. 03) Security: Enable the chroot mechanism, so that different virtual hosts do not affect each other, avoid cross-site attacks, and double the security performance of the web server. 04) Independent: Simple global management and support for independent operation and maintenance of different hosts. 05) Backup: Worry-free data protection, supports real-time, scheduled, encrypted, local and remote FTP/SSH (password/key) backup panel data, and one-click data restoration. 06) Task: Comprehensive online task plan setting management, and execute AMH commands regularly. 07) Autonomy: The web side is developed using the AMP-PHP framework, the background AMS-MySQL management system, and the AMF-JS framework are all independently developed by Amysql. 08) Open: Flexible and open, it supports writing of user-defined function modules, downloading, installation, management, uninstallation and deletion of web online/ssh module extension programs. 09) Free: open source, free, free, shared. 10) Freedom: Adopt the more free MariaDB database adopted by the mainstream Linux branch wget https://wofan.googlecode.com/files/amh.sh; chmod 775 amh.sh; ./amh.sh…

centos6.1 installation configuration nginx and php

Deploy nginx, php (including fastcgi), virtual host configuration in CentOS 6.1 environment, friends who need it can refer to the following Deployment time: 2012-07-24 OS environment: CentOS 6.1 nginx: nginx-1.2.2 PHP: PHP5.3.14 0. Install dependent packages yum install openssl-devel pcre-devel zlib-devel libjpeg-devel libpng-devel freetype-devel gcc make 1. Add www user to execute nginx useradd -M -r -s /sbin/nologin -d /opt/web/www 2. Create a temporary directory mkdir -p /var/tmp/nginx/client/ mkdir -p /var/tmp/nginx/proxy/ mkdir -p /var/tmp/nginx/fcgi/ 3. Download the latest stable source code of nginx cd /usr/local/src/ wget http://nginx.org/download/nginx-1.2.2.tar.gz 4. Unzip, compile, and install tar vxzf nginx-1.2.2.tar.gz cd nginx-1.2.2/ ./configure \ –prefix=/opt/web/nginx \ –error-log-path=/var/log/nginx/error.log \ –pid-path=/var/run/nginx/nginx.pid \ –lock-path=/var/lock/nginx.lock \ –user=www \ –group=www \ –with-http_ssl_module \ –with-http_stub_status_module \ –with-http_gzip_static_module \ –http-log-path=/var/log/nginx/access.log \ –http-client-body-temp-path=/var/tmp/nginx/client/ \ –http-proxy-temp-path=/var/tmp/nginx/proxy/ \ –http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \ –http-uwsgi-temp-path=/var/tmp/nginx/uwsgi/ make make install 5. Configure nginx vim /opt/web/nginx/conf/nginx.conf # Specify the starting user: user www www; # The number of processes, the author of nginx thinks that one is enough, modify it according to your own visits worker_processes 1; # Set error log: #error_log logs/error.log notice; #error_log logs/error.log info; error_log /var/log/nginx/error.default.log; pid /opt/web/nginx/nginx.pid; events { use epoll; worker_connections 1024; } http { charset utf-8; include mime.types; default_type application/octet-stream; #log_format main ‘$remote_addr – $remote_user [$time_local]…

Install and configure awstats statistics in nginx environment

wget http://awstats.sourceforge.net/files/awstats-7.0.tar.gz tar -zxvf awstats-7.0.tar.gz mv awstats-7.0 /usr/local/awstats chown -R root:root /usr/local/awstats chmod -R =rwX /usr/local/awstats chmod +x /usr/local/awstats/tools/*.pl chmod +x /usr/local/awstats/wwwroot/cgi-bin/*.pl cd /usr/local/awstats/tools ./awstats_configure.pl # Now enter the configuration file, follow the input below # none (I am nginx here, not apache, so it is none) # y (create a new configuration file) # firefoxbug (based on what domain name) # #A SIMPLE config file has been created: /etc/awstats/awstats.firefoxbug.conf #You should have a look inside to check and change manually main parameters. #You can then manually update your statistics for ‘firefoxbug’ with command: #> perl awstats.pl -update -cOnfig=firefoxbug #You can also build static report pages for ‘firefoxbug’ with command: #> perl awstats.pl -output=pagetype -cOnfig=firefoxbug #—–> Create config file ‘/etc/awstats/awstats.firefoxbug.conf’ # Config file /etc/awstats/awstats.firefoxbug.conf create The above steps will generate a configuration file by default ==>> /etc/awstats/awstats.firefoxbug.conf Naming rules for the awstats configuration file: awstats.website.conf modify configuration file # vim /etc/awstats/awstats.firefoxbug.conf # LogFile=”/var/log/httpd/mylog.log” ==>> LogFile=”/path/to/you_website_log_path” Create a database storage directory for awstats statistical results mkdir -p /var/lib/awstats /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -cOnfig=firefoxbug awstats.pl will read the parameters in -config and expand firefoxbug to awstats.firefoxbug.conf Go to the /etc/awstats directory or the current directory to search, and run the program according to the…

apache and nginx configuration not caching files

When developing and debugging the web, I often encounter the annoyance of clearing the cache or forcing a refresh to test due to the browser cache (cache). Provide the apache non-caching configuration and nginx non-caching configuration setting. apache: First make sure that the mod_headers module has been loaded in the configuration file httpd.conf. LoadModule headers_module modules/mod_headers.so We can let the browser read from the server every time according to the file type. Here, we use css, js, swf, php, html, and htm files for testing. Header set Cache-Control “private, no-cache, no-store, proxy-revalidate, no-transform” Header set Pragma “no-cache” nginx: location ~ .*\.(css|js|swf|php|htm|html )$ { add_header Cache-Control no-store; }

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索