CentosX下安装桌面环境,flash,mysql等
1、Centos 6 安装桌面环境
一、首先查看系统的运行级别以及是否安装了桌面环境
1、使用命令 runlevel 查看当前的运行级别
2、使用命令 yum grouplist | more 查看是否安装了桌面环境的组件。
二、再次从上面分析的结果看到,当前运行级别是3,而且也没有安装桌面环境的软件。
然后我们使用命令查看一下桌面有哪些桌面环境的软件,然后装显示出来的软件组件就可以了。例如:
[root@localhost ~]#[root@localhost ~]# yum grouplist | more
Loaded plugins: fastestmirrorSetting up Group ProcessLoading mirror speeds from cached hostfile
* base: mirrors.usc.edu * extras: centos.mirror.ndchost *
updates: mirror-centos.hostingswift
Installed Groups: E-mail server Security Tools Storage
Availability Tools iSCSI Storage Client
Available Groups:
Additional Development
Backup Client Backup Server
base CIFS file server
Client management tools
Compatibility libraries
Console internet tools
Debugging Tools
Desktop
Desktop Debugging and Performance Tools
Desktop Platform
Desktop Platform Development
Development tools
Dial-up Networking Support
Directory Client
Directory Server
Eclipse
Emacs
FCoE Storage Client
FTP server
Fonts
General Purpose Desktop
Graphical Administration Tools
Graphics Creation Tools
Hardware monitoring utilities
High Availability
High Availability Management
Identity Management Server
Infiniband Support
Input Methods
Internet Applications
Internet Browser
Java Platform
KDE Desktop
Large Systems Performance
Legacy UNIX compatibility
Legacy X Window System compatibility
Load Balancer
Mainframe Access
Messaging Client Support
MySQL Database client
MySQL Database server
NFS file server
Network Infrastructure Server
Network Storage Server
Network file system client
Networking Tools
Office Suite and Productivity
PHP Support
Performance Tools
Perl Support PostgreSQL
Database client
PostgreSQL Database server
Print Server
Printing client
Remote Desktop Clients
Resilient Storage
Ruby Support
SNMP Support
Scientific support
Server Platform
Server Platform Development
Smart card support
System Management
System administration tools
TeX support Technical Writing
TurboGears application framework
Virtualization
Virtualization Client
Virtualization Platform
Virtualization Tools
Web Server
Web Servlet Engine
Web-based Enterprise Management
X Window System
Available Language Groups:
Catalan Support [ca]
Chhattisgarhi Support [hne]
Chichewa Support [ny]
Chinese Support [zh]
Coptic Support [cop]
Croatian Support [hr]
Czech Support [cs]
Danish Support [da]
Dutch Support [nl]
English (UK) Support [en_GB]
Esperanto Support [eo]
Telugu Support [te]
Tetum Support [tet]
Zulu Support [zu]
Done
===========================================
从上面的软件组信息,挑选与桌面环境有关的软件组,然后安装即可,我下面选择的软件组与输入法还有字体等桌面环境需要用到的供大家参考一下。
yum groupinstall -y "Desktop" "Desktop Platform" "Desktop Platform Development" "Fonts" "General Purpose Desktop" "Graphical Administration Tools" "Graphics Creation Tools" "Input Methods" "X Window System" "Chinese Support [zh]" "Internet Browser"
后面的是安装软件过程,需要等等一阵时间。
安装完毕之后需要切换一下runlevel运行级别
init 5 桌面级别
若想要开机直接进入桌面,需要修改一下配置文件/etc/inittab
vim /etc/inittab
把文件最后一行改为id:5:initdefault:
然后重启一下就好了。
二、Centos 6安装flash
在图形界面下,如果进入浏览器观看视频之类的文件会提示安装flash,一般系统默认不安装flash,在浏览器下安装的话感觉很麻烦,这个时候就可以编译安装flash了。
方法一:
安装 Flash Player
以管理员身份登录。
yum install flash-plugin
验证安装
安装好后,重新启动FireFox,在地址栏输入【about:plugins】确定 Shockware Flash 是否安装成功并启用。
更新 Flash player
以管理员身份登录。
yum update flash-plugin
方法二:
桌面打开浏览器访问:get.adobe/cn/flashplayer/。网页会判断操作系统和浏览器并下载 Flash Player(支持Firefox浏览器)。
或者直接下载:
i386系统
wget linuxdownload.adobe/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
rpm -ivh adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-Linux
yum install firefox.i386 flash-plugin
x86_64系统
wget linuxdownload.adobe/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm -ivh adobe-release-x86_64-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
yum install firefox.x86_64 flash-plugin
更新 Flash player:
yum update flash-plugin
三、Centos 6安装mysql
CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载
# wget dev.mysql/get/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum install mysql-community-server
成功安装之后重启mysql服务
# service mysqld restart
初次安装mysql是root账户是没有密码的
设置密码的方法
方法一:
在mysql系统外,使用mysqladmin
# mysqladmin -u root -p password "test123"
Enter password: 【输入原来的密码】
方法二:
通过登录mysql系统,
# mysql -uroot -p
Enter password: 【输入原来的密码】
mysql>use mysql;
mysql> update user set password=passworD("test") where user='root';
mysql> flush privileges;
mysql> exit;
# mysql -uroot -p
搞定!
四、Centos X修改语言
1、CentOS7.0
(1)、修改为中文
# localectl set-locale LANG=zh_CN.utf8
(2)、修改为英文
# localectl set-locale LANG=en_US.UTF-8
2、CentOS6.5
(1)、修改为英文
# echo 'LANG=en_US.UTF-8' >>/etc/profile
# source /etc/profile
# su -l
(2)、修改为中文
# echo 'LANG=zh_CN.utf8' >>/etc/profile
# source /etc/profile
# su -l