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

限时新网有提供5+个免费域名

有在六月份的时候也有分享过新网域名注册商发布的域名促销活动(这里)。这不在九月份发布秋季域名促销活动,有提供年付16元的.COM域名,同时还有5个+的特殊后缀的域名是免费的。对于新网服务商是曾经非常老牌的域名注册商,早年也是有在他们家注册域名的。我们可以看到,如果有针对新用户的可以领到16元的.COM域名。包括还有首年免费的.XYZ、.SHOP、Space等等后缀的域名。除了.COM域名之外的其他...

DediPath($1.40),OpenVZ架构 1GB内存

DediPath 商家成立时间也不过三五年,商家提供的云服务器产品有包括KVM和OPENVZ架构的VPS主机。翻看前面的文章有几次提到这个商家其中机房还是比较多的。其实对于OPENVZ架构的VPS主机以前我们是遇到比较多,只不过这几年很多商家都陆续的全部用KVM和XEN架构替代。这次DediPath商家有基于OPENVZ架构提供低价的VPS主机。这次四折的促销活动不包括512MB内存方案。第一、D...

云雀云(larkyun)低至368元/月,广州移动1Gbps带宽VDS(带100G防御),常州联通1Gbps带宽VDS

云雀云(larkyun)当前主要运作国内线路的机器,最大提供1Gbps服务器,有云服务器(VDS)、也有独立服务器,对接国内、国外的效果都是相当靠谱的。此外,还有台湾hinet线路的动态云服务器和静态云服务器。当前,larkyun对广州移动二期正在搞优惠促销!官方网站:https://larkyun.top付款方式:支付宝、微信、USDT广移二期开售8折折扣码:56NZVE0YZN (试用于常州联...

php环境搭建为你推荐
office2016激活密钥如何提取office2016的激活秘钥fontfamilyfont-family:ms shell dlg是什么意思?有趣的广告有趣的广告手游运营手册游戏策划新手应该看那些书籍?手游运营手册新浪无线 这个公司开发手机游戏吗?会声会影12下载谁有免费的会声会影12的素材下载地址给俺发个!要没有毒的,谢谢咧!手机区号有的手机号中间的号码是地区区号,那是什么卡直播加速手机上什么软件可以帮助直播加速,大神们推荐推荐二层交换机集线器和二层交换机,三层交换机的区别如何快速收录如何做到让百度快速收录
主机测评网 godaddy主机 isatap debian7 魔兽世界台湾服务器 华为4核 好看qq空间 cpanel空间 免费活动 可外链相册 tna官网 服务器硬件防火墙 浙江服务器 免费个人网页 免费获得q币 windowsserver2012r2 .htaccess 主机声音大 最好的空间留言 qq空间申请关闭 更多