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

Hostodo独立日提供四款特价年付VPS套餐 最低年付$13.99

前天,还有在"Hostodo商家提供两款大流量美国VPS主机 可选拉斯维加斯和迈阿密"文章中提到有提供两款流量较大的套餐,这里今天看到有发布四款庆祝独立日的七月份的活动,最低年付VPS主机13.99美元,如果有需要年付便宜VPS主机的可以选择商家。目前,Hostodo机房可选拉斯维加斯和迈阿密两个数据中心,且都是基于KVM虚拟+NVMe整列,年付送DirectAdmin授权,需要发工单申请。(如何...

CheapWindowsVPS$4.5/月,美国VPS/免费Windows系统/1Gbps不限流量/,可选美洲、欧洲、亚洲等8大机房

国外商家提供Windows系统的并不常见,CheapWindowsVPS 此次提供的 2 款 VPS 促销套餐,提供 5 折永久优惠码,优惠后月付 4.5 美元起,价格还是挺诱人的,VPS 不限流量,接入 1Gbps 带宽,8 个机房皆可选,其中洛杉矶机房还提供亚洲优化网络供选择,操作系统有 Windows 10 专业版、2012 R2、2016、Linux等。Cheap Windows VPS是...

piayun(pia云)240元/季起云服务器,香港限时季付活动,cn2线路,4核4G15M

pia云怎么样?pia云是一家2018的开办的国人商家,原名叫哔哔云,目前整合到了魔方云平台上,商家主要销售VPS服务,采用KVM虚拟架构 ,机房有美国洛杉矶、中国香港和深圳地区,洛杉矶为crea机房,三网回程CN2 GIA,带20G防御。目前,Pia云优惠促销,年付全场8折起,香港超极速CN2季付活动,4核4G15M云服务器仅240元/季起,香港CN2、美国三网CN2深圳BGP优质云服务器超高性...

php环境搭建为你推荐
百度沸点颁奖典礼百度沸点2010年颁奖典礼什么时候举行天天酷跑刷积分教程最近一直有人说天天酷跑刷积分,怎么刷的。二叉树遍历二叉树三种遍历方式原则?网站运营刚创业的网站运营怎么做?ps抠图技巧ps中怎么抠图?镜像文件是什么什么是镜像文件啊办公协同软件oa办公系统软件有哪些直播加速请问哪种播放器的可以播放加速,并且可以保存xv播放器下载迅雷看看下载的XV格式的电影用什么播放器可以播放?(没有互联网的情况下)怎么点亮qq空间图标QQ空间图标怎么点亮?
域名买卖 广州服务器租用 wordpress主机 域名商 hkbn 私服服务器 wdcp gitcafe 服务器日志分析 服务器怎么绑定域名 亚洲小于500m 三拼域名 云全民 速度云 搜索引擎提交入口 web服务器安全 多线空间 腾讯总部在哪 空间租赁 789 更多