LAMP

LAMP(LNMP) 环境搭建

我怕爱的太早我们不能终老 提交于 2019-12-02 10:47:42
一、首先保证网络畅通 我们可以在通过 ping ip 地址来检查是否通, 若果不通就登录远程服务器查看 Linux下的网络配置文件 命令:cat /etc/sysconfig/network-scripts/ifcfg-eth0 打开后如图所示:(https://www.cnblogs.com/baichuanhuihai/p/8127329.html) 确保上图信息准确无误,如果还是无法连网,进入修改命令:sudo vim /etc/sysconfig/network-scripts/ifcfg-eth0 修改BOOTPROTO=static 或者添加mac地址 linux/Centos下查看网卡Mac地址,输入命令: # cat /sys/class/net/eth0/address 最后从起网络服务:service network restart或者systemctl restart network.service ,关闭本机防火墙命令: systemctl stop firewalld 二、安装 MySQL https://segmentfault.com/a/1190000007667534 https://www.cnblogs.com/dengshihuang/p/8029092.html https://segmentfault.com/a

PHP: syntax error, unexpected '&' in /etc/php5/cli/php.ini on line 107

我怕爱的太早我们不能终老 提交于 2019-12-02 10:40:43
I have recently upgraded PHP 5.5.* to PHP 5.6.13. I need to display all the errors in PHP scripts if there are any. So I have uncommented the following code in /etc/php5/cli/php.ini error_reporting Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED Development Value: E_ALL Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT And it is showing the the error "unexpected '&' on line no 107". I know there is something wrong with in my code and the nothing is displaying in browser while executing it. You shouldn't be uncommenting that, its informational. If you want all errors comment

Apache网页优化—网页压缩

淺唱寂寞╮ 提交于 2019-12-02 10:37:43
Apache网页与安全优化 Apache网页优化 1.网页压缩 2.网页缓存 Apache安全优化 1.配置防盗链 2.隐藏版本信息 Apache网页优化概述 1.在企业中,部署Apache后只采用默认的配置参数,会引发网站很多问题,换言之默认配置是针对以前较低的服务器配置的,以前的配置已经不适用当今互联网时代 2.为了适应企业需求,就需要考虑如何提升Apache的性能与稳定性,这就是Apache优化的内容 3.优化内容 配置网页压缩功能 工作模式的选择与参数优化 配置防盗链 配置隐藏版本号 gzip介绍 配置Apache的网页压缩功能,是使用gzip压缩算法来对网页内容进行压缩后再传输到客户端浏览器 作用: 1.降低了网络传输的字节数,加快网页加载的速度 2.节省流量,改善用户的浏览体验 3.gzip与搜索弓|擎的抓取工具有着更好的关系 Apache的压缩模块 Apache实现网页压缩的功能模块包括: 1.mod_gzip模块 2.mod_deflate 模块 Apache 1.x . 1.没有内建网页压缩技术,但可使用第三方mod_ Apache 2.x 1.在开发的时候,内建了mod_deflate 这个模块,取代mod_gzip mod_gzip 模块与mod_deflate 模块: 1.两者均使用gzip压缩算法,运作原理类似 2.mod_deflate 压缩速度略快

What is the easiest way to have a local LAMP installation for web development on mac OS X?

被刻印的时光 ゝ 提交于 2019-12-02 09:37:25
I'm new to mac os x. In the Windows XP world, there are packages available, like easyPHP, wampserver, uniformserver, that enable you to have a local webserver complete with php, mysql configured via an automatic installer. Really handy. I need the same on my new mac. I know mac os x comes with a local webserver. Is this already with php, mysql preinstalled? I'd like to have you guys advise on the easiest way to have this local lamp so that i can continue developing on this nice and shiny machine. thanks! Question : What means LAMP ? Answer : Linux Apache MySQL PHP Q: and if this was running on

apache not returning index.php as default

寵の児 提交于 2019-12-02 08:58:51
I recently made a DigitalOcean droplet with LAMP pre-installed. Went and uploaded my website (including index.php) to /var/www Apache just returns the It Works! page, I have to manually add /index.php to my url Things I have tried: Made an .htaccess file containing "DirectoryIndex index.php" Adding DirectoryIndex index.php to apache2.conf Set index.php first in dir.conf Making an index.html, didn't show that either. EDIT: here's my apache2.conf file: http://pastebin.com/BMgiNdiD You are missing following configuration: # # DirectoryIndex: sets the file that Apache will serve if a directory #

PHP7.0.0正式版编译安装LAMP/LNMP【CentOS 7】

白昼怎懂夜的黑 提交于 2019-12-02 07:12:42
apache mysql我就不编译了 网上有几篇7.0rc版的文章 但编译参数有问题,并不适合7.0正式版,在这里做一下修正,反正你按我给你的一步步的做,不会有错的.... 前期准备 基本上很全了 你可以按自己的需求删减一些 yum groupinstall "Development tools" yum install -y gcc gcc-c++ make cmake automake autoconf gd file bison patch mlocate flex \ diffutils zlib zlib-devel pcre pcre-devel \ libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel \ glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel \ ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel \ krb5 krb5-devel openssl openssl-devel \ openldap openldap-devel nss_ldap openldap

The page isn't redirecting properly - HTTPS HTACCESS rewrite error

有些话、适合烂在心里 提交于 2019-12-02 05:20:10
I have this following htaccess rewrite rules The rule1 is causing the infinite loop error. I am trying to redirect all the request to HTTPS but it's not working. Because of the rule1 the rule2 is also blocked. When I comment on rule1 everything is fine. If I change the order also this infinite loop error occurs. Please help me how to resolve this error RewriteEngine On RewriteBase / #Rule 1: Rewrite all the requests to HTTPS RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] //Rule 2: redirect to the account closed setup RewriteRule ^(?:abcd)/A-Report/(.+)$ /closed/$1 [NC,L] Thanks in advance

LAMP架构介绍以及MySQL安装

只愿长相守 提交于 2019-12-02 03:51:46
11月9日任务 11.1 LAMP架构介绍 11.2 MySQL、MariaDB介绍 11.3/11.4/11.5 MySQL安装 11.1 、LAMP架构介绍 # Apache和PHP是一体的,必须在一台服务器上,但是MySQL可以单独存在一台服务器上,当用户访问量很小的时候,三个服务也可以同时放在一台服务器上,但当访问量比较大时就要分开。Apache通过PHP模块从MySQL抽取数据,这个属于动态文件。还有一种情况是Apache直接从Apache子目录里边抽取文件为静态文件,例如访问网页的logo就是从子目录里边抽取的。 11.2、MySQL_Mar i aDB介绍 11.3、MySQL安装(上) MySQL的几个常用安装包:rpm、源码包、二进制免编译 cd /usr/local/src wget http://mirrors.163.com/mysql/Downloads/MySQL-5.6/mysql-5.6.39-linux-glibc2.12-x86_64.tar.gz tar -zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz mv mysql-5.6.35-linux-glibc2.5-x86_64 /usr/local/mysql cd /usr/local/mysql useradd mysql mkdir

Centos7部署LAMP平台之架构之路

爷,独闯天下 提交于 2019-12-02 03:23:48
部署LAMP平台搭建 一、 源码安装LAMP 1、 安装apache [root@localhost ~]# yum -y install gcc* apr-devel apr-util-devel pcre-devel [root@localhost src]# [root@localhost src]# tar zxvf httpd-2.4.25.tar.gz [root@localhost src]# cd httpd-2.4.25 [root@localhost httpd-2.4.25]# ./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-charset-lite --enable-cgi [root@localhost httpd-2.4.25]# make && make install [root@localhost httpd-2.4.25]# ln -s /usr/local/httpd/bin/* /usr/local/bin/ [root@localhost httpd-2.4.25]# cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd [root@localhost httpd-2.4.25]# vi

PHP - MySQL access denied error - Works in other programs

那年仲夏 提交于 2019-12-02 03:15:49
Access denied for user 'root '@'localhost' (using password: YES) Yes, this error is all too common, and I have spent much time researching it. However nothing solved the problem. I get this error when attempting the first connect in one of my PHP scripts I'm developing. If it helps to know, I'm running Linux Mint with the LAMP configuration detailed at http://community.linuxmint.com/tutorial/view/486 installed. The thing is, any other application works with connecting. Both logging into PhpMyAdmin as root or mysql client on the console as root work perfectly. The MySQL site itself says that it