Contos Configuration Php-mysql-apache-nginx

Source: Internet
Author: User

Apahce

./configure--prefix=/usr/local/apache--enable-module=most--enable-shared=max
Make

Su Root

Make install

Run Apahce
/usr/local/apache/bin/apachectl start

Stop Apache
#/usr/local/apache/bin/apachectl stop

Open your browser
Firefox

Restarting the firewall
Firewall-cmd--reload


Kill ID Process
Kill-9 Process ID

>>> shut down the firewall
Systemctl Stop Firewalld.service #停止firewall
Systemctl Disable Firewalld.service #禁止firewall开机启动
>>> Open Port
Firewall-cmd--zone=public--add-port=80/tcp--permanent

Firewall-cmd--reload
----------------------
Installing Apache
Yum Install httpd
--------------------------
Kill-9 closed ID
-----------------------
Restart Apahce
Systemctl Restart Httpd.service
--------------------------
Stop Apache
Systemctl Stop Httpd.service
---------------------
Launch Apache
Systemctl Start Httpd.service


View PHP Version
Php-v

Installing the php7.0.23 version
Http://jingyan.baidu.com/article/7f41ecec2d3c04593d095c24.html

Configure php7.0.23
http://blog.csdn.net/leedaning/article/details/45314109
----------------------------------------------------
Contos install MySQL above
Reference URL: http://www.linuxidc.com/Linux/2016-09/135288.htm
# download MySQL Source installation package
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# install MySQL source
shell> Yum Localinstall mysql57-community-release-el7-8.noarch.rpm

Check that the MySQL source is installed successfully
shell> Yum Repolist enabled | grep "Mysql.*-community.*"
Installing mysql:shell> Yum Install Mysql-community-server
Start mysql:shell> systemctl start mysqld
4. Boot start
Shell> Systemctl Enable mysqld
Shell> Systemctl Daemon-reload


How to delete a Yum-style installation of MySQL

1. Yum remove MySQL mysql-server mysql-libs compat-mysql51

2, Rm-rf/var/lib/mysql
3, RM/ETC/MY.CNF


MySQL Modify the default password setting length
Access to Mysql:set global validate_password_policy=0;


Change the password for MySQL
Mysql_secure_installation
----------------------------
Start MySQL
Systemctl Start mysqld
--------------------------------------
Open MySQL
Mysql-uroot-p

Turn off MySQL password policy
If you do not require a password policy, add the following configuration to disable the My.cnf file:
Validate_password = Off

Restarting the MySQL service causes the configuration to take effect:
Systemctl Restart Mysqld

Turn on the firewall
Firewall-cmd--zone=public--add-port=3306/tcp--permanent

Restarting the firewall
Firewall-cmd--reload
-----------------------------------------------------
SSH installation Related

To see if SSH is installed: Rpm-qa | grep ssh
Online installation Ssh:yum Install Openssh-server
Start Ssh:ssh 192.168.87.131
------------------------------------------------------
MySQL create user can only access specific database: Grant all privileges on pg37.* to [email protected] ' 192.168.87.1 ' identified by ' 123456 ';

Create a Pg37 database and be the UTF8 character set: Create Database Pg37 character set UTF8 collate utf8_bin;
Set up a firewall: firewall-cmd--zone=public--add-port=3306/tcp--permanent

Restart Firewall: Firewall-cmd--reload

Ssh

Start Ssh:ssh 192.168.87.131


Querying installed program services: Rpm-qa|grep MySQL
------------------------------------------------
Install Nginx:

(1) Install Nginx using Yum to include Nginx Library, install Nginx Library

RPM-UVH http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
(2) Install nginx using the following command
Yum Install Nginx
(3) Start Nginx
Service Nginx Start
Or
Systemctl Start Nginx.service


Query IP Address:
Ifconfig-a

Uninstalling Mysql-php-apache
Query Installed services: RPM-QA | grep php
To remove an installed service: Yum Remove file name
With Rpm-qa | grep PHP looks at all the dependencies, and then uses the command rpm-e the package name to delete them one by one. When you delete, you will be prompted with a dependency, prompting that package to be the first.

The ultimate way to leak: Httpd-v and which httpd


To delete a folder with files: rm-rf/var/log/httpd

Project directory: var/www

Contos Configuration Php-mysql-apache-nginx

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.