ubuntu lnmp环境搭建

安装依赖

apt-get install gcc libpcre3 libpcre3-dev libxml2 libxml2-dev build-essential openssl libssl-dev libcurl4-gnutls-dev libjpeg-dev libpng-dev libmcrypt-dev libreadline6 libreadline6-dev libgd-dev libxslt-dev autoconf

mysql数据库

1 wget http://repo.mysql.com//mysql-apt-config_0.7.3-1_all.deb2 dpkg -i mysql-apt-config_0.7.3-1_all.deb3 apt-get update4 apt-get install mysql-server5 service mysql status6 service mysql start / stop /restartnote:修改配置         my.cnf bind-address     修改密码          mysqladmin -u root -p password hufeng     远程访问         GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;         FLUSH PRIVILEGES;

nginx

1 wget http://nginx.org/download/nginx-1.11.1.tar.gz2 ./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf --with-http_ssl_module --with-http_gzip_static_module3 cp /usr/local/nginx/sbin/nginx /usr/local/bin/4 nginx  , nginx -s reload / stop

php

1 wget http://php.net/distributions/php-7.0.7.tar.gz2 tar -zxvf php-7.0.7.tar.gz3 ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc  --with-pear  --with-pdo-mysql --with-mysqli --enable-libxml --enable-soap --enable-zip --enable-shmop --enable-mbstring --with-mcrypt --with-gd --with-jpeg-dir --with-png-dir --enable-fpm --with-curl --with-freetype-dir --with-openssl --enable-pcntl --with-zlib4 make && make install5 cp php.ini-development /usr/local/php7/etc/php.ini6 cp sapi/fpm/php-fpm /usr/local/bin/...参考官方文档常用命令 php --ini,php -m,php-fpm,kill -USR2 xxxx(重启php-fpm)

关键字:ubuntu, lnmp, Nginx, usr

版权声明

本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处。如若内容有涉嫌抄袭侵权/违法违规/事实不符,请点击 举报 进行投诉反馈!

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部