摘要:公鑰登錄開啟防火墻新端口號在這個范圍內即可,如先查看下服務器端口號范圍修改端口重啟阿里云安裝組里面設置入網可訪問端口安裝下載本質上和是一個公司的解壓按順序安裝不需要全部安裝
SSH公鑰登錄
leishendeMBP:www leishen$ ssh-keygen -t rsa leishendeMBP:www leishen$ cat ~/.ssh/id_rsa.pub | ssh root@39.106.74.195 "cat - >> ~/.ssh/authorized_keys"開啟防火墻
[root@lei ~]# ls /etc/sysconfig/iptables* /etc/sysconfig/iptables-config [root@lei ~]# iptables -F [root@lei ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] [root@lei ~]# ls /etc/sysconfig/iptables* /etc/sysconfig/iptables /etc/sysconfig/iptables-config新ssh端口號在這個范圍內即可,如422
[root@lei ~]# sysctl -a|grep ip_local_port_range net.ipv4.ip_local_port_range = 32768 60999
vim /etc/ssh/sshd_config service sshd restart
https://dev.mysql.com/downloa...
centos本質上和red hat是一個公司的
tar -xvf mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar
[root@ lei xx]# rpm -ivh mysql-community-common-5.7.20-1.el6.x86_64.rpm warning: mysql-community-common-5.7.20-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-common ########################################### [100%] [root@ lei xx]# rpm -ivh mysql-community-libs-5.7.20-1.el6.x86_64.rpm warning: mysql-community-libs-5.7.20-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-libs ########################################### [100%] [root@ lei xx]# rpm -ivh mysql-community-client-5.7.20-1.el6.x86_64.rpm warning: mysql-community-client-5.7.20-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-client ########################################### [100%] [root@ lei xx]# rpm -ivh mysql-community-server-5.7.20-1.el6.x86_64.rpm warning: mysql-community-server-5.7.20-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-server ########################################### [100%] [root@ lei xx]# rpm -ivh mysql-community-devel-5.7.20-1.el6.x86_64.rpm warning: mysql-community-devel-5.7.20-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-devel ########################################### [100%]
[root@lei xx]# /usr/bin/mysqld --initialize --user=mysql -bash: /usr/bin/mysqld: No such file or directory [root@lei xx]# service mysqld start Initializing MySQL database: [ OK ] Starting mysqld: [ OK ]
查看安裝日志中分配的密碼
[root@lei xx]# grep "temporary password" /var/log/mysqld.log 2017-11-09T10:59:41.877594Z 1 [Note] A temporary password is generated for root@localhost: fKrsw2Xh [root@lei xx]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 4 Server version: 5.7.20 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type "help;" or "h" for help. Type "c" to clear the current input statement. mysql>
ALTER USER "root"@"localhost" IDENTIFIED BY "1234560";
密碼必須包含大寫字母小寫字母數字和符號,不然會提示:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements(您的密碼不符合當前的安全策略要求)
mysql> ALTER USER "root"@"localhost" IDENTIFIED BY "qvWjYnE8"; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements mysql>
修改成功
mysql> ALTER USER "root"@"localhost" IDENTIFIED BY "L)2X4r4B2iz4"; Query OK, 0 rows affected (0.00 sec)
grant all privileges on . to "用戶名"@"%" identified by "密碼" withg rant option;
mysql -uroot -proot -e "grant all privileges on . to "root"@"%" identified by "1334676" with grant option;"
[root@lei ~]# chkconfig --list | grep mysqld mysqld 0:off 1:off 2:off 3:on 4:on 5:on 6:off [root@lei ~]# chkconfig mysqld on [root@lei ~]# chkconfig --list | grep mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
vim /etc/my.cnf
在[mysqld]下新增一行,添加character-set-server= utf8mb4,保存
show variables like "%character%";
character_set_client utf8 character_set_connection utf8 character_set_database utf8mb4 character_set_filesystem binary character_set_results utf8 character_set_server utf8mb4 character_set_system utf8 character_sets_dir /usr/share/mysql/charsets/Nginx安裝
[root@aider soft]# rpm -ivh http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.10.1-1.el6.ngx.x86_64.rpm Retrieving http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.10.1-1.el6.ngx.x86_64.rpm warning: /var/tmp/rpm-tmp.gnEGo7: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY Preparing... ########################################### [100%] 1:nginx ########################################### [100%] ---------------------------------------------------------------------- Thanks for using nginx! Please find the official documentation for nginx here: * http://nginx.org/en/docs/ Commercial subscriptions for nginx are available on: * http://nginx.com/products/ ----------------------------------------------------------------------
[root@aider soft]# yum -y install nginx Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile .... Updated: nginx.x86_64 0:1.10.2-1.el6 Complete!
[root@aider conf.d]# cd /etc/nginx/ [root@aider nginx]# ls conf.d fastcgi.conf fastcgi_params koi-utf mime.types nginx.conf scgi_params uwsgi_params win-utf default.d fastcgi.conf.default fastcgi_params.default koi-win mime.types.default nginx.conf.default scgi_params.default uwsgi_params.default
[root@aider nginx]# service nginx start Starting nginx: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol) [FAILED [root@aider nginx]# cd conf.d/ [root@aider conf.d]# ls default.conf ssl.conf virtual.conf [root@aider conf.d]# mv default.conf default [root@aider conf.d]# service nginx start Starting nginx: [ OK ] [root@aider conf.d]#
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/39700.html
摘要:一軟件資源配置操作系統使用阿里鏡像下載我們將下載下來的系統安裝在虛擬機中。安裝默認安裝路徑例如配置環境變量編輯文件在最下方增加使配置生效驗證執行命令,看到如圖所示代表安裝成功。 本實戰項目,將會從Linux服務器的搭建開始,直到電商項目的基本功能完成。 一、Linux軟件資源配置 1、操作系統 Linux:centos6.8 64bit 使用阿里鏡像下載:https://mirror...
閱讀 2028·2021-11-08 13:14
閱讀 2935·2021-10-18 13:34
閱讀 2023·2021-09-23 11:21
閱讀 3583·2019-08-30 15:54
閱讀 1752·2019-08-30 15:54
閱讀 2921·2019-08-29 15:33
閱讀 2570·2019-08-29 14:01
閱讀 1941·2019-08-29 13:52