The first six items in the required software httpdmysqlmysql-serverphpphp-develphp-mysqlphpMyAdmin are available in yum, which are installed by default. PhpMyAdmin provides a link for manual installation. The basic configuration of Apache, etchttpdconfhttpd. conf, is the main configuration file of apache. You can modify the basic parameters.
The first six items in the required software httpd mysql-server php-devel php-mysql phpMyAdmin are available in yum, which are installed by default. PhpMyAdmin provides a link for manual installation. The basic configuration of Apache is/etc/httpd/conf/httpd. conf, which is the main configuration file of apache. Modify the basic parameters.
Required Software
- Httpd
- Mysql
- Mysql-server
- Php
- Php-devel
- Php-mysql
- PhpMyAdmin
In the first 6 items above, yum will be installed by default. PhpMyAdmin provides a link for manual installation.
Basic configuration of Apache
- /Etc/httpd/conf/httpd. conf is the main configuration file of apache. You can modify the basic parameters and the IP address is localhost.
- // Www/html is the default "home page" Directory of CentOS. The data displayed when "http: // localhost" is entered.
- The remaining Apache configurations are not required here, so we will not detail them here.
- Start/etc/init. d/httpd start of Apache, and disable/etc/init. d/httpd stop. Test netstat-tunl | grep ': 80'
Php Testing
You can write a PHP file under/var/www/html/. Here, you can write a test file.
$ Vim/etc/www/html/phpinfo. php
Then input http: // localhost/phpinfo. php In the browser. If the basic information is displayed, it indicates OK.
Start and test Mysql
- Mysql startup:/etc/init. dmysqld start
- Test: netstat-tunl | grep ': 3306'
- Manually connect to mysql: mysql-u root
- Set the root password for Logon: mysqladmin-u root password 'Password'
- Login: mysql-u root-p
- After logging on to mysql, you can use create database wordpress; (Note the plus points) to create a database.
- Show databases; view database
- Exit
Install wordpress
- Decompress woordpress.tar.bz2 to the/var/www/html/directory
- Cp wp-config-sample.php wp-config.php backup Profile
- # Vi wp-config.php # edit the configuration file and enter the database name, user name, and password
// ** MySQL settings-specific information comes from the host you are using **//
/** Replace "putyourdbnamehere" with the WordPress database name "*/
Define ('db _ name', 'wordpress ');
/** Replace "usernamehere" with the MySQL database username "*/
Define ('db _ user', 'root ');
/** Replace "yourpasswordhere" with the MySQL database password "*/
Define ('db _ password', 'Password ');
Install phpmyadmin
- Decompress the phpmyadmin compressed file to/var/www/html/
- Cd/var/www/html/phpmyadmin/ phpMyAdmin-3.4.10.1-all-languages/
# Go To The configuration directory
- Cp config. sample. inc. php config. inc. php # back up the configuration file
- Vi config. inc. php
Modify
// $ Cfg ['servers'] [$ I] ['controluser'] = 'pma ';
// $ Cfg ['servers'] [$ I] ['controlpass'] = 'pmapass ';
Is
$ Cfg ['servers'] [$ I] ['controluser'] = 'root'; # mysql login Username
$ Cfg ['servers'] [$ I] ['controlpass'] = 'Password'; # mysql logon password
- Test: http: // 127.0.0.1/phpMyAdmin/phpMyAdmin-3.4.10.1-all-languages/
- Log on with your account and password, where you can operate your database. For wordpress, we have already created it in the command line.
Then you can configure wordpress.