Detailed process of purchasing godaddyssl certificate and configuring https on nginx service
My private blog, not this one, blocked all search engines before, but Baidu still came to visit secretly, I didn’t expect that Baidu is really a non-compliance robots.txt The search engine, really let me down. Ever since, I bought Godaddy’s ssl certificate yesterday, and today I successfully installed it, https encrypted access + robots.txt, Baidu, please don’t tease my private domain… You see how good Google is, I haven’t been here since the first day I blocked the search engine. Let’s talk about how to buy Godaddy’s SSL certificate and the installation method under the Nginx platform: 1. Purchase a Godaddy SSL certificate I bought the cheapest one, use promo code cjcssl12t2 for $12.99 a year later, purchase address: http://www.godaddy.com/ 2. Generate the CSR file of the server Enter the server with root privileges, enter: openssl genrsa -des3 -out .key 2048 openssl req -new -key .key -out .csr (Must be 2048 as specified by Godaddy) Fill in the correct information as required (Godaddy The help page has related help: http://help.godaddy.com/topic/746/article/5269) 3. Verify the CSR file Enter the purchased SSL certificate page, no CSR is bound at this time, Godaddy will ask you to enter the CSR The content in the…
Gentoo system installation and configuration nagios+nginx
#Basic support gcc glibc glibc-common gd gd-devel useradd -m nagios #Add a user named nagios to run nagios passwd nagios #Set password groupadd nagcmd #Add nagcmd user group to submit external control commands through web pages usermod -a -G nagcmd nagios #Add nagios user to nagcmd group usermod -a -G nagcmd nginx #Add nginx user to nagcmd group wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.13.tar.gz wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz wget http://nagios.manubulon.com/nagios-snmp-plugins.1.1.1.tgz tar zxvf nagios-3.2.0.tar.gz tar zxvf nagios-plugins-1.4.13.tar.gz tar zxvf nagios-snmp-plugins.1.1.1.tgz cd nagios-3.2.0 ./configure –with-command-group=nagcmd make all make install make install-init make install-config make install-commandmode At this time, nagios itself has basically been installed vi /usr/local/nagios/etc/objects/contacts.cfg #Modify the email address in the nagiosadmin line to your email address to send the alarm email to your email #make install-webconf #Install nagios web interface #htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin #Set the account password for HTTP authentication when logging in to the web interface #Because I use nginx, so the above three lines are not executed, manually change the nginx configuration by myself cd .. cd nagios-plugins-1.4.13 ./configure –with-nagios-user=nagios –with-nagios-group=nagios make make install cd .. cd nagios_plugins #Install the components used by perl perl -MCPAN -e shell cpan> install Net::SNMP ./install.sh #Enter all the way #nagios complete installation /usr/local/nagios/bin/nagios -v…
gentoo system configuration and installation of LNMP environment
Install Nginx * One command to get it done: USE=fastcgi emerge nginx * Create new users and groups: groupadd www useradd www -g www After Nginx is installed, the nginx group and nginx user will be added by default, but I am still used to creating a www group and www user for HTTP service users. If the HTTP server is changed to apache or lighttpd in the future, the user name and user group can remain unchanged. Install MySQL Before installing PHP, you must install MySQL first, because the MySQL operation functions in PHP need the support of MySQL header files and libraries. emerge dev-db/mysql * Initialize the database: I’m not used to installing the database in the default path /var/lib/mysql, I put it in /work/db/3306/data. mkdir -p /work/db/3306/data mysql_install_db –basedir=/usr –datadir=/work/db/3306/data –user=mysql * Modify the configuration file: vim /etc/mysql/my.cnf Change datadir to: datadir = /work/db/3306/data * Start MySQL: /etc/init.d/mysql start * Modify root password: mysqladmin -uroot password hily * Test database: mysql -uroot -p Show: gentoo setup # mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 2 Server version: 5.0.84-log Gentoo Linux mysql-5.0.84-r1 Type ‘help;’…
Detailed process of debianx installation and configuration nginx
Nginx (“engine x”) is a high performance HTTP and reverse proxy server and an IMAP/POP3/SMTP proxy server. Nginx is the second most visited Rambler.ru in Russia by Igor Sysoev Developed by the site, the first public version 0.1.0 was released on October 4, 2004. It releases its source code under a BSD-like license and is known for its stability, rich feature set, sample configuration files, and low system resource consumption. June 1, 2011, nginx 1.0.4 released. If you use Debian or its derivatives, you can use sudo apt-get install nginx to install and use nginx. In this case, the configure options installed by default are as follows: ‘?conf-path=/etc/nginx/nginx.conf’, #configuration file path, the default is conf/nginx ‘?error-log-path=/var/log/nginx/error.log’, #Error log path, the default is /logs/error.log ‘?http-client-body-temp-path=/var/lib/nginx/body’, #Specify the path of the http client request cache file storage directory ‘?http-fastcgi-temp-path=/var/lib/nginx/fastcgi’, #Specify http The path of the FastCGI cache file storage directory ‘?http-log-path=/var/log/nginx/access.log’, #Specify the path of http default access log ‘?http-proxy-temp-path=/var/lib/nginx/proxy’, #Specify the http reverse proxy cache file storage directory ‘?http-scgi-temp-path=/var/lib/nginx/scgi’, #Specify http The path of the sigi cache file storage directory ‘?http-uwsgi-temp-path=/var/lib/nginx/uwsgi’, #Specify http The path of uwsgi cache file storage directory ‘?lock-path=/var/lock/nginx.lock’, # specify the path of the nginx.lock file ‘?pid-path=/var/run/nginx.pid’,…
CentOS system builds Nginx+SVN
Because there is nothing to customize, svn is installed directly using the package management software that comes with the system, Taking the centos series as an example, the command is as follows: yum install subversion Then the installation of nginx: mkdir -p /opt/soft groupadd web useradd http -g web -s /sbin/nologin cd /opt/soft wget http://sourceforge.net/projects/pcre/files/pcre/8.12/pcre-8.12.tar.gz wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz tar zxvf pcre-8.12.tar.gz tar zxvf openssl-1.0.0d.tar.gz tar zxvf nginx-0.8.54.tar.gz cd nginx-0.8.54 ./configure –prefix=/opt/nginx –user=http –group=web –with-http_stub_status_module –with-http_ssl_module –with-md5=/usr/lib/ –with-pcre=/opt/soft/pcre-8.12 –with-openssl=/opt/soft/openssl-1.0.0d make make install root assigned to /data/wwwroot vi /opt/nginx/conf/nginx.conf … Create svn warehouse: svnadmin create /data/svn Modify configuration file: vi /data/svn/conf/authz [groups] admin=test #A member of the admin group [/] test = rw #Member’s permission to /directory: r read, w write vi /data/svn/conf/passwd [users] test = 123456 #The password of user test vi /data/svn/conf/svnserve.conf anon-access = none auth-access = write password-db = passwd authz-db = authz realm = My First Repository start svnserv svnserve -d -r /data/svn You can also use the –listen-port parameter to specify the port to start multiple warehouses Import the project, if the project directory is svn://host/test ,Create a copy of the svn warehouse (nginx read directory) cd /data/wwwroot svn co svn://localhost/test –username test –password 123456 Automatically update nginx…
Install and configure nginx under CentOS to do load balancing for IIS servers
1. Environment preparation Install CentOS version: 6.2 Nginx version: 1.2.1 2. Introduction to common Linux commands If a worker wants to do a good job, he must first sharpen his tools. Before operating the Linux system, we must master some basic commands. I believe that people who have used DOS will not be too unfamiliar, basically including windows and linux. The command line mode is developed from the unix system. Here are just a few commands that will be involved in this blog. For more introduction, please refer to the relevant information. ls Used to display files and directories under a certain path For example: ls -a cd Enter a directory or return to the parent directory For example: cd /directory; cd .. ps show process information For example: ps -ef | grep nginx mkdir Create a directory For example: mkdir yourdir rmdir delete directory the rm Delete Files the kill end process For example: kill -TERM pid sends a term signal to the parent process, killing the process and the child process log out log out of the current session the reboot restart the system the yum Install related toolkits the setup Configure network and firewall settings the vi…
nginx under centos configures perl to run bugzilla
Before configuring bugzilla, you need to install the epel library and the rpmforge library. nginx itself does not have the function of perl analysis, need to use fcgi-perl, install: yum install fcgi-perl Write a script fastcgi service script: vim /usr/local/fcgi-perl/fastcgi-wrapper.pl #!/usr/bin/perl use FCGI; use Socket; use POSIX qw(setsid); require ‘syscall.ph’; &daemonize; #this keeps the program alive or something after exec’ing perl scripts END() { } BEGIN() { } *CORE::GLOBAL::exit = sub { die “fakeexit\nrc=”.shift().”\n”; }; eval q{exit}; if ($@) { exit unless $@ =~ /^fakeexit/; }; &main; sub daemonize() { chdir ‘/’ or die “Can’t chdir to /: $!”; defined(my $pid = fork) or die “Can’t fork: $!”; exit if $pid; setsid or die “Can’t start a new session: $!”; umask 0; } sub main { $socket = FCGI::OpenSocket( “127.0.0.1:8999”, 10 ); #use IP sockets $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%req_params, $socket ); if ($request) { request_loop()}; FCGI::CloseSocket( $socket ); } sub request_loop { while( $request->Accept() >= 0 ) { #processing any STDIN input from WebServer (for CGI-POST actions) $stdin_passthrough = ”; $req_len = 0 + $req_params{‘CONTENT_LENGTH’}; if (($req_params{‘REQUEST_METHOD’} eq ‘POST’) && ($req_len != 0) ){ my $bytes_read = 0; while ($bytes_read <$req_len) { my $data = ”;…
Installation and use of nginx in CentOS system
Install nginx under centos The requirements for compiling Nginx are as follows: Disk space: It is necessary to ensure that there is more than 10MB of free disk space. After Nginx is installed, it will occupy about 4MB of disk space. The actual disk space requirements will vary depending on the compilation settings and whether third-party modules are installed. GCC compiler and related tools: GCC is called GNU Compiler Collection, It is a powerful and high-performance free compiler for programming development launched by the GNU community. It is one of the representative works of GNU. Currently, the languages that can be compiled include: C, C++, Objective-C, Fortran, Java, etc. You must ensure that your operating system has a GCC compiler installed. In addition, you must also install the Autoconf and Automake tools, which are used to automatically create complete Makefiles. Most current software packages use this tool to generate Makefiles, and Nginx is no exception. Under the CentOS system, you can use the yum command to install the GCC compiler and related tools: yum -y install gcc gcc-c++ autoconf automake Module dependency: Some modules of Nginx need the support of other third-party libraries, such as gzip module needs zlib library,…
CentOS system installation and configuration nginx+tomcat server environment
1. Install tomcat: (1), install jdk: [root@localhost java]# mkdir -p /usr/java [root@localhost java]# tar zxvf jdk-7u3-linux-x64.tar.gz -C /usr/java/ [root@localhost java]# vi /etc/profile JAVA_HOME=”/usr/java/jdk1.7.0_03″ JRE_HOME=”/usr/java/jdk1.7.0_03/jre”# Without this configuration, tomcat will report an error when it is closed. CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH export JAVA_HOME export JRE_HOME export CLASSPATH export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC [root@localhost java]# source /etc/profile [root@localhost java]# java -version java version “1.7.0_03” Java(TM) SE Runtime Environment (build 1.7.0_03-b04) Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode) 2. Install tomcat: Tomcat download: # tar zxvf apache-tomcat-7.0.26.tar.gz -C /usr/src/ # cd /usr/src/ # cp -rf apache-tomcat-7.0.26 /usr/local/tomcat # cp -rf apache-tomcat-7.0.26 /usr/local/tomcat1 Install the first TOMCAT in /usr/local/tomcat # cd /usr/local/tomcat # vi /etc/profile Add $TOMCAT_HOME/common/lib/servlet.jar after CLASSPATH Add after PATH: $CATALINA_HOME/lib export TOMCAT_HOME=/usr/local/tomcat export CATALINA_HOME=/usr/local/tomcat export CATALINA_BASE=/usr/local/tomcat export PATH=$PATH:$CATALINA_HOME/lib export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib/servlet.jar Install the second TOMCAT in /usr/local/tomcat1 Setting environment variables #vi /etc/profile Add $TOMCAT_2_HOME/common/lib/servlet.jar after CLASSPATH Add after PATH: $CATALINA_2_HOME/lib export TOMCAT_1_HOME=/usr/local/tomcat1 export CATALINA_1_HOME=/usr/local/tomcat1 export CATALINA_1_BASE=/usr/local/tomcat1 export PATH=$PATH:$CATALINA_1_HOME/lib export CLASSPATH=$CLASSPATH:$CATALINA_1_HOME/common/lib/servlet.jar Save and exit :wq Enabling environment variables to take effect #source /etc/profile Modify the TOMCAT configuration file vi /usr/local/tomcat1/conf/server.xml (if the two tomcats are not on the same machine, you don’t need to modify the port) Put the following…
Nginx template nginx_lua_module and echo-nginx-module installation process
ngx_lua_module is a nginx http module, which embeds the lua parser into nginx, which is used to parse and execute web background scripts written in lua language. Features: Support Windows and Linux platforms. Support high concurrency and high performance. The LUA script code is embedded in the HTML webpage, similar to PHP. Supports non-blocking database operations, currently only supports MYSQL. Supports asynchronous file IO operations. Support non-blocking SOCKET IO operation. The following briefly introduces the installation of the ngx_lua_module module. Method 1: Use the integration package provided by Daniel ZhangYichun to install quickly. Very simple, download ngx_openresty, the integrated package includes: Nginx, Lua or Luajit, ngx_lua, and some useful third-party Nginx modules. Installation steps: ./configure –with-luajit make make install The installation is complete! Method 2: Ngx_lua can be manually compiled into Nginx. First, my Nginx installation path is: /usr/local/nginx. Two modules I will try to compile: echo, lua. The required modules are as follows: liujit http://luajit.org lua http://www.lua.org ngx_devel_kit https://github.com/simpl/ngx_devel_kit echo-nginx-module https://github.com/agentzh/echo-nginx-module lua-nginx-module https://github.com/chaoslawful/lua-nginx-module Installation steps: 1. Luajit2.0 (recommended) or Lua5.1 (Lua5.2 is not supported yet) wget http://luajit.org/download/LuaJIT-2.0.0-beta9.tar.gz tar zxvf LuaJIT-2.0.0-beta9.tar.gz cd LuaJIT-2.0.0-beta9 make sudo make install PREFIX=/usr/local/luajit Note: to avoid overwriting a previous version, The beta test releases only…