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

centos lnmp 安装笔记的更多相关文章

  1. CentOS LNMP安装phpMyAdmin

    假设: 已经配置好LNMP环境,并且Nginx的网页目录在/usr/local/nginx/html 1.下载phpMyAdmin wget https://files.phpmyadmin.net/ ...

  2. centos docker 安装笔记

    安装epel rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm --import ...

  3. CentOS 7 安装 LNMP 环境(PHP7 + MySQL5.7 + Nginx1.10)

    记录下在CentOS 7 安装 LNMP 环境(PHP7 + MySQL5.7 + Nginx1.10)过程笔记. 工具 VMware版本号 : 12.0.0 CentOS版本 : 7.0 一.修改 ...

  4. MonoDevelop 4.2.2/Mono 3.4.0 in CentOS 6.5 安装笔记

    MonoDevelop 4.2.2/Mono 3.4.0 in CentOS 6.5 安装笔记 说明 以root账户登录Linux操作系统,注意:本文中的所有命令行前面的 #> 表示命令行提示符 ...

  5. Centos编译安装PHP 5.5笔记

    本篇是在 Centos 6.4 32bit 下编译安装 php 5.5.5 的笔记,接上篇 Centos编译安装Apache 2.4.6笔记.php 5.5.x 和 centos 源里面的 php 5 ...

  6. centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课

    centos  LNMP第一部分环境搭建 LAMP安装先后顺序  LNMP安装先后顺序 php安装 安装nginx  编写nginx启动脚本   懒汉模式  mv   /usr/local/php/{ ...

  7. centos lnmp一键安装

    安装 系统需求: 需要2 GB硬盘剩余空间 128M以上内存,OpenVZ的建议192MB以上(小内存请勿使用64位系统) Linux下区分大小写,输入命令时请注意! 安装步骤: 1.使用putty或 ...

  8. Docker学习笔记之-在CentOS中安装Docker

    上一节演示了如何 通过Xshell连接CentOS服务,链接:Docker学习笔记之-通过Xshell连接 CentOS服务 本节将演示 如何在CentOS中安装 Docker 第一步:更新系统包到最 ...

  9. [转载]centos 7(1611)安装笔记

    centos 7(1611)安装笔记   麻烦 前天我把双系统笔记本里的 deepin 的磁盘分区直接从 Windows 7 磁盘管理里格式化了,结果悲催了,开不了机了,显示: 我以为是 Window ...

随机推荐

  1. HashMap和Hashtable

    HashTable 散列表(Hash table,也叫哈希表),是根据关键码值(Key value)而直接进行访问的数据结构.也就是说,它通过把关键码值映射到表中一个位置来访问记录,以加快查找的  速 ...

  2. gRPC:Google开源的基于HTTP/2和ProtoBuf的通用RPC框架

    gRPC:Google开源的基于HTTP/2和ProtoBuf的通用RPC框架 gRPC:Google开源的基于HTTP/2和ProtoBuf的通用RPC框架 Google Guava官方教程(中文版 ...

  3. Google翻译

    本博文的主要内容有 .Google翻译的介绍    .Google翻译之一:内容板块的翻译    .Google翻译之二:网页的翻译  .Google翻译之四:文档的翻译    .Google翻译之四 ...

  4. crontab使用--linux下的定时任务程序

    crontab是一个linux下的定时运行程序,如果我们想让自己的程序定时执行, 可以把自己的程序交给这个程序来完成 第一步:配置crontab的脚本的默认编辑器,它的默认的编辑器不好用,我们配置vi ...

  5. 常用shell变量$#,$@,$0,$1,$2等

    常用shell变量$#,$@,$0,$1,$2的含义解释: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返 ...

  6. android生成二维码

    新建项目 布局截图如下(一个输入框,一个按钮,一个imageview),输入想要的东西(文字,数字,网站链接等)然后点击按钮生成二维码,然后可以扫描识别. 首先需要一个谷歌的一个jar包 activi ...

  7. 【解决方法】VS 丢失模板

    今天要用VS2008做一个报表,可是在添加新建项的时候却没有报表(rdlc)模板. 解决方法: 1 拷贝文件 1.1 32位windows 将 C:\Program Files\Microsoft V ...

  8. 超人学院Hadoop大数据资源分享

    超人学院Hadoop大数据资源分享 http://bbs.superwu.cn/forum.php?mod=viewthread&tid=770&extra=page%3D1 很多其它 ...

  9. TraceGL监控Node.js应用或者浏览器JavaScript代码

    https://github.com/traceglMPL/tracegl TraceGL能够监控Node.js应用或者浏览器JavaScript代码的运行过程和细节.可视化的用户界面也很友好

  10. react native mac install

    Mac上使用react native tips: 1. 安装Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/ ...