centos6.2 LNMP环境搭建
2012-04-29 19:48
661 查看
CentOS 6.2yum 安装ngigx mysql php
# vi /etc/sysconfig/iptables-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
# ZZ
# /etc/init.d/iptables restart
关闭selinux
# vi /etc/selinux/config
selinux=enforcing或permissive改成disabled
ZZ
# reboot shutdown -r now
# wget http://www.atomicorp.com/installers/atomic
# sh ./atomic
# yum check-update
# yum install nginx mysql mysql-server php
# yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm
安装完成后,备份配置文件:
# cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.simonbk
# cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.simonbk
# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
# cp /etc/php.ini /etc/php.ini.simonbk
# cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.conf.simonbk
# service nginx start
# service mysqld start
# service php-fpm start
# chkconfig nginx on
# chkconfig mysqld on
# chkconfig php-fpm on
# mysql_secure_installation #设置mysql中root密码并删除测试帐号
# vi /etc/nginx/nginx.conf
user nginx nginx;
ZZ
# vi /etc/nginx/conf.d/default.conf
index index.php index.html index.htm;
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
ZZ
# vi /etc/php.ini
:946
date.timezone = PRC
:432
expose_php = Off
:745
magic_quotes_gpc = On
:380
open_basedir = .:/tmp/
:386
disable_functions =
passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,
ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,
escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,
getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd,
posix_getegid,posix_geteuid,posix_getgid,
posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,
posix_getppid,posix_getpwnam,posix_getpwuid,
posix_getrlimit, posix_getsid,posix_getuid,posix_isatty,
posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,
posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
ZZ
# vi /etc/php-fpm.d/www.conf
user = nginx
group = nginx
ZZ
# service nginx restart
# service mysqld restart
# service php-fpm restart
本文出自 “西门” 博客,转载请与作者联系!
相关文章推荐
- CentOS 6.2 LNMP 环境搭建优化笔记
- Centos 6.2 实际工作环境搭建(LNMP)
- centos6.2企业级LNMP环境搭建
- Centos 6.2 实际工作环境搭建(LNMP)
- LNMP环境的搭建配置(CentOS6.2+nginx1.1.15+mysql5.6+php5.3.10+redis+memcached)
- CentOS 6.2 LNMP 环境搭建优化笔记
- Centos6.2搭建lnmp环境
- LNMP环境的搭建配置(CentOS6.2+nginx1.1.15+mysql5.6+php5.3.10)
- Centos 6.2 实际工作环境搭建(LNMP)
- centos之lnmp环境搭建
- centos7.2环境yum方式快速搭建lnmp环境nginx+mariadb+php-fpm
- 详解CentOS 7.0源码包搭建LNMP 实际环境搭建
- 在阿里云Centos下LNMP环境搭建
- Centos6.2下搭建LNMP环境
- CentOS 6.6搭建LNMP环境
- yum搭建lnmp环境(CentOS6.4)
- 烂泥:学习centos之快速搭建LNMP环境
- yum搭建lnmp环境(CentOS6)
- CentOS下LNMP环境搭建
- centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课