人力资源【人力资源】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 |人力资源

蓝竹云挂机宝25元/年,美国西雅图 1核1G 100M 20元

蓝竹云怎么样 蓝竹云好不好蓝竹云是新商家这次给我们带来的 挂机宝25元/年 美国西雅图云服务器 下面是套餐和评测,废话不说直接开干~~蓝竹云官网链接点击打开官网江西上饶挂机宝宿主机配置 2*E5 2696V2 384G 8*1500G SAS RAID10阵列支持Windows sever 2008,Windows sever 2012,Centos 7.6,Debian 10.3,Ubuntu1...

hostkey荷兰/俄罗斯机房,GPU服务器

hostkey应该不用说大家都是比较熟悉的荷兰服务器品牌商家,主打荷兰、俄罗斯机房的独立服务器,包括常规服务器、AMD和Intel I9高频服务器、GPU服务器、高防服务器;当然,美国服务器也有,在纽约机房!官方网站:https://hostkey.com/gpu-dedicated-servers/比特币、信用卡、PayPal、支付宝、webmoney都可以付款!CPU类型AMD Ryzen9 ...

Vultr VPS新增第18个数据中心 瑞典斯德哥尔摩欧洲VPS主机机房

前几天还在和做外贸业务的网友聊着有哪些欧洲机房的云服务器、VPS商家值得选择的。其中介绍他选择的还是我们熟悉的Vultr VPS服务商,拥有比较多达到17个数据中心,这不今天在登录VULTR商家的时候看到消息又新增一个新的机房。这算是第18个数据中心,也是欧洲VPS主机,地区是瑞典斯德哥尔摩。如果我们有需要欧洲机房的朋友现在就可以看到开通的机房中有可以选择瑞典机房。目前欧洲已经有五个机房可以选择,...

php环境搭建为你推荐
qq讨论组如何在手机qq上创建讨论组?赛我网怎么激活赛我网如何免费开通黄钻如何免费开通黄钻??深圳公交车路线深圳公交车路线eset最新用户名密码ESET4.0最新用户名和密码ghostxp3目前最好的ghost xp3是什么?自助建站自助建站哪个平台最好?arm开发板arm开发板是干什么用的,是用在什么领域方面的办公协同软件免费的多人协同办公软件哪些,我了解的有钉钉、企业微信,其他的还有么?开机滚动条开机滚动条要很长时间怎么解决?
域名转让 重庆vps租用 轻量 镇江联通宽带 促正网秒杀 699美元 metalink 如何注册阿里云邮箱 支持外链的相册 电信托管 实惠 hosting24 windowssever2008 空间排行榜 建站论坛 ping值 免费服务器 iptables linuxvi命令 监控主机 更多