4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
新闻详情
centos6.2 LNMP环境搭建-西门-51CTO博客
来自 : 51CTO技术博客 发布时间:2021-03-25
CentOS6.2yum安装ngigxmysqlphp

#vi/etc/sysconfig/iptables

-AINPUT-mstate--stateNEW-mtcp-ptcp--dport80-jACCEPT
-AINPUT-mstate--stateNEW-mtcp-ptcp--dport3306-jACCEPT

#ZZ

#/etc/init.d/iptablesrestart

关闭selinux

#vi/etc/selinux/config

selinux=enforcing或permissive改成disabled

ZZ

#reboot #shutdown-rnow

#wgethttp://www.atomicorp.com/installers/atomic

#sh./atomic

#yumcheck-update

#yuminstallnginxmysqlmysql-serverphp

#yuminstallphp-mysqlphp-gdlibjpeg*php-imapphp-ldapphp-odbcphp-pearphp-xmlphp-xmlrpcphp-mbstringphp-mcryptphp-bcmathphp-mhashlibmcryptlibmcrypt-develphp-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

#servicenginxstart

#servicemysqldstart

#servicephp-fpmstart

#chkconfignginxon

#chkconfigmysqldon

#chkconfigphp-fpmon

#mysql_secure_installation#设置mysql中root密码并删除测试帐号

#vi/etc/nginx/nginx.conf

usernginxnginx;

ZZ

#vi/etc/nginx/conf.d/default.conf

indexindex.phpindex.htmlindex.htm;

location~\\.php${
roothtml;
fastcgi_pass127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
includefastcgi_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

#servicenginxrestart

#servicemysqldrestart

#servicephp-fpmrestart

本文链接: http://igxgroup.immuno-online.com/view-770414.html

发布于 : 2021-03-25 阅读(0)
公司介绍
品牌分类
其他
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616
官网:http://