************************************************** ****************************
1. System part
************************************************** ****************************
-------- 1.desktop can be installed, choose custom
Choose the following two packages, the others are selected according to your needs
base system
legacy unix compatibility (rsh telnet ksh tftp)
Desktops
legacy x window system compatibility (xorg-x11-xdm)
Check for updateable rpm packages
#yum check-update
Update all rpm packages
#yum update
--- 3.XDM configuration
--- 3.1 centos 6.5
1). Install XDM
yum install xdm
2) .vi / etc / X11 / xdm / Xaccess
49 * #any host can get a login window
3). Modify the /etc/gdm/custom.conf file.
vi /etc/gdm/custom.conf
[xdmcp]
Enable = true
DisplaysPerHost = 5
Port = 177
[security]
AllowRemoteRoot = true
4). Restart gdm service
/ usr / sbin / gdm -restart
--- 4. Turn off the firewall
chkconfig --level 123456 iptables off
service iptables stop
--- 5. Modify hosts
vi / etc / hosts
192.168.0.128 sphinx.ocp.com sphinx
************************************************** ****************************
2.mysql installation part
************************************************** ****************************
One: uninstall the old version
Use the following command to check if MySQL Server is installed
rpm -qa | grep mysql
If there is, uninstall it with the following command
rpm -e mysql // Ordinary delete mode
rpm -e --nodeps mysql
// Powerful delete mode, if you use the above command to delete, you will be prompted to depend on other files,
Then use this command to force delete it
Two: install MySQL
1. Install the packages needed to compile the code
********** If you do not specify defaults-file, the following error may occur:
[Warning] InnoDB: Cannot open table mysql / slave_master_info
[Warning] InnoDB: Cannot open table mysql / slave_worker_info
[Warning] InnoDB: Cannot open table mysql / slave_relay_log_info
**************** /
Provide binary files, library files, header files, man manual
echo 'export PATH = / data / apps / mysql / bin: $ PATH'> /etc/profile.d/mysql.sh
echo '/ data / apps / mysql / lib'> /etc/ld.so.conf.d/mysql.conf
ln -sv / usr / local / include / usr / include / mysql
echo 'MANPATH / data / apps / mysql' >> /etc/man.config
man -M / data / apps / mysql / man mysqld --make the man manual effective as the latest
6. Start MySQL
Add a service, copy the service script to the init.d directory, and set the boot
cd / usr / local / mysql /
cp support-files / mysql.server /etc/init.d/mysql
chkconfig mysql on
service mysql start
7. Configure mysql user
After MySQL starts successfully, root has no password by default, and we need to set the root password.
7.1 Modify the / etc / profile file and add it at the end of the file
#vi / etc / profile
PATH = / usr / local / mysql / bin: $ PATH
export PATH
#source / etc / profile
Now, we can enter mysql directly in the terminal to enter, mysql environment
Execute the following command to modify the root password
--7.2 Modify mysql administrator password
---method 1:
mysql -uroot -h127.0.0.1 -p
SET PASSWORD = PASSWORD ('password');
flush privileges;
--7.3 Log in to mysql
# mysql -uroot -ppassword
--7.4 Set mysql user security (not applicable)
select user, host from mysql.user;
delete from mysql.user where (user, host) not in (select 'root', 'localhost');
#Modify the user name and password of root
update mysql.user set user = 'system', password = password ('password') where user = 'root';
truncate table mysql.db;
#New administrator syntax
grant all on *. * to 'root' @ '%' identified by "password" WITH GRANT OPTION;
--7.5 Set the root user can be accessed remotely
--Method 1: Authorization Law
mysql> GRANT ALL PRIVILEGES ON *. * TO 'root' @ '%' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;
select host, user, passwo
rd from mysql.user;
-Method 2: Modify the table
mysql> update user set host = '%' where user = 'root';
mysql> flush privileges;
---- 7.6 Set Linux script
vi ~ / .bash_profile
#ocpyang set
alias mysql = "mysql -uroot -ppassword --auto-rehash"
alias errorlog = "cat /usr/local/mysql/mysql_logs/error_log/error.log"
alias mycnf = "cd / usr / local / mysql"
export PATH = / usr / local / mysql / scripts: $ PATH
source ~ / .bash_profile
---- 7.7 Modify permissions
chown -R mysql / usr / local / mysql
chgrp -R mysql / usr / local / mysql
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.