yum install ntp httpd mysql-server php php-mysql php-mbstring rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel phpMyAdmin pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel postfixphp
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-develmysql
爲MySQL root賬戶設置密碼:sql
mysql_secure_installation數據庫
會出現下面的一系列提示:網絡
root@server1 ~]# mysql_secure_installationcurl
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLpost
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!ui
In order to log into MySQL to secure it, well need the currenturl
password for the root user. If youve just installed MySQL, andspa
you havent set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] ENTER
New password: yourrootsqlpassword
Re-enter new password: yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] ENTER
... Success!
Normally, root should only be allowed to connect from localhost. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] ENTER
... Success!
By default, MySQL comes with a database named test that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] ENTER
... Success!
Cleaning up...
All done! If youve completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
[root@server1 ~]#
安裝phpMyAdmin
phpMyAdmin是一個網絡接口,經過它能夠管理你的MySQL數據庫。
首先,咱們使CentOS系統RPMForge軟件庫的phpMyAdmin,而不是官方的CentOS 6.2庫:
因此須要導入RPMForge的GPG密鑰:
rpm import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
x86_64系統:
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
在i386系統:
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
安裝phpmyadmin
yum install phpmyadmin
安裝setuptool吧,能夠節省不少系統管理的時間。
#安裝setuptool
yum install setuptool
#能夠發現執行setup後不全,再安裝一個用於系統服務管理
yum install ntsysv
#再安裝個防火牆,以及setup中配套的防火牆設置、網絡設置
yum install iptables
#安裝setup中配套的防火牆設置
yum install system-config-securitylevel-tui
#安裝setup中配套的網絡設置
yum install system-config-network-tui