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;
- 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 安装笔记的更多相关文章
- CentOS LNMP安装phpMyAdmin
假设: 已经配置好LNMP环境,并且Nginx的网页目录在/usr/local/nginx/html 1.下载phpMyAdmin wget https://files.phpmyadmin.net/ ...
- centos docker 安装笔记
安装epel rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm --import ...
- CentOS 7 安装 LNMP 环境(PHP7 + MySQL5.7 + Nginx1.10)
记录下在CentOS 7 安装 LNMP 环境(PHP7 + MySQL5.7 + Nginx1.10)过程笔记. 工具 VMware版本号 : 12.0.0 CentOS版本 : 7.0 一.修改 ...
- 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操作系统,注意:本文中的所有命令行前面的 #> 表示命令行提示符 ...
- Centos编译安装PHP 5.5笔记
本篇是在 Centos 6.4 32bit 下编译安装 php 5.5.5 的笔记,接上篇 Centos编译安装Apache 2.4.6笔记.php 5.5.x 和 centos 源里面的 php 5 ...
- 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/{ ...
- centos lnmp一键安装
安装 系统需求: 需要2 GB硬盘剩余空间 128M以上内存,OpenVZ的建议192MB以上(小内存请勿使用64位系统) Linux下区分大小写,输入命令时请注意! 安装步骤: 1.使用putty或 ...
- Docker学习笔记之-在CentOS中安装Docker
上一节演示了如何 通过Xshell连接CentOS服务,链接:Docker学习笔记之-通过Xshell连接 CentOS服务 本节将演示 如何在CentOS中安装 Docker 第一步:更新系统包到最 ...
- [转载]centos 7(1611)安装笔记
centos 7(1611)安装笔记 麻烦 前天我把双系统笔记本里的 deepin 的磁盘分区直接从 Windows 7 磁盘管理里格式化了,结果悲催了,开不了机了,显示: 我以为是 Window ...
随机推荐
- 双11不再孤单,结识ECharts---强大的常用图表库
又是一年双十一,广大单身狗们有没有很寂寞(好把,其实我也是)!但是这次的双十一,我不再孤单,因为结识了一个js的强大的图表库---ECharts. 最近做软件工程项目的时候,由于设计图中有柱状图和饼图 ...
- 关于JNI程序中引用另外一个lib
我最近在写一个j2se的程序,我用的是开源的org.amse.ys.zip包里的代码,这部分代码是在FBReaderJ里抽取的,但是其中包含了一些native的方法,需要用的zlib库,而FBRead ...
- bzoj 3611 [Heoi2014]大工程(虚树+DP)
3611: [Heoi2014]大工程 Time Limit: 60 Sec Memory Limit: 512 MBSubmit: 408 Solved: 190[Submit][Status] ...
- 3 kafka介绍
本博文的主要内容有 .kafka的官网介绍 http://kafka.apache.org/ 来,用官网上的教程,快速入门. http://kafka.apache.org/documentatio ...
- XMPPFrameWork IOS 开发(六)聊天室
原始地址:XMPPFrameWork IOS 开发(六)聊天室 聊天室 //初始化聊天室 XMPPJID *roomJID = [XMPPJID jidWithString:ROOM_JID]; xm ...
- maven怎么引入自定义jar的详细图文教程
1 首先找到你的maven的配置文件{你maven的路径}\conf\settings.xml,然后打开settings.xml,并修改你存放本地jar路径.如我想把我自己的jar放到C:\Users ...
- java web实现 忘记密码(找回密码)功能及代码
java web实现 忘记密码(找回密码)功能及代码 (一).总体思路 (二).部分截图 (三).部分代码 (一).总体思路: 1.在 找回密码页面 录入 姓名.邮箱和验证码,录入后点击[提交]按钮, ...
- 平时Error记录
The Windows Firewall on this machine is currently 1.This row already belongs to another table. DataT ...
- 快速幂模m算法
给你三个数,a,b,m 求a^b%m的值. 如果b过大,用普通的快速幂会超时. 所以将b=2^0*b0+2^1*b+b1...... 然后,你们利用初中的知识就知道怎么做了. 继续,上代码. #inc ...
- VS2012的自动生成测试的插件 Unit Test Generator
Unit Test Generator extension是一个VS2012的插件,可以为C#的public方法很方便的自动生成unit test.安装这个插件后点击TEST菜单可以配置,如下所示: ...