zoukankan      html  css  js  c++  java
  • LNMP

    useradd -s /sbin/nologin -g mysql -M mysql  #创建数据库账号
    #采用二进制方式安装MySQL

    tar xf mysql-5.5.32-linux2.6-x86_64.tar.gz -C /usr/local/
    cd /usr/local/
    mv mysql-5.5.32-linux2.6-x86_64 mysql-5.5.32
    ln -s mysql-5.5.32 mysql

    cd /usr/local/mysql

    kdir -p /usr/local/mysql/data #建立MySQL数据文件目录

    chown -R mysql.mysql /usr/local/mysql #授权mysql用户管理MySQL的安装目录
    yum -y install libaio #光盘源安装依赖包,否则下一步的编译会报错
    /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql
    tree /usr/local/mysql/data/
    /usr/local/mysql/data/
    cp support-files/mysql.server /etc/init.d/mysqld

    chmod +x /etc/init.d/mysqld 
    /etc/init.d/mysqld start
    ln -s /usr/local/mysql/bin/* /usr/local/bin/
    ln -s /usr/local/mysql/bin/* /usr/local/bin/
    show databases;    #查看当前所有的数据库
     select user();   #查看当前的登陆用户
    mysqladmin -u root password '123123' #设置密码
    ysql -uroot -p  #新的登陆方式
    Enter password:                 #输入设置的密码
    select user,host from mysql.user;
    drop user "root"@"::1";
     drop user ""@"localhost";
    select user,host from mysql.user;
    select user,host from mysql.user;
    wget 127.0.0.1    #测试Nginx
    yum -y install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel
    yum -y install freetype-devel libpng-devel gd libcurl-devel libxslt-devel
    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
    tar xf libiconv-1.14.tar.gz -C /usr/src/
    cd /usr/src/libiconv-1.14/
    ./configure --prefix=/usr/local/libiconv && make && make install
    get -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
    编译安装过程略
    yum -y install libmcrypt-devel
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
    yum -y install mhash
    yum -y install mcrypt
    tar xf php-5.3.28.tar.gz -C /usr/src/
    cd /usr/src/php-5.3.28/
    ./configure 
    > --prefix=/usr/local/php5.3.28 
    > --with-mysql=/usr/local/mysql 
    > --with-iconv-dir=/usr/local/libiconv 
    > --with-freetype-dir 
    > --with-jpeg-dir 
    > --with-png-dir 
    > --with-zlib 
    > --with-libxml-dir=/usr 
    > --enable-xml 
    > --disable-rpath 
    > --enable-safe-mode 
    > --enable-bcmath 
    > --enable-shmop 
    > --enable-sysvsem 
    > --enable-inline-optimization 
    > --with-curl 
    > --with-curlwrappers 
    > --enable-mbregex 
    > --enable-fpm 
    > --enable-mbstring 
    > --with-mcrypt 
    > --with-gd 
    > --enable-gd-native-ttf 
    > --with-openssl 
    > --with-mhash 
    > --enable-pcntl 
    > --enable-sockets 
    > --with-xmlrpc 
    > --enable-zip 
    > --enable-soap 
    > --enable-short-tags 
    > --enable-zend-multibyte 
    > --enable-static 
    > --with-xsl 
    > --with-fpm-user=www 
    > --with-fpm-group=www 
    > --enable-ftp
    ln -s /usr/local/mysql/lib/libmysqlclient.so.18
    ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/
    touch ext/phar/phar.phar
     make
    ln -s /usr/local/php5.3.28/ /usr/local/php
    ls -l /usr/local/php
    cd /usr/src/php-5.3.28/
    ls php.ini*
    cp php.ini-production /usr/local/php/lib/php.ini

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

    cd /usr/local/php/etc/
    /usr/local/php/sbin/php-fpm
    cd /usr/local/nginx/conf/



     
     
     
  • 相关阅读:
    君の名は~ 观后感
    dp1,明天补题解
    【bzoj1222】[HNOI2001]产品加工
    Daily~Miracles
    luogu 1273有线电视网
    luogu 1373
    codeforces 721C
    codeforces 706E
    The~Best~Chanteur~宇多田ヒカル
    codeforces706D
  • 原文地址:https://www.cnblogs.com/liujianxin/p/9930284.html
Copyright © 2011-2022 走看看