Centos 6.5x64 lnpm ins_0000_note

Source: Internet
Author: User
Tags mcrypt

Ins sys:

1. Next all, then reboot.

2. login system use root

 

Cfg sys:

1. Keep etc0 work:

# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

 

Change:

Onboot = Yes

 

Then enable eth0:

# IFUP eth0

 

Bytes -------------------------------------------------------------------------------------------

 

 

Ins npm:

1. Use xshell connect VMOs:

SSH [email protected]

 

2. INS wget:

# Yum install wget-y

 

3. mkdir:

# Mkdir/home/upload

# Cd/home/upload

 

 

4. ins gcc:

# Yum install gcc-y

 

5. Create Serv Group & users:

# Groupadd WWW

# Useradd-m www nginx

 

 

6. INS nginx:

 

# Yum install PCRE-devel zlib-devel-y

# Tar zxvf nginx-1.6.0.tar.gz

# Cd nginx-1.6.0

#./Configure -- prefix =/usr/local/nginx -- user = nginx -- group = WWW -- With-PCRE

# Make

# Make install

 

Onboot:

# Chkconfig nginx on

 

7. ins php:

# Cd/home/upload

# Wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.6.tar.gz

# Tar zvxf libmcrypt-2.5.6.tar.gz

# Cd libmcrypt-2.5.6

# Make

# Make install

# CD ..

# Yum install libxml2-devel-y

 

 

# Tar zxvf php-5.5.13.tar.gz

# Cd php-5.5.13

#. /Configure -- prefix =/usr/local/PHP -- With-config-file-Path =/usr/local/PHP -- With-mysql -- With-mysqli -- With-PDO-MySQL -- enable-opcache -- enable-mbstring -- enable-mbregex -- With-mcrypt =/usr/local/libmcrypt -- With-mhash -- enable-CGI -- enable-FPM

# Make

# Make install

# Cp PHP. ini-development/usr/local/PHP. ini

# Cd/usr/local/PHP/etc

# Cp php-fpm.conf.default php-fpm.conf

 

# Chkconfig PHP-FPM on

 

8. ins mysql:

# Yum install MySQL mysql-server mysql-devel-y

 

Bytes -------------------------------------------------------------------------------------------

 

CFG Server:

 

1. nginx:

# Cd/usr/local/nginx/Conf

# Cp nginx. conf nginx. conf. Bak

# Vi nginx. conf

Edit:

Server-> location/-> index: add index. php

 

Remove the Comment & EDIT:

Location ~ \. Php $ {

Root HTML;

Fastcgi_pass 127.0.0.1: 9000;

Fastcgi_index index. php;

# Fastcgi_param script_filename/scripts $ fastcgi_script_name; changed

Fastcgi_param script_filename $ document_root $ fastcgi_script_name;

Include fastcgi_params;

}

 

2. php:

# Vi/usr/local/PHP. ini

Remove the Comment & edit value: Date. timezone = PRC

 

3. Firewall Open Port:

# Vi/etc/sysconfig/iptables

 

Add 2 item:

-A input-M state -- state new-m tcp-p tcp -- dport 80-J accept

-A input-M state -- state new-m tcp-p tcp -- dport 3306-J accept

#/Etc/init. d/iptables restart

 

3. NPM noboot:

# Vi/etc/rc. Local

 

Add 2 item:

'

/Usr/local/PHP/sbin/PHP-FPM

/Usr/local/nginx/sbin/nginx

'

 

# Chkconfig mysqld on

 

Bytes -------------------------------------------------------------------------------------------

 

Test:

# Cd/usr/local/nginx/html

# Echo '<? PHP echo phpinfo ();?> '> Test. php

 

# Service mysqld start

#/Usr/local/PHP/sbin/PHP-FPM

#/Usr/local/nginx/sbin/nginx

 

View:

HTTP: 192.168.56.1/test. php

 

Notice:

If

Linux work envionrment is in VM

And

Net Connect Method is Nat:

 

Must redirect local port

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.