Home > Article > Backend Development > How to install php5.4 with wdcp
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".
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.
mv 移动文件 mkdir 创建文件夹 rm 删除 cp 复制 netstat 网络状态 tar 解压 wget 下载 rpm 安装内容 config/make/make install 编译安装
If you want to run a command in a certain directory, you need to add ./
RPM package installation
wget http://down.wdlinux.cn/in/lanmp_wdcp_ins.sh
sh lanmp_wdcp_ins.sh
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
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.soInstall mongodb (v2.6.x)1. Download mongodbcurl -O http://downloads.mongodb .org/linux/mongodb-linux-x86_64-2.6.11.tgz2. Move to the wdlinux directory (the root directory of wdcp)mv mongodb-linux-x86_64-2.6.11 .tgz /www/wdlinux3. Unziptar -zxvf mongodb-linux-x86_64-2.6.11.tgz4. Rename to mongodbmv mongodb-linux-x86_64-2.6.11 mongodb5. Enter the mongodb folder and create data and log folders. The former stores the database and the latter stores the logmkdir data mkdir log6. Modify the rc.local file and the system will run automatically after restart vim /etc/rc.localAdd and save
/www/wdlinux/mongodb/bin/mongod --dbpath /www/wdlinux/mongodb/data --logpath /www/wdlinux/mongodb/log/dblog --port 27017 --auth 7. Run mongodConfigure 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" } ] } )6. Add index db. lbs_people.ensureIndex({poi:"2d"})common mongodb commandsshow dbs display databaseshow collections display collectiondb.drop () Delete the databasedb.createCollection("name") Create an empty collectionRecommended 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!