In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "how to install php5.4 in wdcp". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
How to install php5.4 in wdcp: 1. Install wdcp;2, install mysql;3 through "sh mysql_up55.sh" command, and install php5.4 through "sh php_up54.sh".
This article operating environment: linux5.9.8 system, PHP5.4 version, DELL G3 computer
How does wdcp install php5.4?
WDCP installs and configures php5.4 and mongodb:
Write it down before you forget it. All the installation process that I have tested and used is no problem.
Linux common commands mv mobile files mkdir create folder rm delete cp replication netstat network status tar decompress wget download rpm installation contents config/make/make install compilation installation
If you want to run a command in a directory, it needs to be preceded by. /
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 and unzip the script and upload it to your own installation directory
Download address: http://pan.baidu.com/s/1dD9vXBV
1. Install mysql
Sh mysql_up55.sh
two。 Install php
Sh php_up54.sh
If you need to install other versions, you can 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. Remember to restart the web server after installing zend
Service httpd restart
Service nginxd restart
5. When restarting mysql, you can't log in in the background.
Solution: vim / www/wdlinux/init.d/mysqld
Basedir=/www/wdlinux/mysql
Datadir=/www/wdlinux/mysql/var
Install the mongodb driver
Because I am not familiar with linux, according to the official website tutorial with pecl install mongo and download decompression and compilation to github can not pass.
Later, I think it may be because I upgraded php to 5.4.But the php of centos is not the later upgraded version of php, so the version of pecl is not right, which can probably be found in the hint, such as an error such as phpize is not installed, and the implementation of yum install php5-devel prompts that the package cannot be found, but there are these commands in the installation directory, so the solution is very simple and there is no need to bend around at all.
1. Directly execute the pecl command under the php folder
/ www/wdlinux/php/bin/pecl install mongo
Add to 2.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
two。 Move to the wdlinux directory (the root of wdcp)
Mv mongodb-linux-x86_64-2.6.11.tgz / www/wdlinux
3. Decompression
Tar-zxvf mongodb-linux-x86_64-2.6.11.tgz
4. Renamed to mongodb
Mv mongodb-linux-x86_64-2.6.11 mongodb
5. Go to the mongodb folder and create the data and log folders, the former storing the database and the latter storing the logs
Mkdir data
Mkdir log
6. Modify the rc.local file and restart the system to run automatically
Vim / etc/rc.local
Join 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 (previously written, repeat)
1. Open mongo.exe with the console
two。 Enter use admin-> this step is to go to the default user management database to create a global administrator)
3. Directly use db.addUser ("root", "12345")-> this is an invalid command to generate an administrator with the role of root with full permissions.
4. Re-enter mongo.exe, start the client with mongo.exe-u root-p 12345-- authenticationDatabase admin-> log in with root administrator to create an administrator for your collection
5. For example, if the name of my lbs database is lbs_people, enter the following to create an administrator called lbsadmin. It should be noted that role should be dbOwner, which means you have read and write access to the collection, not dbAdmin, and that is 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"})
Mongodb common commands
Show dbs display database
Show collections display set
Db.drop () delete the database
Db.createCollection ("name") creates an empty set
This is the end of "how wdcp installs php5.4". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.