Home > Backend Development > PHP Problem > How to install php5.4 with wdcp

How to install php5.4 with wdcp

藏色散人
Release: 2023-03-13 12:28:02
Original
1881 people have browsed it

How to install php5.4 with wdcp: 1. Install wdcp; 2. Install mysql through the "sh mysql_up55.sh" command; 3. Install php5.4 through "sh php_up54.sh".

How to install php5.4 with wdcp

The operating environment of this article: linux5.9.8 system, PHP5.4 version, DELL G3 computer

How to install php5.4 with wdcp ?

WDCP installs and configures php5.4 and mongodb:

Record it so you don’t forget it. All the installation processes have been tested and used by myself without any problems.

Common linux commands

mv 移动文件
mkdir 创建文件夹
rm 删除
cp 复制
netstat 网络状态
tar 解压
wget 下载
rpm 安装内容
config/make/make install 编译安装
Copy after login

If you want to run a command in a certain directory, you need to add ./

wdcp installation

RPM package installation
wget http://down.wdlinux.cn/in/lanmp_wdcp_ins.sh
sh lanmp_wdcp_ins.sh

wdcp upgrade PHP5.4

Download the script and unzip it and upload it to your own installation directory

Download address: http://pan.baidu.com/s/1dD9vXBV

1. Install mysql

sh mysql_up55.sh

2. Install php

sh php_up54.sh

If you need to install other versions, just use this: sh php_up54.sh version number, if the latest version number is 5.5.15, use sh php_up54.sh 5.5.15

3. Install zend guard,

sh Zendguard6 .sh

4. After installing zend, remember to restart the web server

service httpd restart

service nginxd restart

5. When restarting mysql, it prompts that the background cannot be logged in.

Solution: vim /www/wdlinux/init.d/mysqld

basedir=/www/wdlinux/mysql

datadir =/www/wdlinux/mysql/var

Install mongodb driver

Because I am not familiar with linux, I followed the official website tutorial and used pecl install mongo and to Even downloading, decompressing and compiling from github cannot pass.

Later I thought it might be because I upgraded php to 5.4, but the php in centos is not the php version that was upgraded later, so the version of pecl is wrong. This can probably be found in the prompt, because it prompts that for example, phpize has not been updated. Installation and other errors, executing yum install php5-devel prompts that the package cannot be found, but these commands are available in the installation directory, so the solution is very simple and there is no need to go around any detours.

1. Directly execute the pecl command in the php folder

/www/wdlinux/php/bin/pecl install mongo

2. Add ## to php.ini

#extension=mongo.so

Install mongodb (v2.6.x)

1. Download mongodb

curl -O http://downloads.mongodb .org/linux/mongodb-linux-x86_64-2.6.11.tgz

2. Move to the wdlinux directory (the root directory of wdcp)

mv mongodb-linux-x86_64-2.6.11 .tgz /www/wdlinux

3. Unzip

tar -zxvf mongodb-linux-x86_64-2.6.11.tgz

4. Rename to mongodb

mv mongodb-linux-x86_64-2.6.11 mongodb

5. Enter the mongodb folder and create data and log folders. The former stores the database and the latter stores the log

mkdir data

mkdir log

6. Modify the rc.local file and the system will run automatically after restart

vim /etc/rc.local

Add and save

/www/wdlinux/mongodb/bin/mongod --dbpath /www/wdlinux/mongodb/data --logpath /www/wdlinux/mongodb/log/dblog --port 27017 --auth

7. Run mongod

Configure mongodb (written before, repeat)

1. Open mongo.exe with the console

2. Enter use admin       ->This step is to go to the default user management database in order to create a global administrator)

3. Directly use db.addUser("root","12345") ------> ;This is an obsolete command. It generates an administrator with the role of root and full permissions.

4. Re-enter mongo.exe and use mongo.exe -u root -p 12345

--authenticationDatabase admin to start the client ------->Use root Administrator login is required to create an administrator for your collection

5. For example, the name of my lbs database is lbs_people, then enter the following content to create a database called lbs_people. For the administrator of lbsadmin, what needs to be noted here is that the role should be dbOwner, which means that it has read, write and query permissions for the collection. You do not need dbAdmin, which is the maintenance permission

use lbs_peopledb.createUser({    user: "lbsadmin",    pwd: "password",    roles: [ { role: "dbOwner", db: "lbs_people" } ] } )
Copy after login
6. Add index db. lbs_people.ensureIndex({poi:"2d"})

common mongodb commands

show dbs display database

show collections display collection

db.drop () Delete the database

db.createCollection("name") Create an empty collection

Recommended learning: "

PHP Video Tutorial"

The above is the detailed content of How to install php5.4 with wdcp. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template