WDCP Installing and configuring php5.4 and MongoDB

Source: Internet
Author: User
Tags install php mongodb driver zend

Keep a record, lest you forget. All of them are self-test-used installation process no problem.

Linux Common Commands

MV Moving files

mkdir Creating a Folder

RM Delete

CP Replication

Netstat network status

Tar decompression

wget download

RPM Installation Content

Config/make/make Install compilation

If you want to run a command in a directory, you need to add it earlier.

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 installation directory: Http://pan.baidu.com/s/1dD9vXBV 1. Install Mysqlsh mysql_up55.sh 2. Install PHPSH php_up54.shIf you need to install another version with this: SH php_up54.sh version number, such as the latest version number is 5.5.15, use sh php_up54.sh 5.5.15 3. Install Zend Guard,SH zendguard6.sh4. Remember to restart the Web server after installing ZendService httpd RestartService Nginxd Restart5. Restart the MySQL prompt, the background can not login. Workaround: Vim/www/wdlinux/init.d/mysqldBasedir=/www/wdlinux/mysqlDatadir=/www/wdlinux/mysql/varInstalling the MongoDB driverBecause Linux is very unfamiliar, follow the official website tutorial with pecl install MONGO and to GitHub download unzip compilation can not pass. Later thought may be because the upgrade PHP to 5.4, but the CentOS PHP is not later upgrade PHP version, so pecl version is not correct, this is probably found in the hint, because prompted such as phpize not installed errors, execute yum install Php5-devel also prompted not to find the package, but in the installation directory there are these commands, so the solution is very simple, there is no need to bend around. 1. Directly execute the pecl command under the PHP folder/www/wdlinux/php/bin/pecl install Mongo2.php.ini add extension=mongo.so installation 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 (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. Renaming to MongoDB

MV mongodb-linux-x86_64-2.6.11 MongoDB

5. Enter the MongoDB folder, create the data and log folder, the former holds the database, the latter holds the log

mkdir data

mkdir Log

6. Modify the Rc.local file, the system restart automatically run

Vim/etc/rc.local

Add to save

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

7. Running Mongod

Configure MongoDB (previously written, repeat)

1. Open Mongo.exe with the console

2. Enter Use admin-----> This step is to go to the default User management database to create a global Administrator)

3. Directly with Db.adduser ("root", "12345")------> This is an obsolete command that generates a role root administrator with full privileges.

4. Re-enter Mongo.exe, use mongo.exe-u root-p 12345 --authenticationdatabase admin to start the client------> Log in with the root administrator, To create an administrator for your collection

5. For example, my LBS database name is called Lbs_people, then enter the following content, create a call Lbsadmin administrator, here should be aware that role should be dbowner, meaning that there is the collection read and Write permission, not dbadmin, That's a maintenance privilege.

Use Lbs_peopleDb.CreateUser({User:"Lbsadmin",Pwd:"Password",Roles:[{role:  "Dbowner" db:  "lbs_people < Span class= "NX" >< Span class= "o" > " } ] 
} ) /span>

6. Add index Db.lbs_people.ensureIndex ({poi: "2d"})

MongoDB Common Commands

Show DBS Display Database

Show Collections Display Set

Db.drop () Deleting a database

Db.createcollection ("name") creates an empty set

Reference URL

Http://www.wdlinux.cn/wdcp/install.html

Https://github.com/mongodb/mongo-php-driver/releases

http://docs.mongodb.org/ecosystem/drivers/php/

Http://www.oicqzone.com/pc/2014090219659.html

Http://www.cnblogs.com/cnsanshao/archive/2012/12/07/2806686.html

Http://www.cnblogs.com/matoo/p/4807782.html

https://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-linux/

http://quanzhong.iteye.com/blog/916237

http://docs.mongodb.org/v2.6/tutorial/add-user-administrator/

WDCP Installing and configuring php5.4 and MongoDB

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.