和大家一起分享在SUSE Linux 系统里搭建LAMP环境.比在RedHat 里简单多了.嘿嘿,我用的是11.2的哈:
Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 11/18/2009
LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an OpenSUSE 11.2 server with PHP5 support (mod_php) and MySQL support.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.
2 Installing MySQL 5
First we install MySQL 5 like this:
yast2 -i mysql mysql-client
Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
chkconfig --add mysql
/etc/init.d/mysql start
To secure the MySQL installation, run:
mysql_secure_installation
Now you will be asked several questions:
server1:~ # mysql_secure_installation \(打这个命令之前保证mysql已经启动)
(下面是配置mysql,)
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we''ll need the current
password for the root user. If you''ve just installed MySQL, and
you haven''t 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): <-- ENTER \(直接回车)
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] <-- Y \ Y 即yes
New password: <--
Re-enter new password: <-- confirm that password
fill in your desired MySQL root passwordPassword 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] <-- Y \ Y 即yes
... 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] <-- Y \ Y 即yes
... 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] <-- Y \ Y 即yes
- 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] |