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

3元/首月香港便宜vps究竟是什么货。

便宜的香港vps多少钱?现在国外VPS主机的价格已经很便宜了,美国VPS主机最低一个月只要十几元,但同样免备案的香港VPS价格贵不贵呢?或者说便宜的香港VPS多少钱?香港vps主机价格要比美国机房的贵一些,但比国内的又便宜不少,所以目前情况是同等配置下,美国VPS比香港的便宜,香港VPS比国内(指大陆地区)的便宜。目前,最便宜香港vps低至3元/首月、18元/月起,今天云服务器网(www.yunt...

随风云25元/月 ,德阳高防云服务器 2核2G 10M 75元/月 内蒙古三线BGP服务器 2核2G 5M

公司介绍成都随风云科技有限公司成立于2021年,是国内领先的互联网业务平台服务提供商。公司专注为用户提供低价高性能云计算产品,致力于云计算应用的易用性开发,并引导云计算在国内普及。目前公司研发以及运营云服务基础设施服务平台(IaaS),面向全球客户提供基于云计算的IT解决方案与客户服务,拥有丰富的国内BGP、双线高防、香港等优质的IDC资源。公司一直秉承”以人为本、客户为尊、永续创新&...

亚洲云Asiayu,成都云服务器 4核4G 30M 120元一月

点击进入亚云官方网站(www.asiayun.com)公司名:上海玥悠悠云计算有限公司成都铂金宿主机IO测试图亚洲云Asiayun怎么样?亚洲云Asiayun好不好?亚云由亚云团队运营,拥有ICP/ISP/IDC/CDN等资质,亚云团队成立于2018年,经过多次品牌升级。主要销售主VPS服务器,提供云服务器和物理服务器,机房有成都、美国CERA、中国香港安畅和电信,香港提供CN2 GIA线路,CE...

php环境搭建为你推荐
解压程序什么解压软件最好,速度最快最稳定无线路由器限速设置无线路由器速度如何设置?ghostxp3ghost xp sp3 和 windows xp3有啥区别伪静态什么是伪静态显卡温度多少正常电脑显卡温度多少正常?ios7固件下载iphone自动下载IOS7固件版本怎么删除xv播放器下载xv播放器怎么下载?商标注册查询官网如何在网上查询商标是否注册?qq等级表QQ级别列表怎么在图片上写文字如何在图片上写字?
德国vps 中文域名申请 ddos singlehop win8.1企业版升级win10 南昌服务器托管 最好的空间 建立邮箱 双十一秒杀 腾讯实名认证中心 昆明蜗牛家 100mbps 双12 云营销系统 smtp服务器地址 游戏服务器出租 攻击服务器 沈阳idc globalsign cloudflare 更多