In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The apache, php7, and mysql 5.7 configuration codes for CentOS 7 servers are as follows:
yum upgradeyum install net-tools
install Apache
Close the SELinux editor and open the etc/selinux/config file, find the SELINUX=enforcing field, change it to SELINUX=disabled, and restart the device. yum -y install httpd mod_ssl configure firewall firewall-cmd --permanent --add-port=80/tcpfirewall-cmd --permanent --add-port=443/tcpfirewall-cmd --reload boot startup systemctl start httpdsystemctl enable httpd terminal enter the following command to check httpd operation status sudo systemctl status httpd
Install PHP7
Add Source rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm Install yum install php70w
Install mysql5.7
1. install wget yum -y install wget2. install source wget https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm rpm -ivh mysql57-community-release-el7-8.noarch.rpm3. install mysql yum install mysql server 4. start mysql service systemctl start mysqld5. view MySQL startup status systemctl status mysqld6. boot systemctl enable mysqld systemctl daemon-reload7. modify root local login password find random password generated by mysql grep 'temporary password' /var/log/mysqld.log mysql -u-p modify password, root Note: mysql 5.7 installs the password security check plug-in (validate_password) by default. The default password check policy requires that the password must contain upper and lower case letters, numbers and special symbols, and the length must not be less than 8 digits. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements Error ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4! '; 8. Configure default encoding to utf8 Modify/etc/my.cnf configuration file, add encoding configuration under [mysqld] character_set_server=utf8 init_connect='SET NAMES utf8'9. Configure mysql remote connection mysql -uroot -p use mysql; Grant all on *.* to 'root'@'%' identified by 'root user's password' with grant option;flush privileges; then check which users and hosts can access, % represents any ip address select user,host from user; Firewall Add port 3306 firewall-cmd --zone=public --add-port=3306/tcp --permanentfirewall-cmd --reload 10.mysql Forgot password 1. Modify MySQL configuration file (default is/etc/my.cnf), add a line skip-grant-tables2.service mysqld restart under [mysqld], you can directly use mysql to enter 3.mysql> update mysql.user set authentication_string=password ('123 qwe') where user='root' and Host = ' localhost'; mysql> flush privileges; mysql> quit; restore/etc/my.cnf file, restart mysql: service mysql restart, at this time you can use mysql -u root -p'123qwe' to enter mysql>SET PASSWORD = PASSWORD ('newpasswd '); set a new password
summary
The above is the CentOS7 server apache, php7 and mysql5.7 installation configuration code introduced to you by Xiaobian. I hope it will help you. If you have any questions, please leave me a message. Xiaobian will reply to you in time. Thank you very much for your support!
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.