1, configure the HTTP virtual host, the specific method reference http://blog.51cto.com/papapa213/2107692
The/etc/httpd/conf/conf.d/vhost1.conf file is configured as follows:
<virtualhost 192.168.109.2:80> ServerName www1.ppp213.com directoryindex index.php//default Home DocumentRoot " /myvhost/vhost1/"<directory"/myvhost/vhost1 "> Options none allowoverride none Order Allow,deny allow From all </Directory> <Location/server-status> SetHandler server-status Order Deny,allow deny from All 192.168.109.136 </Location></VirtualHost>
2. Install PHP, Php-mysql, Mysql-server (slightly) using Yum
3. Open Mysqld Service
Service mysqld Start
After that, use the mysql_secure_installation command to safely initialize the MySQL account so that the MySQL server can only allow the root user to log on locally, remove the anonymous user and test database, and then use MySQL again when using MySQL- P command to enter a password.
4. Create a MySQL authorized User:
Mysql-penter password:mysql> Grant Select,insert,update,create on * * to ' ppp213 ' @ ' percent ' identified by ' 123456 ';
5. Edit the default home page of the virtual host
The contents of/myvhost/vhost1/index.php are as follows:
<?php# test whether the virtual host is working # phpinfo (); # Test Database can link $conn = mysql_connect (' 192.168.109.2 ', ' ppp213 ', ' 123456 '); if ($conn) echo "OK"; else echo "fail";? >
At this point in the browser open the home page, the database can be linked when the content is as follows:
6. Download discuz!, WordPress, phpMyAdmin package, you can use the following version:
Link: Https://pan.baidu.com/s/19zTr74hExT-jNel5Fi-DzA Password: U3NZ
7. Installing discuz!
First will discuz_x3.2_sc_gbk.zip decompression, the extracted upload directory into the/myvhost/vhost1 directory, in order to facilitate the operation I renamed it BBS, then access 192.168.109.2/bbs/ Install can see the following interface:
If it is displayed as garbled, you can modify the Adddefaultcharset instruction value in the HTTPD Master profile/etc/httpd/conf/httpd.conf to GB2312.
At this point, select "I Agree", you can see the following interface:
The first time you open it should show that these files have insufficient permissions, you can use the chmod command to change these files to writable, and then re-open.
At this point discuz! installation is complete, you can start to use, you can enter the Management section through 192.168.109.2/bbs/admin.php.
8. Managing the MySQL database with phpMyAdmin
Unzip the phpmyadmin-3.5.4-all-languages.tar.gz and move it to the virtual host directory/myvhost/vhost1, I renamed it to Phpadmin for ease of operation
Visit 192.168.109.2/phpadmin at this time
After that, enter MySQL username and password to manage the MySQL database with visual interface.
9. Using WordPress
Unzip the wordpress-4.2-zh_cn.tar.gz and move it to the virtual host directory/myvhost/vhost1, I rename it to WP for ease of operation.
Visit 192.168.109.2/wp
To create a database wpdb:
Mysql> CREATE database wpdb Charset=utf8;
Copy the above content into the wp-config.php file (manual creation required)
Worepress installation is now successful
instance of lamp--Deploy discuz!, WordPress, and phpMyAdmin in CENTOS6