Centos7 installation Typecho detailed tutorial

Centos7 installation Typecho detailed tutorial

 

Set up a LAMPH environment

L linux server (CentOS or ubunt), A Apache, M mysql, P PHP

Installation Apache, PHP, Mysql, Mysql database connection packet:

  • yum -y install httpd php-mysql php php-fpm mysql mysql-server

In addition to all other mysql-server installation is successful, the following error message:

  • 错误:No package mysql-server available.
  • Package php-mysql-5.4.16-36.el7_1.x86_64 already installed and latest version
  • Nothing to do

Find The reason is because CentOS 7 version of the MySQL database software is removed from the default list of drivers with mariadb instead of the solution:

  • wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
  • rpm -ivh mysql-community-release-el7-5.noarch.rpm
  • yum install mysql-community-server

Is then determined, the transport can enter y

  • Isthis ok[y/d/N]:y

Next input wait for the download, you need to press Enter to confirm y

success!

Next, installation of common extended package

Installing Apache Expansion Pack

  • yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

Installing PHP extensions package

  • yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel

Mysql install the expansion pack

  • yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

Configuring Apache, mysql boot

  • chkconfig httpd on
  • chkconfig mysqld on

No error, success

Restart Apache, mysql service (pay attention here and centos6 are different, the way 6 7 can not be used)

  • service mysqld restart
  • service php-fpm start
  • service httpd restart

Open mysql

Initial installation is no password mysql

  • mysql–u root

 

  • show databases; # Note the semicolon

 

Reset password

  • set password for 'root' @ 'localhost' = password ( 'password you want to set');

Environmental Inspection

  • netstat –tunlp

Below, php listening port 9000, apache listening port 80, mysql listening port 3306

Whether php test environment successfully

Into the apache web root directory: / var / www / html in to write a simple php page

  • cd / var / www / html
  • vim phpinfo.php

After the control mode into the keyboard to enter a letter edit mode, the following code is input to the file

  • <?php
  • phpinfo();
  • ?>

Press esc to exit edit mode and return to the control mode, enter: wq and press enter, enter the IP address of the server + php file name, for example in the browser: 192.168.1.1/phpinfo.php


Next, typecho program to extract the upload / var / www / html directory
to access your website (domain name or IP), according to the guidelines begin, complete the installation of
attention and he must create a new database, if not create the database will be prompted to read and write errors
Enter an image description

Guess you like

Origin www.cnblogs.com/ayongsec/p/11067995.html