CentOS(一) 最小化安装

/etc/sysconfig/selinux 关闭selinux

/etc/sysconfig/network-scripts/网卡   设置onboot=yes

service network restart 重启网络服务

默认安装了ssh,如果没安装可以安装openssh。进行远程客户端操作

安装vim,默认自带vi

 

常用命令

shutdown -h now 马上关机

shutdown -r now 马上重启

reboot 重启

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

 

posted on 2017-02-05 23:16  阿哲Style  阅读(197)  评论(0编辑  收藏  举报

导航