CentOS(一) 最小化安裝

/etc/sysconfig/selinux 關閉selinuxhtml

/etc/sysconfig/network-scripts/網卡   設置onboot=yesjava

service network restart 重啓網絡服務node

默認安裝了ssh,若是沒安裝能夠安裝openssh。進行遠程客戶端操做mysql

安裝vim,默認自帶vilinux

 

經常使用命令sql

shutdown -h now 立刻關機shell

shutdown -r now 立刻重啓vim

reboot 重啓cookie

logout 註銷網絡

cd 切換目錄

ls 顯示目錄文件和文件夾信息 (顏色能夠修改)

白色:表示普通文件
藍色:表示目錄
綠色:表示可執行文件
紅色:表示壓縮文件
淺藍色:連接文件
紅色閃爍:表示連接的文件有問題
黃色:表示設備文件
灰色:表示其餘文件

dir 同上,沒有顏色

pwd顯示當前工做目錄

useradd 用戶名     建立用戶
passwd  用戶名     給用戶名設計密碼(要想此用戶使用ssh登陸,必須執行)

userdel  用戶名     刪除用戶

userdel -r 用戶名   刪除用戶並刪除家目錄

init

  0 關機

  1 單用戶

  2 多用戶無網絡

  3 多用戶有網絡(默認)

  4 系統未使用保留給用戶(空位)

  5 圖形化界面

  6 系統重啓

  id:6:initdefault

  CentOS7切換運行級別

  ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
  ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
  
  修改爲錯誤的能夠啓動時按下e。修改最後rhgb爲single單用戶模式。進入系統,修改配置信息

  下載JDK

  wget --no-cookies --header="Cookie:oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.rpm

  卸載maria
rpm -qa | grep maria
rpm -e --nodeps mariadb-libs-5.5.52-1.el7.x86_64

  安裝JDK
rpm -ivh jdk-8u121-linux-x64.rpm


下載MySql
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar

Package Name

  Summary
mysql-community-server Database server and related tools
mysql-community-client MySQL client applications and tools
mysql-community-common Common files for server and client libraries
mysql-community-devel Development header files and libraries for MySQL database client applications
mysql-community-libs Shared libraries for MySQL database client applications
mysql-community-libs-compat Shared compatibility libraries for previous MySQL installations
mysql-community-embedded MySQL embedded library
mysql-community-embedded-devel Development header files and libraries for MySQL as an embeddable library
mysql-community-test Test suite for the MySQL server

In most cases, you need to install the mysql-community-server, mysql-community-client, mysql-community-libs, mysql-community-common, and mysql-community-libs-compat packages to get a functional, standard MySQL installation. To perform such a standard, minimal installation, go to the folder that contains all those packages (and, preferably, no other RPM packages with similar names), and issue the following command for platforms other than Red Hat Enterprise Linux/Oracle Linux/CentOS 5:

shell> sudo yum install mysql-community-{server,client,common,libs}-* 

For Red Hat Enterprise Linux/Oracle Linux/CentOS 5 systems, there is an extra package (mysql-version-el5-arch.rpm) to be installed; use the following command:

shell> 
sudo yum install mysql-community-{server,client,common,libs}-* mysql-5.*
Files or Resources
  Location
Client programs and scripts /usr/bin
mysqld server /usr/sbin
Configuration file /etc/my.cnf
Data directory /var/lib/mysql
Error log file

For RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.log

For SLES: /var/log/mysql/mysqld.log

Value of secure_file_priv /var/lib/mysql-files
System V init script

For RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld

For SLES: /etc/init.d/mysql

Systemd service

For RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld

For SLES: mysql

Pid file /var/run/mysql/mysqld.pid
Socket /var/lib/mysql/mysql.sock
Keyring directory /var/lib/mysql-keyring
Unix manual pages /usr/share/man
Include (header) files /usr/include/mysql
Libraries /usr/lib/mysql
Miscellaneous support files (for example, error messages, and character set files) /usr/share/mysql
https://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html
相關文章
相關標籤/搜索