人力资源【人力资源】redhat搭建PHP运行环境LAMP资料

php环境搭建  时间:2021-02-12  阅读:()

人力资源

REDHATENTERPRISE LINUX搭建PHP运行环境

搭建一个论坛 以discuz为模板 RedHat为系统阿帕奇为web服务器搭建P HP环境后台为MySQL数据库 即时下流行的“LAMP” 。

Discuz_7.2_FULL_SC_UTF8mysql-5.0.22-2.1httpd-2.2.3-6.el 5php-5.1.6-5.el5

1、 P HP的运行是在阿帕奇服务之上的首先要安装httpd服务

[root@localhost~]#clear

[root@localhost~]#rpm-qa|grep httpd

[root@localhost~]#mount/dev/cdrom/mnt/cdrom

[root@localhost~]#yum install -y httpd

重启http d服务测试阿帕奇服务器

阿帕奇测试页

2、安装P HP解释器

人力资源

人力资源

默认安装后再次查询会显示以下组件

[root@localhost~]#rpm-qa|grep phpphp-common-5.1.6-5.el5php-5.1.6-5.el5php-cli-5.1.6-5.el5

[root@localhost~]#

还需要一个rpm包来支持php与MySQL数据库

包名为php-mysql

编辑php配置文件

[root@localhost~]#vi/etc/httpd/conf.d/php.conf

增加拓展名为.php文件的处理关系

测试P HP环境

在Apache主目录/var/www/html中建立一个名为test.php文件文件内容如下

<? phpinfo(); ?>

人力资源

人力资源

重启http d服务测试

3、安装MySQL数据库为安装起见并修改数据库密码为123

[root@localhost~]#yum install–y mysql*

[root@localhost~]#rpm–qa|grep mysql

启动MySQL数据库

[root@localhost~]#service mysqld start

初始化MySQL数据库 Installing all prepared tables

Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.serverto the right place for your system

人力资源

人力资源

PLEASE REMEMBERTO SET A PASSWORD FORTHE MySQL rootUSER!To do so,start the server,then issue the following commands:

/usr/bin/mysqladmin-u root password'new-password'

/usr/bin/mysqladmin-u root-h localhost.localdomain password'new-password'See the manual for more instructions.

You can start the MySQL daemon with:cd/usr;/usr/bin/mysqld_safe&

You can test the MySQL daemon with the benchmarks in the'sql-bench'directory:cd sql-bench;perl run-all-tests

Please report any problems with the/usr/bin/mysqlbug script!

The latest information about MySQL is available on the web athttp://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

[确定]启动MySQL [确定]修改密码

[root@localhost~]#mysqladmin-u root password 123

登陆数据库

查看数据库

4、搭建samba服务将discuz安装程序目录upload放到/var/www/html/下人力资源

人力资源

如果samba配置没错误但是仍然无法将安装文件复制到linux中请将selinux设置为允许 同时在iptables中放行相关端口

修改upload目录中相关目录权限

以下这些目录及文件需要可读写权限

./config.inc.php

./templates

./attac hments

./fo rumdata

./forumdata/cache

./forumdata/template s

./forumdata/threadcaches

./fo rumdata/logs

./uc_client/data/cache/

5、开始安装

在浏览器中输入 http://192.168.2.2/upload/install/

根据提示进行安装

人力资源

人力资源

环境以及文件目录权限检查人力资源

人力资源

填写数据库信息

数据库用户名:默认为username修改为root

数据库密码:123

Admin密码在此设置为admin

其他根据情况填写直至安装完成后跳转到论坛首页人力资源

人力资源

我们再来看一下MySQL数据库

[root@localhost install]#mysql -u root-p

Enter password:

Welcome to the MySQL monitor. Commands end with;or\g.Your MySQLconnection id is 52 to serverversion: 5.0.22

Type'help; 'or'\h' for help.Type'\c'to clear the buffer.mysql>show databases;

+--------------------+

|D atabase |

+--------------------+

| information_schema|

|discuz |

|mysql |

| test |

+--------------------+

4 rows in set(0.00 sec)mysql>use discuz

Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-ADatabase changedmysql>show tables;

人力资源

人力资源

+-------------------------+

|Tables_in_discuz |+-------------------------+

| cdb_access || cdb_activities || cdb_activityapplies || cdb_addons || cdb_adminactions || cdb_admincustom || cdb_admingroups || cdb_adminnotes || cdb_adminsessions || c db_advertisements || cdb_announcements || c db_attachmentfiel ds || c db_attachments || c db_attac hpaymentl o g || c db_attachtypes || cdb_banned || cdb_bbcodes || cdb_caches || cdb_creditslog || cdb_crons || cdb_debateposts || cdb_debates || cdb_failedlogins || c db_faqs || cdb_favoriteforums || cdb_favorites || c db_favoritethreads || cdb_feeds || cdb_forumfields || cdb_forumlinks || cdb_forumrecommend || cdb_forums || cdb_imagetypes || cdb_invites || cdb_itempool || cdb_magiclog || cdb_magicmarket || cdb_magics || cdb_medallog |人力资源

搬瓦工最新套餐KVM,CN2线路

搬瓦工在国内非常流行的主机商,以提供低价的vps著称.不过近几年价格逐渐攀升.不过稳定性和速度一向不错.依然深受国内vps爱好者喜爱.新上线的套餐经常卖到断货.支持支付宝,paypal很方便购买和使用.官网网站:https://www.bandwagonhost.com[不能直接访问,已墙]https://www.bwh88.net[有些地区不能直接访问]https://www.bwh81.net...

tmhhost:暑假快乐,全高端线路,VPS直接8折,200G高防,美国gia日本软银韩国cn2香港cn2大带宽

tmhhost为2021年暑假开启了全场大促销,全部都是高端线路的VPS,速度快有保障。美国洛杉矶CN2 GIA+200G高防、洛杉矶三网CN2 GIA、洛杉矶CERA机房CN2 GIA,日本软银(100M带宽)、香港BGP直连200M带宽、香港三网CN2 GIA、韩国双向CN2。本次活动结束于8月31日。官方网站:https://www.tmhhost.com8折优惠码:TMH-SUMMER日本...

JustHost俄罗斯VPS有HDD、SSD、NVMe SSD,不限流量低至约9.6元/月

justhost怎么样?justhost服务器好不好?JustHost是一家成立于2006年的俄罗斯服务器提供商,支持支付宝付款,服务器价格便宜,200Mbps大带宽不限流量,支持免费更换5次IP,支持控制面板自由切换机房,目前JustHost有俄罗斯6个机房可以自由切换选择,最重要的还是价格真的特别便宜,最低只需要87卢布/月,约8.5元/月起!总体来说,性价比很高,性价比不错,有需要的朋友可以...

php环境搭建为你推荐
网页解密急急急~~谁知道怎么让所有的网页都设密码?以及破解的办法啊? 谢谢了谁帮帮我啊yy频道中心YY频道管理中心怎么登录?湖南商标注册在湖南搞商标注册是代理好还是自己去好一点?湖南商标注册的流程又是什么样的呢?天天酷跑刷积分教程天天酷跑积分怎么获得 天天酷跑刷积分方法eset最新用户名密码ESET4.0最新用户名和密码网站运营我想成为网站运营的人我该学什么??ejb开发EJB是啥玩意了bt封杀BT下载被封锁了,怎么办,下载不了电影了!二层交换机请教:二层交换机是干什么用的啊?云挂机有免费的云挂机软件吗?
hkbn sockscap 华为云主机 合肥鹏博士 徐正曦 isp服务商 paypal注册教程 web服务器搭建 starry qq金券 可外链的相册 域名和主机 免备案jsp空间 建站技术 websitepanel winserver2008r2 cpu使用率过高怎么办 建站行业 cdn免备案空间 卡巴斯基免费版下载 更多