zoukankan      html  css  js  c++  java
  • centos lnmp 安装笔记

     
    
    

    sudo apt-get install nginx mysql-server build-essential libxml2-dev libreadline6 libreadline6-dev openssl libssl-dev curl libcurl4-gnutls-dev libjpeg-dev libpng-dev libmcrypt-dev

     

     


    [root@host]# chkconfig nginx on [root@host]# service nginx start [root@host]# service nginx stop [root@host]# service nginx restart [root@host]# service nginx status
    [root@host]# service nginx reload

    Cenos 7.0

    yum -y install mariadb-server mariadb
    systemctl start mariadb

    yum -y install mariadb-server mariadb

    systemctl start mariadb

    sudo yum install epel-release

    sudo yum install nginx

    sudo systemctl start nginx

    //修改密码

    UPDATE user SET password=PASSWORD('123456') WHERE user='root';

    FLUSH PRIVILEGES;

    1. yum install wget gcc gcc-c++ make re2c curl curl-devel libxml2 libxml2-devel libjpeg libjpeg-devel libpng libpng-devel libmcrypt libmcrypt-devel zlib zlib-devel openssl openssl-devel freetype freetype-devel gd gd-devel perl perl-devel ncurses ncurses-devel bison bison-devel libtool gettext gettext-devel cmake bzip2 bzip2-devel pcre pcre-devel
     
    ./configure --prefix=/usr/local/php  --enable-fpm --enable-sockets --with-mcrypt --enable-mbstring --with-curl --disable-debug  --disable-rpath --enable-inline-optimization --with-bz2 --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex  --with-mhash --enable-zip --with-pcre-regex --with-png-dir=/extra_disk/pkg/libpng-1.6.21 --with-gd --with-pdo-mysql --enable-pdo --with-openssl --with-freetype-dir=/usr/include/freetype2/freetype/ --with-zlib-dir=/extra_disk/pkg/zlib-1.2.8 --with-jpeg-dir=/extra_disk/pkg/jpeg-6b


    PHP Setup

    ./configure --prefix=/usr/local/php  --enable-fpm --enable-sockets --enable-mbstring --with-curl --disable-debug  --disable-rpath --enable-inline-optimization --with-bz2 --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex  --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-gd --with-pdo-mysql --enable-pdo --with-openssl --with-freetype-dir=/usr/include/freetype2/freetype/ --with-zlib-dir=/extra_disk/package/zlib-1.2.8 --with-jpeg-dir=/extra_disk/package/jpeg-6b --with-pdo-oci=instantclient,/usr,11.2.0.3.0

    
    
     

    [root@host]# make

    [root@host]# make install

     

    ubuntu

    ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --enable-sockets --with-mcrypt --enable-mbstring --with-curl --disable-debug  --disable-rpath --enable-inline-optimization --with-bz2 --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex  --with-mhash --enable-zip --with-pcre-regex --with-gd --with-pdo-mysql --enable-pdo --with-openssl

    groupadd www
    useradd -g www www

    vi /usr/local/php/etc/php-fpm.conf

    user = www

    group = www

    sudo apt-get install sysv-rc-conf

    sysv-rc-conf php-fpm on

    sysv-rc-conf nginx on

    sysv-rc-conf mysql on

    解决办法

    cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

    cd php 7.0 sapi/fpm/

    cp www.conf /usr/local/php/etc/php-fpm.conf

    cp php.ini-production /usr/local/php/lib/php.ini 

    /usr/local/php/bin/php -i | grep "Loaded Configuration File"

    [root@host]# cd sapi/fpm/
    [root@host]# cp init.d.php-fpm /etc/init.d/php-fpm

    [root@host]# chmod 755 /etc/init.d/php-fpm

    [root@host]# /etc/init.d/php-fpm start

    [root@host]# /sbin/chkconfig --add /etc/init.d/php-fpm --(添加到开机服务列表)

    [root@host]# /sbin/chkconfig php-fpm on

    php-fpm的启动、停止和重启:

    [root@host]# /etc/init.d/php-fpm start

    [root@host]# /etc/init.d/php-fpm stop


    打开80端口必须输入以下

    [root@host]# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

    [root@host]# service iptables save

    [root@host]# service iptables restart

    insert into user(Host,User,Password)values("localhost","test",password("123456"));

    flush privileges;


    grant all privileges on hsker.* to 'test'@'%' identified by '123456';


    flush privileges;

    update user set host = '%' where user = 'test';

    MySQL Daemon failed to start  

    chmod 777 -R /var/lib/mysql;

    yum install ibus-table-wubi.noarch

    #显示当前网络连接
    #nmcli connection show
    NAME UUID TYPE DEVICE
    eno1 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eno1

    #修改当前网络连接对应的DNS服务器,这里的网络连接可以用名称或者UUID来标识
    #nmcli con mod eno1 ipv4.dns "114.114.114.114 8.8.8.8"

    #将dns配置生效
    #nmcli con up eno1

  • 相关阅读:
    工具类-vim在shell中卡死的情况
    tomcat日志分类
    逻辑运算
    牛客练习赛29 F 算式子
    牛客练习赛29 B
    查询
    hdu 5984
    zoj 4057
    zoj 4056
    zoj 4054
  • 原文地址:https://www.cnblogs.com/ytjjyy/p/3755275.html
Copyright © 2011-2022 走看看