menu jfatty
search self_improvement
目录
个人使用centos使用习惯
jfatty
jfatty 2022年03月25日  ·  阅读 1,575

1.安装Centos 版本不限(查看CentOS版本方法 lsb_release -a)
2.设置简单容易记住的用户名和密码
3.开机root用户登录
4. 查看防火墙状态

service iptables status 
关闭防火墙 
chkconfig iptanles off 之后 reboot

5.setup 配置ip
6.vi 修改 /etc/sysconfig/network-scripts/ifcfg-eth0 配置文件 ONBOOT=no 修改为 yes
7.重启网卡

service network resatrt

8.yum 安装

wget yum -y install wget

9.wget 安装

vim  wget -qO- https://raw.github.com/ma6174/vim/master/setup.sh | sh -x

10.安装中文支持

yum -y install "@Chinese support"

11.yum 安装

httpd yum -y install httpd

12.添加htttpd 自启

chkconfig --level 2345 httpd on

13.安装java jdk

  	tar -zxvf jdk 包名
  	vim /etc/profile  修改配置文件 添加环境变量
	在文件最后添加
	jdk1.8.0_131
	export JAVA_HOME=/usr/java/jdk1.8.0_131
	export PATH=$JAVA_HOME/bin:$PATH 
	export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
	jdk1.8.0_131改为你安装的jdk的文件夹名称
	重新编译文件:
	source /etc/profile  或者  reboot (需要重启) 

14.安装MySQL

	工具/原料
?	接入Internet的Centos计算机
	安装Mysql
	1.
	Centos 6.6下安装Mysql很简单,
	yum list mysql-server
	2.
	当只有一个时候就可以直接
	yum -y install mysql-server
	进行安装
 设置Mysql的服务
	1.
	先启动Mysql服务
	service mysqld start
	netstat -antp | grep mysqld
	service mysqld stop
	2.
	连接一下试一下,直接
	mysql
	然后
	\q
	关闭连接
	3.
	设置Mysql开机启动
	chkconfig --level 2345 mysqld on
	修改密码并设置远程访问
	1.
	mysql
	连接mysql数据库
	设置密码
	use mysql;
	update user set password=password('l') where user='root';
	update user set password=password('root') where user='root';
	SET PASSWORD = PASSWORD('root');
	SET PASSWORD = PASSWORD('en');
	flush privileges;
	//MYSQL.导入超过100M数据库方法,MYSQL命令行导入大数据库方法
	mysql -uroot -proot db_data_supporter<d:\\data\\Open-Shop.sql
	//Your SQL statement was too large.
	//当查询的结果集超过 max_allowed_packet 也会出现这样的报错。定位方法是打出相关报错的语句。
	//查看文件大小是否超过 max_allowed_packet ,如果超过则需要调整参数,或者优化语句
	show global variables like 'max_allowed_packet';
	set global max_allowed_packet=1024*1024*160;
	show variables like '%log_bin%';
	mysql  查询一个库下的所有表明
	select table_name from information_schema.tables where table_schema='db__20190613'
	Windows下log-bin=mysql-bin
	2.
	设置Mysql远程访问
	step 1: SET PASSWORD = PASSWORD('your new password'); Zea1s0ft.
	step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
	step 3: flush privileges;
	grant all privileges on *.* to 'root'@'%' identified by 'lsl7lo6z7ostobeNO.1' with grant option;
	grant all privileges on *.* to 'root'@'localhost' identified by 'root' with grant option;
	ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
	insert into user(Host,User,Password) values("%","xuxuan",password("xuxuan"));
	grant select on db_bike.* to 'xuxuan'@'%' identified by 'xuxuan';
	grant select on test.* to 'exam'@'%' identified by 'exam';
	GRANT SELECT ON db_lqy.* TO 'lqy'@'%';
	show variables like '%dir%';
	show variables like 'character%';
	show variables like '%connections%';
	flush privileges;
	解决Mysql乱码问题
	1.	找一个配置文件,复制到/etc/目录,命名为my.cnf(有时候没有my.cnf)
	rm -rf /etc/my.cnf
	cp /usr/share/doc/mysql-server-5.1.73/my-medium.cnf /etc/my.cnf
	2.	vim /etc/my.cnf
	在[client]和[mysqld]下面都添加上
	default-character-set=utf8
	3.
	最后按Esc输入
	:wq
	保存退出
	重启mysql服务
	1.
	最后重新启动服务就可以了
	service mysqld restart
	1.添加YUM源
	a.去官网下载对应于操作系统版本的rpm文件:
	wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
	b.安装mysql-community-release-el6-5.noarch.rpm
	yum  -y install mysql-community-release-el6-5.noarch.rpm
15.workbench的安装
	1.先解决依赖包tinyxml的问题(参考Mysql介绍安装workbench的官网http://dev.mysql.com/doc/workbench/en/wb-installing-linux.html)
	wget  http://mirrors.opencas.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
	yum -y install epel-release-6-8.noarch.rpm
	2.下载mysql-workbench-gpl-5.2.47-1el6.i686.rpm包到本地
	wget  http://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-gpl-5.2.47-1el6.i686.rpm
	yum -y install mysql-workbench-gpl-5.2.47-1el6.i686.rpm
16.安装navicat
	安装epel源
        cd /tmp
        wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 
        rpm -ivh epel-release-6-8.noarch.rpm
	安装wine
        yum -y install wine
	将navicat_for_mysql_10.0.11_cn_linux.tar.gz上传到/tmp
        cd /tmp
        tar -zxvf navicat_for_mysql_10.0.11_cn_linux.tar.gz
        cp -r navicat_for_mysql /usr/local
        cd /usr/navicat_for_mysql
        ./start_navicat
        可以在左面上为start_navicat创建快捷方式 
	注册码:NAVH-WK6A-DMVK-DKW3

17.安装Webmin

	 tar -zxvf web*
	 cd  ./setup

18.装MyEclipse
19.装tomcat
19.安装dos2unix

	yum -y install dos2unix

20.安装Rar

	tar -zxvf rarlinux-x64-4.2.0.tar.gz
	cd rar #进入目录安装
	[root@localhost rar]# ls
	acknow.txt   makefile   rarfiles.lst  readme.txt    whatsnew.txt
	default.sfx  order.htm  rar_static    technote.txt
	license.txt  rar        rar.txt       unrar
	[root@localhost rar]# make
	mkdir -p /usr/local/bin
	mkdir -p /usr/local/lib
	cp rar unrar /usr/local/bin
	cp rarfiles.lst /etc
	cp default.sfx /usr/local/lib
	[root@localhost rar]# rar #出现如下信息表示rar已安装成功
	RAR 4.20   Copyright (c) 1993-2012 Alexander Roshal   9 Jun 2012
	Trial version             Type RAR -? for help
	Usage:     rar <command> -<switch 1> -<switch N> <archive> <files...>
		       <@listfiles...> <path_to_extract\>
	<Commands>
	  a             Add files to archive
	  c             Add archive comment
	  cf            Add files comment
	  ch            Change archive parameters
	  cw            Write archive comment to file
	  d             Delete files from archive
	  e             Extract files to current directory
	  f             Freshen files in archive
	  i[par]=<str>  Find string in archives
	  k             Lock archive
	  l[t,b]        List archive [technical, bare]
	  m[f]          Move to archive [files only]
	  p             Print file to stdout
	  r             Repair archive
	  rc            Reconstruct missing volumes
	  rn            Rename archived files
	  rr[N]         Add data recovery record
	  rv[N]         Create recovery volumes
	  s[name|-]     Convert archive to or from SFX
	  t             Test archive files
	  u             Update files in archive
	  v[t,b]        Verbosely list archive [technical,bare]
	  x             Extract files with full path
	<Switches>
	  -             Stop switches scanning
	  @[+]          Disable [enable] file lists
	  ad            Append archive name to destination path
	  ag[format]    Generate archive name using the current date
	  ai            Ignore file attribut

21安装dbeaver

分类: java MySQL Linux
标签: linux mysql ftp java