CentOS   发布时间:2022-05-09  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了centos 6.9 快速部署lnmp网站大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

安装软件

yum install -y PHP PHP-MysqL PHP-fpm @R_419_1679@ MysqL MysqL-server

MysqL配置

/etc/my.cnf

[client]
port=3306
[MysqL]
default-character-set=utf8

[MysqLd]
skip-name-resolve
port=3306
character-set-server=utf8
default-storage-engine=MyISAM
#支持 INNODB 引擎模式。修改为 default-storage-engine=INNODB 即可。
#如果 INNODB 模式如果不能启动,删除data目录下ib开头的日志文件重新启动。

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=512

query_cache_size=0
table_cache=256
tmp_table_size=18M

thread_cache_size=8
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=35M
key_buffer_size=25M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K

innodb_additional_mem_pool_size=2M

innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M

innodb_buffer_pool_size=47M
innodb_log_file_size=24M
innodb_thread_concurrency=8
  • 建立账号
grant all privileges on *.* to root@'%' identified by 'xxx';

grant all privileges on *.* to root@'localhost' identified by 'xxx';

flush privileges;

@R_419_1679@配置

server {
    listen               80 default;
    server_name          www.xxx.com;

    client_max_body_size 4M;
    client_body_buffer_size 128k;

    root /opt/www/www.xxx.com;
    index index.PHP;

    location ~ \.PHP$ {
        #try_files $uri $uri/ /index.PHP;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param REDIRECT_STATUS 200;
       # fastcgi_pass unix:/var/run/PHP5-fpm.sock;
        fastcgi_pass 127.0.0.1:9000;
    }
}

PHP-fpm配置

nothing configure

启动

/etc/init.d/PHP-fpm restart
/etc/init.d/MysqLd restart
/etc/init.d/@R_419_1679@ restart
chkconfig PHP-fpm on
chkconfig MysqLd on
chkconfig @R_419_1679@ on

大佬总结

以上是大佬教程为你收集整理的centos 6.9 快速部署lnmp网站全部内容,希望文章能够帮你解决centos 6.9 快速部署lnmp网站所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: