今天重庆云诚科技就给我们广大朋友来聊聊网页环境搭建,以下3个关于LAMP环境搭建的观点希望能帮助到您找到想要的答案。
如何搭建LAMP环境
本文贡献者:【。冷情】, 疑问关键字:网页环境搭建, 下面就让重庆云诚科技小编为你解答,希望本文能找到您要的答案!
首先为了搭建一个稳定的lamp的练习环境,确保你的虚拟机可以连网,这里我们使用的yum安装,它可以帮助我们解决软件自己的依赖关系.我还在后面加了postgresql数据库如果不需要的话可以去掉和postgresql的参数.命令如下
yum -y install httpd mysql mysql-server php php-mysql postgresql postgresql-server php-postgresql php-pgsql php-devel
2
yum安装过程,大概1-2分钟
3
启动apache服务并查看时候启动成功
命令如下:(切记用root用户启动服务)
启动:/etc/rc.d/init.d/httpd start
检测启动结果:ps aux | grep httpd
4
查看服务器的ip并进入网站根目录新建一个phpinfo.php的程序,用于查看php相关配置信息。
5
如果上述进展顺利,那我们接下来进行mysql数据库的配置
命令如下:
启动: /etc/rc.d/init.d/mysqld start
检查启动结果: netstat -tulnp | grep :3306
修改root密码: mysqladmin -u root password ‘你想设置的密码’
6
进入mysql数据库,创建demo库和用于测试的person表,并插入测试数据
7
最后编写php连接mysql的测试代码,检测mysql是否能正常配合php工作
END
以上就是重庆云诚科技小编解答(。冷情)回答关于“如何搭建LAMP环境”的答案,接下来继续为你详解体育用户(渡劫少女)分析“怎么搭建lamp wordpress”的一些相关解答,希望能解决你的问题!

怎么搭建lamp wordpress
本文贡献者:【渡劫少女】, 疑问关键字:网页环境搭建, 下面就让重庆云诚科技小编为你解答,希望本文能找到您要的答案!
最佳回答安装程序支持的环境是支持一款开源的程序,能够是否顺利运行的前提。如果你的环境不支持lamp,那么就以为着你的环境不支持运行php环境。
既然我们已经安装好了lamp,那么接下来就是在安装wordpress的时候的必要配置了。在lamp环境配置好了之后,我们的默认网站目录在var/www/html环境下,大家需要被wordpress安装到这个目录下面,才能保证wordpress生效。
首先,让我们切换用户目录到var/www/html,使用cd命令,紧接着就是下载wordpress安装包到这个目录下使用
以上就是重庆云诚科技小编解答(渡劫少女)分析关于“怎么搭建lamp wordpress”的答案,接下来继续为你详解体育用户(满思美)分析“如何在windows上搭建LAMP环境”的一些相关解答,希望能解决你的问题!
如何在windows上搭建LAMP环境
本文贡献者:【满思美】, 疑问关键字:网页环境搭建, 下面就让重庆云诚科技小编为你解答,希望本文能找到您要的答案!
最佳回答++++++++++++++++++++++++++++++++++++++++++++++
Windows下LAMP环境搭建
++++++++++++++++++++++++++++++++++++++++++++++
操作系统: [windows xp professional sp3]
服务器: [apache-2.2.8]
PHP: [php-5.2.17]
数据库: [mysql-5.1.49]
数据库管理工具: [phpmyadmin-3.3]
++++++++++++++++++++++++++++++++++++++++++++++
准备安装软件(download)
1> [apache_2.2.8-win32-x86-openssl-0.9.8g]
2> [php-5.2.17-Win32-VC6-x86]
3> [mysql-5.1.49]
(需注册)
4> [phpMyAdmin-3.3.9-all-languages]
++++++++++++++++++++++++++++++++++++++++++++++
开始安装(安装前建立目录[D:/lamp])
D:/lamp
--apache2.2
--php
--mysql
--sites
----------------------------------------------------------------------------
1> 【apache】
----------------------------------------------------------------------------
1.1> Welcome to the Installation Wizard for Apache HTTP Server 2.2.8
#单击[Next>]
1.2> License Agreement
#选择(I accept the terms in the license agreement)->单击[Next>]
1.3> Read This First
#单击[Next>]
1.4> Server Information
Network Domain(e.g.somenet.com): [helloworld.com]
Server Name(e.g.): []
Administrator's Email Address(e.g.webmaster@somenet.com): [helloworld@helloworld.com]
#选择(for All Users, on Port 80, as a Service -- Recommended.), 单击[Next>]
1.5> Setup Type
#选择(Custom), 单击[Next>]
1.5> Custom Setup
单击[Change.],
1.5.1> Change Current Destination Folder
Folder name: [D:/lamp/apache2.2/], 单击[OK],
1.6> Ready to Install the Program
#单击[Install]
1.7> Installaction Wizard Completed
#单击[Finish]
----------------------------------------------------------------------------
2> 【php】
2.1> 将php-5.2.17-Win32-VC6-x86.zip解压到[D:/lamp/php]
----------------------------------------------------------------------------
3> 【mysql】
3.1> Welcome o the Setup Wizard for MySQL Server 5.1
#单击[Next>]
3.2> Setup Type
#选择Custom, 单击[Next>]
3.3> Custom Setup
3.3.1> 单击[Change.],
3.3.2> Change Current Destination Folder
Folder name: [D:/lamp/mysql/]
单击[OK]
#单击[Next>]
3.4> Ready to Install the Program
#单击[Install]
3.5> A MySQL Enterprise subscription is the most.
#单击[Next>]
3.6> The MySQL Enterprise Monitor Service
#单击[Next>]
3.7> Wizard Completed
#勾选[Configure the MySQL Server now]
#单击[Finish]
3.8> Welcome to the MySQL Service Instance Configuration Wizard 1.0.17.0
#单击[Next>]
3.9> MySQL服务器实例配置[MySQL Server Instance Configuration]
Detailed Configuration-详细配置
Standard Configuration-标准配置
#选择默认[Detailed Configuration]
#单击[Next>]
3.9.1> 服务器类型[Please select a server type. This will influence memory, disk and CPU usage.]
[Developer Machine]-开发服务器, 占用内存较少
[Server Machine]-多个服务器共用, 占用内存中等
[Dedicated MySQL Server Machine]-专用服务器, 占用内存较多
#选择默认[Developer Machine]
#单击[Next>]
3.9.2> 数据库用途[Please select the database usage]
[Multifunctional Database]-多功能数据库,优化InnoDB,MyISAM
[Transactional Database Only]-事务数据库,优化InnoDB,MyISAM也可用
[Non-Transactional database Only]-非事务性数据库,适用于简单的网络监控或记录的应用发有分析仅非事务的MyISAM引擎
#选择默认[Multifunctional Database]
#单击[Next>]
3.9.3> InnoDB的数据文件的存放位置[Please select the driver for the InnoDB datafile, if you do not want to use the default settings]s
#选择默认
#单击[Next>]
3.9.4> 设置并发连接到服务器的大致数量[Please set the approximate number of concurrent connections to the server]
[Decision Support(DSS)/OLAP]-并发数20
[Online Transaction Processing(OLTP)]-并发数500
[Manual Setting]-并发数自定义
#选择[Manual Setting], Concurrent connections[100]
#单击[Next>]
3.9.5> [网络选项]Please set the networking options
[Enable TCP/IP Networking]-启用TCP/IP网络
[PortNumber:[3306]]-端口
[Add firewall exception for this port]-添加到防火墙例外
[Enable Strict Mode]-启用严格模式
#选择默认[Next>]
3.9.6> [选择字符集]Please select the default character set.
[Standard Character set]-默认Latine 适用于英文或其它西欧语言
[Best Support For Multilingualism]-支持多种语言
[Manual Selected Default Character Set/Collation]-自定义
#选择[Best Support For Multilinguatilsm]
#单击[Next>]
3.9.7> 设置Windows选项[Please set the Windows options]
[Install As Windows Service[安装为windows服务]
[Launch the MySQL Server automatically[自启动]
[Include Bin Directory in Windows PATH[加入环境变量]
#选择默认
#单击[Next>]
3.9.8> 设置安全选项[Please set the security options]
[Current root password]-旧密码,留空
[New root password]-新密码,
[Confirm]-确认新密码
[Enable root access from remote machines]-启用root帐号远程访问
[Create An Anonymous Account]-创建匿名帐号
#输入密码和确认密码, 其它默认
#单击[Next>]
3.9.9> 准备执行[Ready to execute.]
#单击[Execute]
3.9.10> Processing configureation.
#单击[Finish]
----------------------------------------------------------------------------
4> 【phpMyAdmin】
4.1> 将phpMyAdmin-3.3.9-all-languages.zip解压到[D:/lamp/sites/phpmyadmin/]
----------------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++
【apache配置】
5.1> httpd.conf(D:/lamp/apache2.2/conf)
5.1.1> #功能: 加载php模块
#说明: 搜索LoadModule, 在其后面添加
LoadModule php5_module "D:/lamp/php/php5apache2_2.dll"
5.1.2> #功能: 设置工作目录
#说明: 搜索DocumentRoot, 修改为
DocumentRoot "D:/lamp/sites"
5.1.3> #功能: 设置目录选项
#说明: 搜索<Directory "D:/lamp/apache2.2/htdocs">, 修改为
<Directory "D:/lamp/sites">
5.1.4> #功能: 设置默认文档
#说明: 搜索<Directory />, 添加
DirectoryIndex index.php index.html
5.1.5> #功能: 增加php类型
#说明: 在文件末尾加入
AddType application/x-httpd-php .html .php
#功能: php.ini所在目录
#说明: 在文件末尾加入
PHPIniDir "D:/lamp/php"
功能: 不允许访问目录
说明: 搜索Options Indexes FollowSymLinks项,并注释
#Options Indexes FollowSymLinks
5.2> 注意: 修改配置文件后, 重启apache才能生效
5.3> 在D:/lamp/sites/建立文件
#phpinfo.php
输入内容:
<php
phpinfo();
>
访问:
【php配置】
6.1> php.ini
6.1.1> D:/lamp/php/php.ini, 复制php.ini-recommended并重命名为php.ini
6.1.2> #功能: 指定扩展库所在目录
extension_dir = "D:/lamp/php/ext/"
#功能: 开启扩展
#说明: 根据需要开启相应扩展模块, 去掉前面的分号
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
extension=php_mysql.dll
extension=php_mysqli.dll
#功能: 设置时区
#说明: PRC表示中国
date.timezone = PRC
#功能: 显示错误信息
display_errors = On
6.2> 复制libmysql.dll, libmcrypt.dll(D:/lamp/php)到C:/WINDOWS/system32/
6.3> 重启apache,访问,查看相应扩展是否加载成功
++++++++++++++++++++++++++++++++++++++++++++++
今天有关内容《「网页环境搭建」LAMP环境搭建》先分享到这里了,如果想要了解更多,请关注www.cqycseo.com,您的关注是给小编最大的鼓励。
推荐文章:
本文由网上采集发布,不代表我们立场,转载联系作者并注明出处:https://www.cqycseo.com/zixun/3194.html
